1 void RunAssocReader(
int nevents=2,
2 const char* infile =
"assoc.root"
5 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
7 gSystem->Load(
"StMagF");
8 gSystem->Load(
"StTpcDb");
9 gSystem->Load(
"StDbUtilities");
10 gSystem->Load(
"StMcEvent");
11 gSystem->Load(
"StMcEventMaker");
12 gSystem->Load(
"StDaqLib");
13 gSystem->Load(
"StEmcRawMaker");
14 gSystem->Load(
"StEmcADCtoEMaker");
15 gSystem->Load(
"StEmcUtil");
16 gSystem->Load(
"StDbLib");
17 gSystem->Load(
"StDbBroker");
18 gSystem->Load(
"St_db_Maker");
19 gSystem->Load(
"StEEmcUtil");
20 gSystem->Load(
"StEEmcDbMaker");
21 gSystem->Load(
"StJetFinder");
22 gSystem->Load(
"StJetMaker");
24 IoManager* myio =
new IoManager();
25 myio->openRead(infile);
27 int ntotal = myio->recoTree()->GetEntries();
28 cout <<
"ntotal:\t"<<ntotal<<endl;
30 TClonesArray* pairArray = myio->assocArray()->mArray;
31 TClonesArray* recoArray = myio->recoArray()->mArray;
32 TClonesArray* pythiaArray = myio->pythiaArray()->mArray;
35 for (
int i=0; i<nevents && i<ntotal; ++i) {
37 cout <<
"try to get an event"<<endl;
40 int nreco = recoArray->GetLast()+1;
41 cout <<
"reco jets:\t"<<nreco<<endl;