12 int rdMu2histoExample(
int nEve=5000 ){
15 char* file=
"st_physics_12108020_raw_1020001.MuDst.root";
16 char* inDir =
"/star/data05/scratch/balewski/mu2011/";
17 TString fullName=file;
19 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
20 loadSharedLibraries();
21 cout <<
" loading done " << endl;
22 gSystem->Load(
"StDbLib");
23 gSystem->Load(
"StDbBroker");
24 gSystem->Load(
"St_db_Maker");
25 gSystem->Load(
"StEEmcUtil");
26 gSystem->Load(
"StEEmcDbMaker");
27 gSystem->Load(
"StEzExample");
32 printf(
"adding muDst from run '%s' ....\n",fullName.Data());
35 muMk =
new StMuDstMaker(0,0,inDir,fullName,
".MuDst.root",nFiles);
37 muMk->SetStatus(
"*",0);
38 muMk->SetStatus(
"MuEvent",1);
39 muMk->SetStatus(
"EmcTow",1);
41 TChain* tree=muMk->chain(); assert(tree);
42 int nEntries=tree->GetEntries();
43 printf(
"total eve in chain =%d\n",nEntries);
49 gMessMgr->SwitchOff(
"D");
50 gMessMgr->SwitchOff(
"I");
71 if(eventCounter>=nEve)
break;
75 if(eventCounter%500==0)
76 printf(
"\n ====================%d processing ============\n", eventCounter);
79 printf(
"sorting done, nEve=%d of %d\n",nEve, nEntries);
83 float rate=1.*nEve/(t2-t1);
84 printf(
"sorting done %d of nEve=%d, CPU rate=%.1f Hz\n",eventCounter,nEntries,rate);
91 myMk3->saveHisto(
"aaa");
Axample to access EEMC data & DB from muDst in StRoot-framework Only muDst data are decoded by this c...
virtual void Clear(Option_t *option="")
User defined functions.
virtual void ls(Option_t *option="") const