13 int rdDb(
char *outH=
"F7327",
int idat=20050624,
int itim=91958 ) {
16 char* inDir =
"/star/data05/scratch/balewski/2005-bXing-muDst4/171/";
17 char* Rrun =
"st_physics_6171021_raw_2020001.MuDst.root";
21 char *outPath=
"iterF/";
23 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
24 loadSharedLibraries();
25 cout <<
" loading done " << endl;
27 gSystem->Load(
"StDbLib");
28 gSystem->Load(
"StDbBroker");
29 gSystem->Load(
"St_db_Maker");
30 gSystem->Load(
"StSpinDbMaker");
35 printf(
"adding muDst from '%s' ....\n",Rrun);
37 muMk =
new StMuDstMaker(0,0,inDir,Rrun,
"MuDst.root",nFiles);
38 TChain* tree=muMk->
chain(); assert(tree);
39 int nEntries=(int)tree->GetEntries();
40 printf(
"total eve in chain =%d\n",nEntries);
44 stDb->SetDateTime(idat,itim);
48 gMessMgr->SwitchOff(
"D");
49 gMessMgr->SwitchOn(
"I");
50 hbxI=
new TH1F(
"bXI",
"Intended fill pattern vs. STAR bXing; bXing at STAR IP",120,-0.5,119.5);
56 printf(
"%d seconds used to Init() the chain\n",t2-t1);
66 if(eventCounter>=nEve)
break;
73 if(eventCounter>0) printf(
"sorting done, nEve=%d of :%d :%d :is missing\n",eventCounter, nEntries,-eventCounter+nEntries);
76 float rate=1.*eventCounter/(t2-t1);
77 float nMnts=(t2-t1)/60.; printf(
"sorting done %d of nEve=%d, CPU rate=%.1f Hz tot %.1f minutes\n",eventCounter,nEntries,rate,nMnts);
79 TString fileH=outPath; fileH+=outH; fileH+=
".hist.root";
80 printf(
" saving -->%s\n",fileH.Data());
81 new TFile(fileH,
"recreate");
85 const int * spin8bits=spDb->getSpin8bits();
86 for(
int bx=0;bx<120;bx++){
87 bool isFilled=(spin8bits[bx] & 0x11)==0x11;
88 if(isFilled) hbxI->Fill(bx);
virtual void Clear(Option_t *option="")
User defined functions.
virtual void ls(Option_t *option="") const
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.