--- quicklook/tracker/flight/macros/FTrkQLook_EXPERT.cxx 2006/10/02 13:05:39 1.18 +++ quicklook/tracker/flight/macros/FTrkQLook_EXPERT.cxx 2006/10/12 16:58:34 1.19 @@ -145,16 +145,19 @@ // information about the RunHeader ULong64_t HOBT[neventH]; Int_t trk_cal_us[neventH]; + ULong_t acq_info[neventH]; Int_t countnboot=1; for (Int_t vi=0; viGetEntry(ev); pH = eH->GetPscuHeader(); HOBT[ev]= pH->GetOrbitalTime(); trk_cal_us[ev]=reh->TRK_CALIB_USED; + acq_info[ev]=reh->ACQ_BUILD_INFO; if((HOBT[ev]0) countnboot+=1; } @@ -442,18 +445,18 @@ break; } else{ - tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); - if(tempt_tmp[v]>100) { - tempt_tmp[v]=28.5; - tempt_tmpw[vv]=28.5; - xt_tmpw[vv++]=(Double_t)xt[ev]; - } - else if(tempt_tmp[v]<0){ - tempt_tmp[v]=25.5; - tempt_tmpw[vv]=25.5; - xt_tmpw[vv++]=(Double_t)xt[ev]; - } - xt_tmp[v++]=(Double_t)xt[ev]; + tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); + if(tempt_tmp[v]>100) { + tempt_tmp[v]=28.5; + tempt_tmpw[vv]=28.5; + xt_tmpw[vv++]=(Double_t)xt[ev]; + } + else if(tempt_tmp[v]<0){ + tempt_tmp[v]=25.5; + tempt_tmpw[vv]=25.5; + xt_tmpw[vv++]=(Double_t)xt[ev]; + } + xt_tmp[v++]=(Double_t)xt[ev]; } } TempCanv[ii]->cd(); @@ -598,40 +601,40 @@ ma<<"maximum recorded value"; t->SetTextSize(0.1); switch(i){ - case 0: - li.DrawLine(min,2054.,max,2054.); - li.DrawLine(min,2048.,max,2048.); - t1->DrawLatex(xlat,2054.3,ma.str().c_str()); - t1->DrawLatex(xlat,2047.7,mi.str().c_str()); - break; + case 0: + li.DrawLine(min,2054.,max,2054.); + li.DrawLine(min,2048.,max,2048.); + t1->DrawLatex(xlat,2054.3,ma.str().c_str()); + t1->DrawLatex(xlat,2047.7,mi.str().c_str()); + break; - case 1: - li.DrawLine(min,2055.,max,2055.); - li.DrawLine(min,2050.,max,2050.); - t1->DrawLatex(xlat,2055.3,ma.str().c_str()); - t1->DrawLatex(xlat,2049.7,mi.str().c_str()); - break; + case 1: + li.DrawLine(min,2055.,max,2055.); + li.DrawLine(min,2050.,max,2050.); + t1->DrawLatex(xlat,2055.3,ma.str().c_str()); + t1->DrawLatex(xlat,2049.7,mi.str().c_str()); + break; - case 2: - li.DrawLine(min,2056.,max,2056.); - li.DrawLine(min,2051.,max,2051.); - t1->DrawLatex(xlat,2056.3,ma.str().c_str()); - t1->DrawLatex(xlat,2050.7,mi.str().c_str()); - break; + case 2: + li.DrawLine(min,2056.,max,2056.); + li.DrawLine(min,2051.,max,2051.); + t1->DrawLatex(xlat,2056.3,ma.str().c_str()); + t1->DrawLatex(xlat,2050.7,mi.str().c_str()); + break; - case 3: - li.DrawLine(min,2057.,max,2057.); - li.DrawLine(min,2052.,max,2052.); - t1->DrawLatex(xlat,2057.3,ma.str().c_str()); - t1->DrawLatex(xlat,2051.7,mi.str().c_str()); - break; + case 3: + li.DrawLine(min,2057.,max,2057.); + li.DrawLine(min,2052.,max,2052.); + t1->DrawLatex(xlat,2057.3,ma.str().c_str()); + t1->DrawLatex(xlat,2051.7,mi.str().c_str()); + break; - case 4: - li.DrawLine(min,2066.,max,2066.); - li.DrawLine(min,2061.,max,2061.); - t1->DrawLatex(xlat,2066.15,ma.str().c_str()); - t1->DrawLatex(xlat,2060.85,mi.str().c_str()); - break; + case 4: + li.DrawLine(min,2066.,max,2066.); + li.DrawLine(min,2061.,max,2061.); + t1->DrawLatex(xlat,2066.15,ma.str().c_str()); + t1->DrawLatex(xlat,2060.85,mi.str().c_str()); + break; } BfieldCanv[ii]->Update(); @@ -744,62 +747,76 @@ else{ x[(ev-minev)]= ph->GetOrbitalTime(); ALARM=0; - Int_t dsp=0; - for(Int_t i=0; i<12; i++){ - if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { - ALARM=1; - break; - } + Int_t noacq=0; + Int_t acq_dsp[12]; + ULong_t acq_info_tmp=0; + if(cod->Get(pctp->RunHeader)>0) acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)-1]; + else acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)]; + for(Int_t io=0;io<12;io++){ + acq_dsp[dsp]=(acq_info_tmp>>(12+io))&(~(~0<<1)); + if(((acq_info_tmp>>(12+io))&(~(~0<<1)))==0) + noacq+=1; + WARNING[io]=0; + } - dsp=te->DSPnumber[i]-1; - yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; + for(Int_t i=0; i<12; i++){ - // - // Fill Cluster Signal and Lighting of the view histos - for(Int_t j=0;j<3;j++){ - if(te->signcluster[i][j]!=0){ - if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ - illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); + if(i<12-noacq){ + if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { + ALARM=1; + break; + } + + dsp=te->DSPnumber[i]-1; + yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; + + // + // Fill Cluster Signal and Lighting of the view histos + for(Int_t j=0;j<3;j++){ + if(te->signcluster[i][j]!=0){ + if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ + illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); + } } } - } - if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ - if(!(dsp%2)){ - if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); - if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); - if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); - } - else{ - if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); - if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); - if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); + if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ + if(!(dsp%2)){ + if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); + if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); + if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); + } + else{ + if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); + if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); + if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); + } } - } - WARNING[i]=0; - if(te->fc[i]!=0 || te->fl1[i]!=0 || te->fl2[i]!=0 || te->fl3[i]!=0 || te->fl4[i]!=0 || te->fl5[i]!=0 || te->fl6[i]!=0){ - ALARM = 1; //general alarm - WARNING[i] = 1; // DSP warning - }; - - if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm - if(countALARMy==0) - ALARM = 1; - countALARMy+=1; - }; - - if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm - if(countALARMx==0) - ALARM = 1; - countALARMx+=1; - }; + WARNING[i]=0; + if(te->fc[i]!=0 || te->fl1[i]!=0 || te->fl2[i]!=0 || te->fl3[i]!=0 || te->fl4[i]!=0 || te->fl5[i]!=0 || te->fl6[i]!=0){ + ALARM = 1; //general alarm + WARNING[i] = 1; // DSP warning + }; + + if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm + if(countALARMy==0) + ALARM = 1; + countALARMy+=1; + }; + + if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm + if(countALARMx==0) + ALARM = 1; + countALARMx+=1; + }; - //************************************************************************************** - // warning for internal number - //************************************************************************************** - if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; - if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; + //************************************************************************************** + // warning for internal number + //************************************************************************************** + if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; + if((ev-minev)>=1 && eventn[i]+1!=te->eventn[i] && te->eventn[i]!=1) ALARM=1; + } } eventint[(ev-minev)]=te->eventn[0]; @@ -1115,8 +1132,7 @@ b.SetFillColor(107); b.SetFillStyle(3954); b.DrawBox(0.,0.,512.,maxhist); - b.DrawBox(1920.,0.,2048.,maxhist); - b.DrawBox(2176.,0.,2304.,maxhist); + b.DrawBox(1920.,0.,2560.,maxhist); } IlluminaCanv->Update(); }