StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
exampleStEvent.C
1 // NOTE - chain needs to be declared global so for StHbtEventReader
2 //==========================================================================================
3 class StMuDstMaker;
4 class StEvent;
5 
6 StMuDstMaker* maker;
7 StEvent* ev;
8 
9 
10 void exampleStEvent() {
11  gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
12  loadSharedLibraries();
13 
14  cout << " loading done " << endl;
15 
16  StMuDebug::setLevel(0); // switch of some debug output
17 
18  int iret=0;
19  maker = new StMuDstMaker(0,0,"","AuAu200.lis","MuDst.root:st_physics",3); // set up maker in read mode
20 
21  StMuDbReader* db = StMuDbReader::instance();
22  db->addDb("/star/u/laue/afsWork/P02g.db");
23 
24  StEvent* ev=0;
25  int n;
26  while ( maker->Make()==0 ) {
27  cout << n++ << " ";
28  cout.flush();
29  StMuDst* mu = maker->muDst();
30  if (mu) ev = mu->createStEvent();
31  if (ev) delete ev; ev=0;
32  }
33  cout << endl;
34 
35 }
36 
37 
38 
virtual int Make()
StMuDst * muDst()
Definition: StMuDstMaker.h:425
int addDb(const char *dbFile)
add entries in dbFile to internal data base ( mDb ), will call sortDb(), returns number of entries in...
static void setLevel(unsigned int level)
sets the debug level
Definition: StMuDebug.h:74
StEvent * createStEvent()
creates a StEvent from the StMuDst (this) and returns a pointer to it. (This function is not yet fini...
Definition: StMuDst.cxx:702