9 void St2print(Int_t nevents=10,
char *fname=
"R5086033c3.event.root")
12 fname=
"st_physics_5109030_raw_1020001.event.root";
14 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
15 loadSharedLibraries();
16 cout <<
" loading done " << endl;
29 ioMaker->SetFile(fname);
32 ioMaker->SetBranch(
"*",0,
"0");
33 ioMaker->SetBranch(
"geantBranch",0,
"r");
34 ioMaker->SetBranch(
"eventBranch",0,
"r");
46 Int_t initStat = chain->Init();
47 if (initStat) chain->Fatal(initStat,
"during Init()");
53 if (iev<=nevents && istat!=2)
56 cout <<
"---------------------- Processing Event : " << iev <<
" ----------------------" << endl;
57 istat = chain->
Make(iev);
64 int nV=mEvent->numberOfPrimaryVertices();
66 printf(
"eveID=%d nPrimVert=%d\n", mEvent->id(),nV);
67 for(iv=0;iv<nV;iv++) {
72 printf(
"iv=%d Vz=%.2f +/-%.2f \n",iv,r.z(),er.z() );
73 printf(
" nDaugh=%d , VFid=%d:: ntr=%d nCtb=%d nBemc=%d nEEmc=%d nTpc=%d sumPt=%.1f rank=%g xchi2=%g\n"
74 ,V->numberOfDaughters(), V->vertexFinderId() ,V->numTracksUsedInFinder() ,V->numMatchesWithCTB() ,V-> numMatchesWithBEMC() ,V->numMatchesWithEEMC() ,V->numTracksCrossingCentralMembran() ,V->sumOfTrackPt() ,V->ranking(), V->chiSquared());
116 for(
int i = 0; i<NBANK;i++) {
118 int size = raw->sizeHeader(i);
119 printf(
"\n======\nBANK=%d header size=%d\n",i,size);
120 for(
int j = 0;j<size;j++) {
121 if(j%16==0) printf(
"\n");
122 printf(
"0x%04x ",raw->header(i,j));
127 int size = raw->sizeData(i);
128 printf(
"\nBANK=%d data size=%d",i,size);
129 for(
int j = 0;j<size;j++) {
130 if(j%16==0) printf(
"\n");
131 printf(
"0x%04x ",raw->data(i,j));
135 printf(
"\n tot=%d\n",tot);
147 printf(
"printRaw(%p)\n",raw);
151 printf(
"nBlocks=%d\n",raw->getNBlocks());
153 for(icr=0; icr<raw->getNBlocks();icr++) {
154 if(raw->sizeData(icr)<=0)
continue;
156 const UShort_t* head=raw->header(icr);
157 const UShort_t*
data=raw->data(icr);
159 printf(
"icr=%d, size: head=%d data=%d\n",icr,raw->sizeHeader(icr),raw->sizeData(icr));
163 block.setHead(raw->header(icr));
164 block.setDataArray(raw->data(icr),raw->sizeData(icr));
177 printf(
"printTw(%p)\n",det);
179 printf(
"towers nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
181 for(
int mod=1;mod<=det->numberOfModules();mod++) {
183 printf(
"ETOW sector=%d nHit=%d\n",mod,module->numberOfHits());
184 StSPtrVecEmcRawHit&
hit= module->hits();
186 for(ih=0;ih<hit.size();ih++){
189 char sub=
'A'+x->sub()-1;
193 printf(
"ih=%d %02dT%c%02d -->adc=%d ener=%f\n",ih,sec,sub,eta,adc, x->energy());
195 int adcX=1000+ (eta-1) + (sub-
'A')*12 +(sec-1)*60;
200 printf(
"nPos=%d\n",nPos);
202 printf(
"total nPos=%d\n",nPos);
203 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
214 printf(
"printPre/post(%p)\n",det);
216 printf(
"pre/post nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
218 for(
int imod=1;imod<=det->numberOfModules();imod++) {
220 printf(
"EPRE sect=%d nHit=%d\n",imod, module->numberOfHits());
221 StSPtrVecEmcRawHit& hit= module->hits();
223 for(ih=0;ih<hit.size();ih++){
231 printf(
"ih=%d %02d%c%c%02d ss=%d -->adc=%d ener=%f ss=%d\n",ih,sec,preL,sub,eta,ss,adc, x->energy(),ss);
233 int adcX= (eta-1) + (sub-
'A')*12 +(sec-1)*60 + 1000*(preL-
'P'+1);
236 printf(
"nPos=%d\n",nPos);
239 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
251 printf(
"printSMD/post(%p)\n",det);
253 printf(
"U-SMD nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
255 for(
int imod=1;imod<=det->numberOfModules();imod++) {
257 printf(
"ESMD sector=%d nHit=%d\n",imod, module->numberOfHits());
258 StSPtrVecEmcRawHit& hit= module->hits();
260 for(ih=0;ih<hit.size();ih++){
265 printf(
"ih=%d %02dU%03d -->adc=%d ener=%f\n",ih,sec,strip,adc, x->energy());
267 int adcX= 1000+(strip -1) +(sec-1)*300;
270 printf(
" nPos=%d\n",nPos);
272 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
virtual void ls(Option_t *option="") const