9 void rdSt2print(Int_t nevents=100){
11 char * fname=
"/star/data09/reco/ppProductionTrans/FullField/dev/2006/129/7129060/st_physics_7129060_raw_1030002.event.root";
13 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
14 loadSharedLibraries();
15 cout <<
" loading done " << endl;
28 ioMaker->SetFile(fname);
31 ioMaker->SetBranch(
"*",0,
"0");
32 ioMaker->SetBranch(
"geantBranch",0,
"r");
33 ioMaker->SetBranch(
"eventBranch",0,
"r");
45 Int_t initStat = chain->Init();
46 if (initStat) chain->Fatal(initStat,
"during Init()");
51 while(iev<=nevents && istat!=2) {
53 cout <<
"---------------------- Processing Event : " << iev <<
" ----------------------" << endl;
54 istat = chain->
Make(iev);
61 int nV=mEvent->numberOfPrimaryVertices();
64 printf(
"eveID=%d nPrimVert=%d\n", mEvent->id(),nV);
65 for(iv=0;iv<nV;iv++) {
70 printf(
"iv=%d Vz=%.2f +/-%.2f \n",iv,r.z(),er.z() );
71 printf(
" nDaugh=%d , VFid=%d:: ntr=%d nCtb=%d nBemc=%d nEEmc=%d nTpc=%d sumPt=%.1f rank=%g xchi2=%g\n"
72 ,V->numberOfDaughters(), V->vertexFinderId() ,V->numTracksUsedInFinder() ,V->numMatchesWithCTB() ,V-> numMatchesWithBEMC() ,V->numMatchesWithEEMC() ,V->numTracksCrossingCentralMembrane() ,V->sumOfTrackPt() ,V->ranking(), V->chiSquared());
87 printRawBEMC(emcC->bemcRawData());
115 for(
int i = 0; i<NBANK;i++) {
116 int size = raw->sizeHeader(i);
117 printf(
"\n======\nBANK=%d headerSize=%d dataSize=%d\n",i,size,raw->sizeData(i));
120 for(
int j = 0;j<size;j++) {
121 if(j%16==0) printf(
"\n");
122 printf(
"0x%04x ",raw->header(i,j));
128 int size = raw->sizeData(i);
129 printf(
"\nBANK=%d data size=%d",i,size);
130 for(
int j = 0;j<size;j++) {
131 if(j%16==0) printf(
"\n");
132 printf(
"0x%04x ",raw->data(i,j));
137 printf(
"\n tot=%d\n",tot);
149 printf(
"printRaw(%p)\n",raw);
153 printf(
"nBlocks=%d\n",raw->getNBlocks());
155 for(icr=0; icr<raw->getNBlocks();icr++) {
156 if(raw->sizeData(icr)<=0)
continue;
158 const UShort_t* head=raw->header(icr);
159 const UShort_t*
data=raw->data(icr);
161 printf(
"icr=%d, size: head=%d data=%d\n",icr,raw->sizeHeader(icr),raw->sizeData(icr));
165 block.setHead(raw->header(icr));
166 block.setDataArray(raw->data(icr),raw->sizeData(icr));
179 printf(
"printTw(%p)\n",det);
181 printf(
"towers nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
183 for(
int mod=1;mod<=det->numberOfModules();mod++) {
185 printf(
"ETOW sector=%d nHit=%d\n",mod,module->numberOfHits());
186 StSPtrVecEmcRawHit&
hit= module->hits();
188 for(ih=0;ih<hit.size();ih++){
191 char sub=
'A'+x->sub()-1;
195 printf(
"ih=%d %02dT%c%02d -->adc=%d ener=%f\n",ih,sec,sub,eta,adc, x->energy());
197 int adcX=1000+ (eta-1) + (sub-
'A')*12 +(sec-1)*60;
202 printf(
"nPos=%d\n",nPos);
204 printf(
"total nPos=%d\n",nPos);
205 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
216 printf(
"printPre/post(%p)\n",det);
218 printf(
"pre/post nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
220 for(
int imod=1;imod<=det->numberOfModules();imod++) {
222 printf(
"EPRE sect=%d nHit=%d\n",imod, module->numberOfHits());
223 StSPtrVecEmcRawHit& hit= module->hits();
225 for(ih=0;ih<hit.size();ih++){
233 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);
235 int adcX= (eta-1) + (sub-
'A')*12 +(sec-1)*60 + 1000*(preL-
'P'+1);
238 printf(
"nPos=%d\n",nPos);
241 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
253 printf(
"printSMD/post(%p)\n",det);
255 printf(
"U-SMD nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
257 for(
int imod=1;imod<=det->numberOfModules();imod++) {
259 printf(
"ESMD sector=%d nHit=%d\n",imod, module->numberOfHits());
260 StSPtrVecEmcRawHit& hit= module->hits();
262 for(ih=0;ih<hit.size();ih++){
267 printf(
"ih=%d %02dU%03d -->adc=%d ener=%f\n",ih,sec,strip,adc, x->energy());
269 int adcX= 1000+(strip -1) +(sec-1)*300;
272 printf(
" nPos=%d\n",nPos);
274 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