StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TDFReader.C
1 void TDFReader(const char *files="*.dat", int nEvents=3){
2  cout << "Reading up to "<<nEvents<<" events\n";
3  gROOT->Macro("Load.C");
4  gSystem->Load("StIOMaker");
5  gSystem->Load("StTriggerDataMaker");
6 
7  cout << "Setting up chain" << endl;
8  StChain* chain = new StChain;
9  StIOMaker* iomaker = new StIOMaker("IO","r", files);
10  StTriggerDataMaker* trgmaker = new StTriggerDataMaker();
11  trgmaker->setDebug(1);
12 
13  cout << "Init Chain" << endl;
14  chain->Init();
15 
16  cout << "Event Loop nEvents=" << nEvents << endl;
17  chain->EventLoop(0,nEvents);
18 
19  cout << "Finish Chain" << endl;
20  chain->Finish();
21  delete chain;
22 }
virtual Int_t Finish()
Definition: StChain.cxx:85