| 145 |
// information about the RunHeader |
// information about the RunHeader |
| 146 |
ULong64_t HOBT[neventH]; |
ULong64_t HOBT[neventH]; |
| 147 |
Int_t trk_cal_us[neventH]; |
Int_t trk_cal_us[neventH]; |
| 148 |
|
ULong_t acq_info[neventH]; |
| 149 |
Int_t countnboot=1; |
Int_t countnboot=1; |
| 150 |
for (Int_t vi=0; vi<neventH;vi++){ |
for (Int_t vi=0; vi<neventH;vi++){ |
| 151 |
HOBT[vi]=0; |
HOBT[vi]=0; |
| 152 |
trk_cal_us[vi]=0; |
trk_cal_us[vi]=0; |
| 153 |
|
acq_info[vi]=0; |
| 154 |
} |
} |
| 155 |
for (Int_t ev=0; ev<neventH; ev++){ |
for (Int_t ev=0; ev<neventH; ev++){ |
| 156 |
otr->GetEntry(ev); |
otr->GetEntry(ev); |
| 157 |
pH = eH->GetPscuHeader(); |
pH = eH->GetPscuHeader(); |
| 158 |
HOBT[ev]= pH->GetOrbitalTime(); |
HOBT[ev]= pH->GetOrbitalTime(); |
| 159 |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
trk_cal_us[ev]=reh->TRK_CALIB_USED; |
| 160 |
|
acq_info[ev]=reh->ACQ_BUILD_INFO; |
| 161 |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
if((HOBT[ev]<HOBT[ev-1]) && ev>0) |
| 162 |
countnboot+=1; |
countnboot+=1; |
| 163 |
} |
} |
| 445 |
break; |
break; |
| 446 |
} |
} |
| 447 |
else{ |
else{ |
| 448 |
tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); |
tempt_tmp[v]=(Double_t)((Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231)); |
| 449 |
if(tempt_tmp[v]>100) { |
if(tempt_tmp[v]>100) { |
| 450 |
tempt_tmp[v]=28.5; |
tempt_tmp[v]=28.5; |
| 451 |
tempt_tmpw[vv]=28.5; |
tempt_tmpw[vv]=28.5; |
| 452 |
xt_tmpw[vv++]=(Double_t)xt[ev]; |
xt_tmpw[vv++]=(Double_t)xt[ev]; |
| 453 |
} |
} |
| 454 |
else if(tempt_tmp[v]<0){ |
else if(tempt_tmp[v]<0){ |
| 455 |
tempt_tmp[v]=25.5; |
tempt_tmp[v]=25.5; |
| 456 |
tempt_tmpw[vv]=25.5; |
tempt_tmpw[vv]=25.5; |
| 457 |
xt_tmpw[vv++]=(Double_t)xt[ev]; |
xt_tmpw[vv++]=(Double_t)xt[ev]; |
| 458 |
} |
} |
| 459 |
xt_tmp[v++]=(Double_t)xt[ev]; |
xt_tmp[v++]=(Double_t)xt[ev]; |
| 460 |
} |
} |
| 461 |
} |
} |
| 462 |
TempCanv[ii]->cd(); |
TempCanv[ii]->cd(); |
| 601 |
ma<<"maximum recorded value"; |
ma<<"maximum recorded value"; |
| 602 |
t->SetTextSize(0.1); |
t->SetTextSize(0.1); |
| 603 |
switch(i){ |
switch(i){ |
| 604 |
case 0: |
case 0: |
| 605 |
li.DrawLine(min,2054.,max,2054.); |
li.DrawLine(min,2054.,max,2054.); |
| 606 |
li.DrawLine(min,2048.,max,2048.); |
li.DrawLine(min,2048.,max,2048.); |
| 607 |
t1->DrawLatex(xlat,2054.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2054.3,ma.str().c_str()); |
| 608 |
t1->DrawLatex(xlat,2047.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2047.7,mi.str().c_str()); |
| 609 |
break; |
break; |
| 610 |
|
|
| 611 |
case 1: |
case 1: |
| 612 |
li.DrawLine(min,2055.,max,2055.); |
li.DrawLine(min,2055.,max,2055.); |
| 613 |
li.DrawLine(min,2050.,max,2050.); |
li.DrawLine(min,2050.,max,2050.); |
| 614 |
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2055.3,ma.str().c_str()); |
| 615 |
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2049.7,mi.str().c_str()); |
| 616 |
break; |
break; |
| 617 |
|
|
| 618 |
case 2: |
case 2: |
| 619 |
li.DrawLine(min,2056.,max,2056.); |
li.DrawLine(min,2056.,max,2056.); |
| 620 |
li.DrawLine(min,2051.,max,2051.); |
li.DrawLine(min,2051.,max,2051.); |
| 621 |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2056.3,ma.str().c_str()); |
| 622 |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2050.7,mi.str().c_str()); |
| 623 |
break; |
break; |
| 624 |
|
|
| 625 |
case 3: |
case 3: |
| 626 |
li.DrawLine(min,2057.,max,2057.); |
li.DrawLine(min,2057.,max,2057.); |
| 627 |
li.DrawLine(min,2052.,max,2052.); |
li.DrawLine(min,2052.,max,2052.); |
| 628 |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
t1->DrawLatex(xlat,2057.3,ma.str().c_str()); |
| 629 |
t1->DrawLatex(xlat,2051.7,mi.str().c_str()); |
t1->DrawLatex(xlat,2051.7,mi.str().c_str()); |
| 630 |
break; |
break; |
| 631 |
|
|
| 632 |
case 4: |
case 4: |
| 633 |
li.DrawLine(min,2066.,max,2066.); |
li.DrawLine(min,2066.,max,2066.); |
| 634 |
li.DrawLine(min,2061.,max,2061.); |
li.DrawLine(min,2060.,max,2060.); |
| 635 |
t1->DrawLatex(xlat,2066.15,ma.str().c_str()); |
t1->DrawLatex(xlat,2066.15,ma.str().c_str()); |
| 636 |
t1->DrawLatex(xlat,2060.85,mi.str().c_str()); |
t1->DrawLatex(xlat,2059.85,mi.str().c_str()); |
| 637 |
break; |
break; |
| 638 |
|
|
| 639 |
} |
} |
| 640 |
BfieldCanv[ii]->Update(); |
BfieldCanv[ii]->Update(); |
| 747 |
else{ |
else{ |
| 748 |
x[(ev-minev)]= ph->GetOrbitalTime(); |
x[(ev-minev)]= ph->GetOrbitalTime(); |
| 749 |
ALARM=0; |
ALARM=0; |
|
|
|
| 750 |
Int_t dsp=0; |
Int_t dsp=0; |
| 751 |
for(Int_t i=0; i<12; i++){ |
Int_t noacq=0; |
| 752 |
if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { |
Int_t acq_dsp[12]; |
| 753 |
ALARM=1; |
ULong_t acq_info_tmp=0; |
| 754 |
break; |
if(cod->Get(pctp->RunHeader)>0) acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)-1]; |
| 755 |
} |
else acq_info_tmp=acq_info[cod->Get(pctp->RunHeader)]; |
| 756 |
|
for(Int_t io=0;io<12;io++){ |
| 757 |
|
acq_dsp[dsp]=(acq_info_tmp>>(12+io))&(~(~0<<1)); |
| 758 |
|
if(((acq_info_tmp>>(12+io))&(~(~0<<1)))==0) |
| 759 |
|
noacq+=1; |
| 760 |
|
WARNING[io]=0; |
| 761 |
|
} |
| 762 |
|
|
| 763 |
dsp=te->DSPnumber[i]-1; |
for(Int_t i=0; i<12; i++){ |
|
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
|
| 764 |
|
|
| 765 |
// |
if(i<12-noacq){ |
| 766 |
// Fill Cluster Signal and Lighting of the view histos |
if(te->DSPnumber[i]<1 || te->DSPnumber[i]>12) { |
| 767 |
for(Int_t j=0;j<3;j++){ |
ALARM=1; |
| 768 |
if(te->signcluster[i][j]!=0){ |
break; |
| 769 |
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
} |
| 770 |
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
|
| 771 |
|
dsp=te->DSPnumber[i]-1; |
| 772 |
|
yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; |
| 773 |
|
|
| 774 |
|
// |
| 775 |
|
// Fill Cluster Signal and Lighting of the view histos |
| 776 |
|
for(Int_t j=0;j<3;j++){ |
| 777 |
|
if(te->signcluster[i][j]!=0){ |
| 778 |
|
if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ |
| 779 |
|
illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); |
| 780 |
|
} |
| 781 |
} |
} |
| 782 |
} |
} |
| 783 |
} |
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
| 784 |
if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ |
if(!(dsp%2)){ |
| 785 |
if(!(dsp%2)){ |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); |
| 786 |
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])); |
| 787 |
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])); |
| 788 |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); |
} |
| 789 |
} |
else{ |
| 790 |
else{ |
if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); |
| 791 |
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]); |
| 792 |
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]); |
| 793 |
if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); |
} |
| 794 |
} |
} |
|
} |
|
| 795 |
|
|
| 796 |
WARNING[i]=0; |
WARNING[i]=0; |
| 797 |
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){ |
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){ |
| 798 |
ALARM = 1; //general alarm |
ALARM = 1; //general alarm |
| 799 |
WARNING[i] = 1; // DSP warning |
WARNING[i] = 1; // DSP warning |
| 800 |
}; |
}; |
| 801 |
|
|
| 802 |
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
if(dsp%2==0 && te->alarm[i]!=0){ // hardware alarm |
| 803 |
if(countALARMy==0) |
if(countALARMy==0) |
| 804 |
ALARM = 1; |
ALARM = 1; |
| 805 |
countALARMy+=1; |
countALARMy+=1; |
| 806 |
}; |
}; |
| 807 |
|
|
| 808 |
if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm |
if(dsp%2==1 && te->alarm[i]!=0){ // hardware alarm |
| 809 |
if(countALARMx==0) |
if(countALARMx==0) |
| 810 |
ALARM = 1; |
ALARM = 1; |
| 811 |
countALARMx+=1; |
countALARMx+=1; |
| 812 |
}; |
}; |
| 813 |
|
|
| 814 |
//************************************************************************************** |
//************************************************************************************** |
| 815 |
// warning for internal number |
// warning for internal number |
| 816 |
//************************************************************************************** |
//************************************************************************************** |
| 817 |
if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
if(ev==minev && i<=10 && te->eventn[i]!=te->eventn[i+1]) ALARM=1; |
| 818 |
if((ev-minev)>=1 && eventn[i]+1!=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; |
| 819 |
|
} |
| 820 |
} |
} |
| 821 |
eventint[(ev-minev)]=te->eventn[0]; |
eventint[(ev-minev)]=te->eventn[0]; |
| 822 |
|
|
| 1132 |
b.SetFillColor(107); |
b.SetFillColor(107); |
| 1133 |
b.SetFillStyle(3954); |
b.SetFillStyle(3954); |
| 1134 |
b.DrawBox(0.,0.,512.,maxhist); |
b.DrawBox(0.,0.,512.,maxhist); |
| 1135 |
b.DrawBox(1920.,0.,2048.,maxhist); |
b.DrawBox(1920.,0.,2560.,maxhist); |
|
b.DrawBox(2176.,0.,2304.,maxhist); |
|
| 1136 |
} |
} |
| 1137 |
IlluminaCanv->Update(); |
IlluminaCanv->Update(); |
| 1138 |
} |
} |