StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ReadConfig.cc
1 #include "StDbManager.hh"
2 #include "StDbConfigNode.hh"
3 #include "StDbTable.h"
4 #include "StDbXmlReader.h"
5 #include "StDbXmlWriter.h"
6 #include "StDbElementIndex.hh"
7 #include <time.h>
8 
9 int main(){
10 
12  //--> mgr->setVerbose(true); //option for printing all SQL statements
13 
14  //--> get structure
15  StDbConfigNode* node = mgr->initConfig(dbStDb,dbStar,"reconV0");
16 
17  //--> select via timestamp (here it is simply 'now')
18  mgr->setRequestTime((unsigned int)time(NULL));
19 
20  //--> get all data for this timestamp
21  mgr->fetchAllTables(node);
22 
23  //--> print the structure (not the data)
24  mgr->setVerbose(true);
25  node->printTree(0);
26  mgr->setVerbose(false);
27 
28  //--> print out the data-volume & # of tables
29  node->printNumberStats();
30 
31  //--> print the clock time for all queries
32  mgr->printTimeStats();
33 
34  //--> clean up the memory
35  delete node;
36  delete mgr;
37 
38 }
39 
40 
41 
42 
static StDbManager * Instance()
strdup(..) is not ANSI
Definition: StDbManager.cc:155