| 2 | 
  * FTrkQLook_EXPERT | 
  * FTrkQLook_EXPERT | 
| 3 | 
  * | 
  * | 
| 4 | 
  * autor: D.Fedele | 
  * autor: D.Fedele | 
| 5 | 
  * version 2.0 | 
  * version 3.0 | 
| 6 | 
  * Parameters: | 
  * Parameters: | 
| 7 | 
  *      file - the data file to analyze | 
  *      file - the data file to analyze | 
| 8 | 
  *      fromevent - first event to analyze | 
  *      fromevent - first event to analyze | 
| 25 | 
 #include <physics/tracker/TrackerEvent.h> | 
 #include <physics/tracker/TrackerEvent.h> | 
| 26 | 
 #include <PscuHeader.h> | 
 #include <PscuHeader.h> | 
| 27 | 
 #include <EventHeader.h> | 
 #include <EventHeader.h> | 
| 28 | 
  | 
 #include <RunHeaderEvent.h> | 
| 29 | 
 #include <TrkAlarmEvent.h> | 
 #include <TrkAlarmEvent.h> | 
| 30 | 
 #include <tsbt/TsbTRecord.h> | 
 #include <tsbt/TsbTRecord.h> | 
| 31 | 
 #include <tsbt/TsbTEvent.h> | 
 #include <tsbt/TsbTEvent.h> | 
| 32 | 
  | 
 #include <EventCounter.h> | 
| 33 | 
  | 
 #include <PacketType.h> | 
| 34 | 
 // | 
 // | 
| 35 | 
  | 
 #define MAXSTORAGE 50000 | 
| 36 | 
  | 
  | 
| 37 | 
 void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){     | 
 void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){     | 
| 38 | 
     if ( to == 0 ){ | 
   if ( to == 0 ){ | 
| 39 | 
         Int_t t2length = s2.Length(); | 
     Int_t t2length = s2.Length(); | 
| 40 | 
         s1 = ""; | 
     s1 = ""; | 
| 41 | 
         to = t2length; | 
     to = t2length; | 
| 42 | 
     }; | 
   }; | 
| 43 | 
     for (Int_t i = from; i<to; i++){ | 
   for (Int_t i = from; i<to; i++){ | 
| 44 | 
         s1.Append(s2[i],1); | 
     s1.Append(s2[i],1); | 
| 45 | 
     }; | 
   }; | 
| 46 | 
 }; | 
 }; | 
| 47 | 
  | 
  | 
| 48 | 
  | 
  | 
| 51 | 
   //  | 
   //  | 
| 52 | 
   //   obtain information about the data file and select the output dir | 
   //   obtain information about the data file and select the output dir | 
| 53 | 
   const string filepath=file.Data();  | 
   const string filepath=file.Data();  | 
| 54 | 
   Int_t dwpos = filepath.rfind("DW_"); | 
   Int_t dwpos = filepath.rfind("/"); | 
| 55 | 
   Int_t dwpos1 = filepath.find(".root"); | 
   Int_t dwpos1 = filepath.find(".root"); | 
| 56 | 
   TString fpath=(filepath.c_str()); | 
   TString fpath=(filepath.c_str()); | 
| 57 | 
   TString base,ffile ; | 
   TString base,ffile ; | 
| 58 | 
   stringcopy(ffile,fpath,dwpos,dwpos1); | 
   stringcopy(ffile,fpath,dwpos+1,dwpos1); | 
| 59 | 
   stringcopy(base,fpath,0,dwpos); | 
   stringcopy(base,fpath,0,dwpos); | 
| 60 | 
  | 
   if(dwpos>0) base+="/"; | 
| 61 | 
  | 
  | 
| 62 | 
   TString out; | 
   TString out; | 
| 63 | 
   if(outdir.Length()==0){ | 
   if(outdir.Length()==0){ | 
| 71 | 
   pamela::TsbTEvent  *event = 0; | 
   pamela::TsbTEvent  *event = 0; | 
| 72 | 
   pamela::TsbTRecord *record = 0; | 
   pamela::TsbTRecord *record = 0; | 
| 73 | 
   pamela::tracker::TrackerEvent *te=0; | 
   pamela::tracker::TrackerEvent *te=0; | 
| 74 | 
   pamela::EventHeader *eh=0,*aleh=0; | 
   pamela::EventHeader *eh=0,*aleh=0,*eH=0,*eT=0; | 
| 75 | 
   pamela::PscuHeader *ph=0; | 
   pamela::PscuHeader *ph=0,*pH=0; | 
| 76 | 
   pamela::TrkAlarmEvent *al=0; | 
   pamela::TrkAlarmEvent *al=0; | 
| 77 | 
  | 
   pamela::RunHeaderEvent *reh=0; | 
| 78 | 
  | 
   pamela::EventCounter *cod=0; | 
| 79 | 
  | 
  | 
| 80 | 
  | 
   pamela::PacketType *pctp=0; | 
| 81 | 
  | 
  | 
| 82 | 
   TFile *datafile = new TFile(file); | 
   TFile *datafile = new TFile(file); | 
| 83 | 
  | 
   if ( !datafile ){ | 
| 84 | 
  | 
     printf("No data file, exiting...\n"); | 
| 85 | 
  | 
     return; | 
| 86 | 
  | 
   } | 
| 87 | 
  | 
  | 
| 88 | 
   TTree *tree = (TTree*)datafile->Get("TsbT"); | 
   TTree *tree = (TTree*)datafile->Get("TsbT"); | 
| 89 | 
   tree->SetBranchAddress("TsbT",&event); | 
   tree->SetBranchAddress("TsbT",&event); | 
| 90 | 
  | 
   tree->SetBranchAddress("Header",&eT); | 
| 91 | 
  | 
  | 
| 92 | 
   TTree *altr = (TTree*)datafile->Get("TrkAlarm"); | 
   TTree *altr = (TTree*)datafile->Get("TrkAlarm"); | 
| 93 | 
   altr->SetBranchAddress("TrkAlarm",&al); | 
   altr->SetBranchAddress("TrkAlarm",&al); | 
| 97 | 
   tr->SetBranchAddress("Tracker",&te); | 
   tr->SetBranchAddress("Tracker",&te); | 
| 98 | 
   tr->SetBranchAddress("Header",&eh); | 
   tr->SetBranchAddress("Header",&eh); | 
| 99 | 
     | 
     | 
| 100 | 
  | 
   TTree *otr  = (TTree*)datafile->Get("RunHeader"); | 
| 101 | 
  | 
   otr->SetBranchAddress("Header",&eH); | 
| 102 | 
  | 
   otr->SetBranchAddress("RunHeader",&reh); | 
| 103 | 
  | 
  | 
| 104 | 
   Long64_t nevent = tr->GetEntries(); | 
   Long64_t nevent = tr->GetEntries(); | 
| 105 | 
  | 
   Long64_t neventH = otr->GetEntries(); | 
| 106 | 
   Long64_t tnevent = tree->GetEntries(); | 
   Long64_t tnevent = tree->GetEntries(); | 
| 107 | 
   Long64_t alnevent = altr->GetEntries(); | 
   Long64_t alnevent = altr->GetEntries(); | 
| 108 | 
   Int_t minevent=0; | 
   Int_t minevent=0; | 
| 109 | 
   Int_t maxevent=0;  | 
   Int_t maxevent=0;  | 
| 110 | 
  | 
  | 
| 111 | 
   printf("Number of total events: %lld\n",nevent); | 
   printf("Number of total events: %lld\n",nevent); | 
| 112 | 
  | 
   printf("Number of header events: %lld\n",neventH); | 
| 113 | 
  | 
   printf("Number of TsbT events: %lld\n",tnevent); | 
| 114 | 
  | 
   printf("Number of TrkAlarm packet events: %lld\n",alnevent); | 
| 115 | 
  | 
  | 
| 116 | 
   if (nevent<=0){ | 
   if (nevent<=0){ | 
| 117 | 
     datafile->Close(); | 
     datafile->Close(); | 
| 144 | 
     nevent=maxevent-minevent ; | 
     nevent=maxevent-minevent ; | 
| 145 | 
   } | 
   } | 
| 146 | 
  | 
  | 
| 147 | 
  | 
   // | 
| 148 | 
   if (fromevent!=0) | 
   // information about the RunHeader | 
| 149 | 
     printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); | 
   ULong64_t HOBT[neventH]; | 
| 150 | 
   else  | 
   Int_t trk_cal_us[neventH]; | 
| 151 | 
     printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); | 
   for (Int_t vi=0; vi<neventH;vi++){ | 
| 152 | 
  | 
     HOBT[vi]=0; | 
| 153 | 
  | 
     trk_cal_us[vi]=0; | 
| 154 | 
  | 
   } | 
| 155 | 
  | 
   for (Int_t ev=0; ev<neventH; ev++){ | 
| 156 | 
  | 
     otr->GetEntry(ev); | 
| 157 | 
  | 
     pH = eH->GetPscuHeader(); | 
| 158 | 
  | 
     HOBT[ev]= pH->GetOrbitalTime(); | 
| 159 | 
  | 
     trk_cal_us[ev]=reh->TRK_CALIB_USED; | 
| 160 | 
  | 
   } | 
| 161 | 
  | 
  | 
| 162 | 
   // | 
   // | 
| 163 | 
   // other variables definitions | 
   // other variables definitions | 
| 164 | 
   stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; | 
   stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; | 
 | 
   Int_t warning_dspnumber=0; | 
  | 
| 165 | 
   Int_t ALARM=0; | 
   Int_t ALARM=0; | 
| 166 | 
   Int_t WARNING[12]; | 
   Int_t WARNING[12]; | 
 | 
   const Int_t size=nevent; | 
  | 
 | 
   Int_t dsp=0; | 
  | 
 | 
   Double_t yd[size*12], yc[size*12], x[size], eventint[size]; | 
  | 
 | 
   Double_t yyc[size], hi=0, land[size*12][3], illum[size*12][3]; | 
  | 
| 167 | 
  | 
  | 
 | 
   TGraph *comprtime,*temp[5]; | 
  | 
 | 
   TGraph *eventnumb; | 
  | 
 | 
   TH1F *landau1[12],*landau2[12],*landau3[12],*illuminazione[12]; | 
  | 
 | 
   TPaveText *pt1; | 
  | 
 | 
   TPad *pt; | 
  | 
 | 
    | 
  | 
| 168 | 
   // | 
   // | 
| 169 | 
   // information about the entries for the temperatures | 
   // information about the entries for the temperatures | 
| 170 | 
   Int_t tmpSize=0,siztmp=0,maxsize=0; | 
   Int_t tmpSize=0,siztmp=0,maxsize=0; | 
| 175 | 
   } | 
   } | 
| 176 | 
   const Int_t tsize=maxsize; | 
   const Int_t tsize=maxsize; | 
| 177 | 
   Int_t tempt[tsize][5],xt[tsize], tempt_tmp[tsize]; | 
   Int_t tempt[tsize][5],xt[tsize], tempt_tmp[tsize]; | 
| 178 | 
  | 
   Int_t countnboot=1;  | 
| 179 | 
  | 
   // | 
| 180 | 
  | 
   // information about the temperatures | 
| 181 | 
  | 
   for (Int_t ev=0; ev<tnevent; ev++){ | 
| 182 | 
  | 
     tree->GetEntry(ev); | 
| 183 | 
  | 
     tmpSize = event->Records->GetEntries(); | 
| 184 | 
  | 
     for (Int_t j = 0; j < tmpSize; j++){ | 
| 185 | 
  | 
       record = (pamela::TsbTRecord*)event->Records->At(j); | 
| 186 | 
  | 
       xt[siztmp]=record->RECORD_OBT; | 
| 187 | 
  | 
       if((xt[siztmp]<xt[siztmp-1]) && siztmp>0) | 
| 188 | 
  | 
         countnboot+=1; | 
| 189 | 
  | 
        | 
| 190 | 
  | 
       for (Int_t z = 0; z < 5; z++){ | 
| 191 | 
  | 
         tempt[siztmp][z] = record->TEMPERATURES[z+1];     | 
| 192 | 
  | 
       } | 
| 193 | 
  | 
       siztmp++; | 
| 194 | 
  | 
     } | 
| 195 | 
  | 
   } | 
| 196 | 
  | 
   countnboot+=2*(Int_t)nevent/MAXSTORAGE; | 
| 197 | 
  | 
   //   printf("\ncountnboot=%d\n",countnboot); | 
| 198 | 
    | 
    | 
| 199 | 
   // | 
   // | 
| 200 | 
   // open the output text files for the alarms  | 
   // open the output text files for the alarms | 
| 201 | 
   ofstream warning(out + "warning.txt",ios::out); | 
   TString fname1 = out+ffile;  | 
| 202 | 
   TString fname = out+ffile; | 
   TString fname = out+ffile; | 
 | 
   TString fname1 = out+ffile; | 
  | 
| 203 | 
   int slen=fname.Length(); | 
   int slen=fname.Length(); | 
| 204 | 
   int last=fname.Last('_'); | 
   int last=fname.Last('_'); | 
| 205 | 
   if(last<(slen-1))fname.Append('_');    | 
   if(last<(slen-1))fname.Append('_');    | 
| 206 | 
   fname.Append("Trk-ALARM-report.txt"); | 
   fname.Append("FTrk-DSP-report.txt"); | 
| 207 | 
   ofstream alarm(fname,ios::out); | 
   ofstream alarm(fname,ios::out); | 
| 208 | 
   alarm << "TRACKER ALARM REPORT - Downlink " << ffile<< endl; | 
   alarm << "TRACKER DSP REPORT - Downlink " << ffile<< endl; | 
| 209 | 
   fname1.Append("_TrkAlarm-pkt-report.txt"); | 
   fname1.Append("_FTrkAlarm-pkt-report.txt"); | 
| 210 | 
   ofstream alarm1(fname1,ios::out); | 
   ofstream alarm1(fname1,ios::out); | 
| 211 | 
   alarm1 << "TrkAlarm pkt REPORT - Downlink " << ffile<< endl; | 
   alarm1 << "TrkAlarm pkt REPORT - Downlink " << ffile<< endl; | 
| 212 | 
  | 
  | 
| 214 | 
   // write the file for the TrkAlarm packet | 
   // write the file for the TrkAlarm packet | 
| 215 | 
   if(alnevent==0) alarm1 <<endl<< "------>  NO ALARM!!! <-------"<< endl; | 
   if(alnevent==0) alarm1 <<endl<< "------>  NO ALARM!!! <-------"<< endl; | 
| 216 | 
   else{ | 
   else{ | 
| 217 | 
  | 
     Long64_t obt=0; | 
| 218 | 
     for (Int_t ev=0; ev<alnevent; ev++){ | 
     for (Int_t ev=0; ev<alnevent; ev++){ | 
| 219 | 
       altr->GetEntry(ev); | 
       altr->GetEntry(ev); | 
| 220 | 
       ph = aleh->GetPscuHeader(); | 
       ph = aleh->GetPscuHeader(); | 
| 221 | 
  | 
  | 
| 222 | 
  | 
       if(ph->GetOrbitalTime()<obt && ev>0) | 
| 223 | 
  | 
         alarm1<<endl<<"NEW CPU BOOT"<<endl; | 
| 224 | 
  | 
       obt=ph->GetOrbitalTime(); | 
| 225 | 
  | 
          | 
| 226 | 
       alarm1 << "================================================="<< endl; | 
       alarm1 << "================================================="<< endl; | 
| 227 | 
       alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; | 
       alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; | 
| 228 | 
       alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; | 
       alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; | 
| 229 | 
       alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; | 
       alarm1 << "(ROOT-tree entry "<<ev<<")"<<endl; | 
| 230 | 
       alarm1 << "================================================="<< endl; | 
       alarm1 << "================================================="<< endl<<endl; | 
| 231 | 
      | 
          | 
| 232 | 
       alarm1 << " ALARM[1]= "<<(Int_t)al->ALARM[1]<<endl; | 
       alarm1 << "Alarm variables (range 0-1)"<<endl; | 
| 233 | 
       alarm1 << " ALARM[2]= "<<(Int_t)al->ALARM[2]<<endl; | 
       alarm1 << " ALARM[1]= 0x"<< hex << (Int_t)al->ALARM[1]<<endl; | 
| 234 | 
       alarm1 << " Aswr= "<<(Int_t)al->Aswr<<endl; | 
       alarm1 << " ALARM[2]= 0x"<< (Int_t)al->ALARM[2]<<endl; | 
| 235 | 
       alarm1 << " BID[1]= "<<(Int_t)al->BID[0]<<endl; | 
       alarm1 << " CmdDuringTrig= 0x"<< (Int_t)al->CmdDuringTrig<<endl; | 
| 236 | 
       alarm1 << " BID[2]= "<<(Int_t)al->BID[1]<<endl; | 
       alarm1 << " FinalCheck= 0x"<< (Int_t)al->FinalCheck<<endl; | 
| 237 | 
       alarm1 << " BID[3]= "<<(Int_t)al->BID[2]<<endl; | 
       alarm1 << " FlashData= 0x"<< (Int_t)al->FlashData<<endl; | 
| 238 | 
       alarm1 << " BID[4]= "<<(Int_t)al->BID[3]<<endl; | 
       alarm1 << " FlashShutdown= 0x"<< (Int_t)al->FlashShutdown<<endl; | 
| 239 | 
       alarm1 << " BID[5]= "<<(Int_t)al->BID[4]<<endl; | 
       alarm1 << " FlashUpset= 0x"<< (Int_t)al->FlashUpset<<endl; | 
| 240 | 
       alarm1 << " BID[6]= "<<(Int_t)al->BID[5]<<endl; | 
       alarm1 << " InterCheck= 0x"<< (Int_t)al->InterCheck<<endl; | 
| 241 | 
       alarm1 << " BID[7]= "<<(Int_t)al->BID[6]<<endl; | 
       alarm1 << " UnknownCmd= 0x"<<(Int_t)al->UnknownCmd<<endl<<endl; | 
| 242 | 
       alarm1 << " CmdDuringTrig= "<<(Int_t)al->CmdDuringTrig<<endl; | 
  | 
| 243 | 
       alarm1 << " CmdIDMA= "<<(Int_t)al->CmdIDMA<<endl; | 
       alarm1 << "Alarm variables (range 0-3F)"<<endl; | 
| 244 | 
       alarm1 << " CmdNum= "<<(Int_t)al->CmdNum<<endl; | 
       alarm1 << " CmdIDMA= 0x"<< (Int_t)al->CmdIDMA<<endl; | 
| 245 | 
       alarm1 << " DSPBusy= "<<(Int_t)al->DSPBusy<<endl; | 
       alarm1 << " DSPSoft= 0x"<< (Int_t)al->DSPSoft<<endl; | 
| 246 | 
       alarm1 << " DSPMask= "<<(Int_t)al->DSPMask<<endl; | 
       alarm1 << " TrigIDMA= 0x"<< (Int_t)al->TrigIDMA<<endl<<endl; | 
| 247 | 
       alarm1 << " DSPSoft= "<<(Int_t)al->DSPSoft<<endl; | 
        | 
| 248 | 
       alarm1 << " FinalCheck= "<<(Int_t)al->FinalCheck<<endl; | 
       alarm1 << "Control variables (range 0-3F)"<<endl; | 
| 249 | 
       alarm1 << " FlashData= "<<(Int_t)al->FlashData<<endl; | 
       alarm1 << " DSPBusy= 0x"<< (Int_t)al->DSPBusy<<endl; | 
| 250 | 
       alarm1 << " FlashOn= "<<(Int_t)al->FlashOn<<endl; | 
       alarm1 << " DSPMask= 0x"<< (Int_t)al->DSPMask<<endl<<endl; | 
| 251 | 
       alarm1 << " FlashShutdown= "<<(Int_t)al->FlashShutdown<<endl; | 
  | 
| 252 | 
       alarm1 << " FlashUpset= "<<(Int_t)al->FlashUpset<<endl; | 
       alarm1 << "Control variables (range 0-1)"<<endl; | 
| 253 | 
       alarm1 << " InterCheck= "<<(Int_t)al->InterCheck<<endl; | 
       alarm1 << " FlashOn= 0x"<< (Int_t)al->FlashOn<<endl<<endl; | 
| 254 | 
       alarm1 << " PNum= "<<(Int_t)al->PNum<<endl; | 
  | 
| 255 | 
       alarm1 << " TrigIDMA= "<<(Int_t)al->TrigIDMA<<endl; | 
       alarm1 << "Control variables (range 0-3)"<<endl; | 
| 256 | 
       alarm1 << " TrigMask= "<<(Int_t)al->TrigMask<<endl; | 
       alarm1 << " TrigMask= 0x"<< (Int_t)al->TrigMask<<endl<<endl; | 
| 257 | 
       alarm1 << " UnknownCmd= "<<(Int_t)al->UnknownCmd<<endl; | 
  | 
| 258 | 
  | 
       alarm1 << "Control bits fixed"<<endl; | 
| 259 | 
  | 
       alarm1 << " Aswr= 0x"<< (Int_t)al->Aswr<<endl; | 
| 260 | 
  | 
       alarm1 << " BID[1]= 0x"<< (Int_t)al->BID[0]<<endl; | 
| 261 | 
  | 
       alarm1 << " BID[2]= 0x"<< (Int_t)al->BID[1]<<endl; | 
| 262 | 
  | 
       alarm1 << " BID[3]= 0x"<< (Int_t)al->BID[2]<<endl; | 
| 263 | 
  | 
       alarm1 << " BID[4]= 0x"<< (Int_t)al->BID[3]<<endl; | 
| 264 | 
  | 
       alarm1 << " BID[5]= 0x"<< (Int_t)al->BID[4]<<endl; | 
| 265 | 
  | 
       alarm1 << " BID[6]= 0x"<< (Int_t)al->BID[5]<<endl; | 
| 266 | 
  | 
       alarm1 << " BID[7]= 0x"<< (Int_t)al->BID[6]<<endl; | 
| 267 | 
  | 
       alarm1 << " CmdNum= 0x"<< (Int_t)al->CmdNum<<endl; | 
| 268 | 
  | 
       alarm1 << " PNum= 0x"<< (Int_t)al->PNum<< dec <<endl; | 
| 269 | 
  | 
  | 
| 270 | 
  | 
       alarm1 << "================================================="<< endl<<endl; | 
| 271 | 
  | 
        | 
| 272 | 
     } | 
     } | 
| 273 | 
   } | 
   } | 
| 274 | 
  | 
  | 
| 275 | 
  | 
   // | 
| 276 | 
  | 
   // Set Style options | 
| 277 | 
  | 
   gStyle->SetLabelSize(0.05,"x"); | 
| 278 | 
  | 
   gStyle->SetLabelSize(0.06,"y"); | 
| 279 | 
  | 
   gStyle->SetStatFontSize(0.075); | 
| 280 | 
  | 
   gStyle->SetOptStat(1110); | 
| 281 | 
  | 
   gStyle->SetFillColor(10);   | 
| 282 | 
  | 
   gStyle->SetStatColor(10); | 
| 283 | 
  | 
   gStyle->SetTitleFillColor(10);   | 
| 284 | 
  | 
   gStyle->SetTitleFontSize(0.1); | 
| 285 | 
  | 
   gStyle->SetTitleOffset(0.8,"y"); | 
| 286 | 
  | 
   gStyle->SetTitleOffset(0.9,"x"); | 
| 287 | 
  | 
   gStyle->SetTitleSize(0.06,"y"); | 
| 288 | 
  | 
   gStyle->SetTitleSize(0.055,"x"); | 
| 289 | 
  | 
  | 
| 290 | 
  | 
   // | 
| 291 | 
  | 
   // Define output canvas, histos and graphs | 
| 292 | 
  | 
   TCanvas *CompTimeCanv[countnboot],*EventNumCanv[countnboot],*TempCanv[countnboot]; | 
| 293 | 
  | 
   TCanvas *IlluminaCanv,*LandauCanv1,*LandauCanv2,*LandauCanv3; | 
| 294 | 
  | 
  | 
| 295 | 
  | 
   TH1F *landau1[12],*landau2[12],*landau3[12],*illuminazione[12]; | 
| 296 | 
  | 
   TGraph *comprtime[12][countnboot],*temp[5][countnboot],*eventnumb[countnboot]; | 
| 297 | 
  | 
   TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5];  | 
| 298 | 
  | 
   | 
| 299 | 
  | 
   for(Int_t n = 0; n<12; n++) { | 
| 300 | 
  | 
  | 
| 301 | 
  | 
     /* -----------> HISTOGRAMS          */ | 
| 302 | 
  | 
   | 
| 303 | 
  | 
     tit<<"DSP "<<n+1; | 
| 304 | 
  | 
     oss1<<"DSP  "<<n+1; | 
| 305 | 
  | 
     oss2<<"DSPh  "<<n+1; | 
| 306 | 
  | 
     oss3<<"DSP h "<<n+1; | 
| 307 | 
  | 
     oss4<<"DSP   h"<<n+1; | 
| 308 | 
  | 
       | 
| 309 | 
  | 
     landau1[n]= new TH1F(oss1.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); | 
| 310 | 
  | 
     landau2[n]= new TH1F(oss2.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); | 
| 311 | 
  | 
     landau3[n]= new TH1F(oss3.str().c_str(),tit.str().c_str(),401,-0.5,1200.5); | 
| 312 | 
  | 
  | 
| 313 | 
  | 
     illuminazione[n]= new TH1F(oss4.str().c_str(),tit.str().c_str(),3073,-0.5,3072.5); | 
| 314 | 
  | 
  | 
| 315 | 
  | 
     tit.str(""); | 
| 316 | 
  | 
     oss1.str(""); | 
| 317 | 
  | 
     oss2.str(""); | 
| 318 | 
  | 
     oss3.str(""); | 
| 319 | 
  | 
     oss4.str(""); | 
| 320 | 
  | 
   };             | 
| 321 | 
  | 
     | 
| 322 | 
  | 
  | 
| 323 | 
   //*************************************************************************************** | 
   //*************************************************************************************** | 
| 324 | 
   // LOOP on each event | 
   // LOOP on each event | 
| 325 | 
   //*************************************************************************************** | 
   //*************************************************************************************** | 
| 326 | 
  | 
  | 
| 327 | 
  | 
   if (fromevent!=0) | 
| 328 | 
  | 
     printf("\n Scan of events from %i to %i ... \n",minevent,maxevent-1); | 
| 329 | 
  | 
   else  | 
| 330 | 
  | 
     printf("\n Scan of events from %i to %i ... \n",minevent+1,maxevent); | 
| 331 | 
  | 
    | 
| 332 | 
  | 
   TLatex *t=new TLatex(); | 
| 333 | 
  | 
   TLatex *t1=new TLatex(); | 
| 334 | 
  | 
  | 
| 335 | 
  | 
   Int_t cntpgtemp=0,cntpgdat=0; | 
| 336 | 
  | 
   Int_t minev=minevent,maxev=maxevent,countTEMP=0; | 
| 337 | 
  | 
  | 
| 338 | 
   // | 
   // | 
| 339 | 
   // information about the temperatures | 
   // Fill temperature graphs | 
| 340 | 
   for (Int_t ev=0; ev<tnevent; ev++){ | 
   for(Int_t ii=0; ii<countnboot;ii++){ | 
| 341 | 
     tree->GetEntry(ev); | 
     //**************************************************************************************** | 
| 342 | 
     tmpSize = event->Records->GetEntries(); | 
     //Temperature Output Pages | 
| 343 | 
     for (Int_t j = 0; j < tmpSize; j++){ | 
     //**************************************************************************************** | 
| 344 | 
       record = (pamela::TsbTRecord*)event->Records->At(j); | 
     fromfile.str(""); | 
| 345 | 
       xt[siztmp]=record->RECORD_OBT;  //0.051*record->RECORD_OBT;    | 
     fromfile<<"FTrkQLook_EXPERT      File: "<<ffile; | 
| 346 | 
       for (Int_t z = 0; z < 5; z++){ | 
     isfile<<"Temperatures vs OBT   pag"<<ii+1; | 
| 347 | 
         tempt[siztmp][z] = record->TEMPERATURES[z+1];     | 
     TempCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); | 
| 348 | 
  | 
     TempCanv[ii]->SetFillColor(10); | 
| 349 | 
  | 
     TempCanv[ii]->Range(0,0,100,100); | 
| 350 | 
  | 
  | 
| 351 | 
  | 
     t->SetTextFont(32); | 
| 352 | 
  | 
     t->SetTextColor(1); | 
| 353 | 
  | 
     t->SetTextAlign(12); | 
| 354 | 
  | 
     t->SetTextSize(0.02); | 
| 355 | 
  | 
     t->DrawLatex(2.,98.7,fromfile.str().c_str()); | 
| 356 | 
  | 
     t1->SetTextFont(32); | 
| 357 | 
  | 
     t1->SetTextColor(1); | 
| 358 | 
  | 
     t1->SetTextAlign(12); | 
| 359 | 
  | 
     t1->SetTextSize(0.02); | 
| 360 | 
  | 
     t1->DrawLatex(78.,98.7,isfile.str().c_str()); | 
| 361 | 
  | 
     isfile.str(""); | 
| 362 | 
  | 
    | 
| 363 | 
  | 
     Float_t tposy = 0.95;    // up y-coord - top pads | 
| 364 | 
  | 
     Float_t thpad = 0;   // pad height | 
| 365 | 
  | 
     Float_t tposx1=0;          // left  x-coord - pad column | 
| 366 | 
  | 
     Float_t tposx0=0;          //       x-coord - column division | 
| 367 | 
  | 
     Float_t twrel = 0;     // relative x size of first sub-column | 
| 368 | 
  | 
     Float_t tmarg = 0.004;   // margin among pads | 
| 369 | 
  | 
     | 
| 370 | 
  | 
     thpad = (tposy-tmarg*5)/3; | 
| 371 | 
  | 
     twrel = (1-tmarg*4)/2; | 
| 372 | 
  | 
      | 
| 373 | 
  | 
     for(Int_t i=0; i<5; i++){ | 
| 374 | 
  | 
       if ( (i+1)%2==1 ) { | 
| 375 | 
  | 
         if(i>1) tposy = tposy-(tmarg*2+thpad); | 
| 376 | 
  | 
         tposx1 = tmarg; | 
| 377 | 
  | 
         tposx0 = tposx1 + twrel; | 
| 378 | 
       } | 
       } | 
| 379 | 
       siztmp++; | 
       else { | 
| 380 | 
  | 
         tposx1 = tposx0 + 2*tmarg; | 
| 381 | 
  | 
         tposx0 = tposx1 + twrel; | 
| 382 | 
  | 
       } | 
| 383 | 
  | 
       | 
| 384 | 
  | 
       /* -----------> pad for histograms  */ | 
| 385 | 
  | 
       pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); | 
| 386 | 
  | 
  | 
| 387 | 
  | 
       Int_t v=0,xt_tmp[tsize]; | 
| 388 | 
  | 
       for (Int_t ev=countTEMP; ev<tsize; ev++){ | 
| 389 | 
  | 
         | 
| 390 | 
  | 
         if(ev==tsize-1 && i==4) countTEMP=tsize-1; | 
| 391 | 
  | 
         if(xt[ev]<xt[ev-1] && ev>countTEMP){ | 
| 392 | 
  | 
           if(i==4) countTEMP=ev; | 
| 393 | 
  | 
           break; | 
| 394 | 
  | 
         } | 
| 395 | 
  | 
         else{ | 
| 396 | 
  | 
           if(tempt[ev][i]!=65535){ | 
| 397 | 
  | 
             tempt_tmp[v]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); | 
| 398 | 
  | 
             if(tempt_tmp[v]>0) xt_tmp[v++]=xt[ev]; | 
| 399 | 
  | 
           } | 
| 400 | 
  | 
         } | 
| 401 | 
  | 
       } | 
| 402 | 
  | 
       TempCanv[ii]->cd(); | 
| 403 | 
  | 
       tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; | 
| 404 | 
  | 
       pad6[i]->SetFillColor(10); | 
| 405 | 
  | 
       pad6[i]->Draw(); | 
| 406 | 
  | 
       pad6[i]->cd(); | 
| 407 | 
  | 
       temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); | 
| 408 | 
  | 
       temp[i][ii]->SetTitle(tit.str().c_str()); | 
| 409 | 
  | 
       temp[i][ii]->GetXaxis()->SetLabelSize(0.04); | 
| 410 | 
  | 
       temp[i][ii]->GetXaxis()->SetTitleSize(0.04); | 
| 411 | 
  | 
       temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); | 
| 412 | 
  | 
       temp[i][ii]->GetXaxis()->CenterTitle(); | 
| 413 | 
  | 
       temp[i][ii]->GetXaxis()->SetTitleOffset(0.85); | 
| 414 | 
  | 
       temp[i][ii]->GetYaxis()->SetTitleOffset(1.2); | 
| 415 | 
  | 
       temp[i][ii]->GetYaxis()->SetLabelOffset(0.001); | 
| 416 | 
  | 
       temp[i][ii]->GetYaxis()->SetLabelSize(0.04); | 
| 417 | 
  | 
       temp[i][ii]->GetYaxis()->SetTitleSize(0.04); | 
| 418 | 
  | 
       temp[i][ii]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); | 
| 419 | 
  | 
       temp[i][ii]->GetYaxis()->CenterTitle(); | 
| 420 | 
  | 
       temp[i][ii]->SetMarkerStyle(21); | 
| 421 | 
  | 
       temp[i][ii]->SetMarkerSize(0.2); | 
| 422 | 
  | 
       temp[i][ii]->Draw("ap"); | 
| 423 | 
  | 
       tit.str(""); | 
| 424 | 
  | 
       TempCanv[ii]->Update(); | 
| 425 | 
  | 
        | 
| 426 | 
  | 
     } | 
| 427 | 
  | 
     if(countTEMP==tsize-1){ | 
| 428 | 
  | 
       cntpgtemp=ii+1; | 
| 429 | 
  | 
       break; | 
| 430 | 
     } | 
     } | 
| 431 | 
   } | 
   } | 
| 432 | 
  | 
  | 
| 433 | 
  | 
  | 
| 434 | 
   // | 
   // | 
| 435 | 
   // information about the tracker data | 
   // Fill compressiontime and eventnumber graphs and DSP warnings | 
| 436 | 
   for (Int_t ev=minevent; ev<maxevent; ev++){ | 
   for(Int_t ii=0; ii<countnboot;ii++){ | 
| 437 | 
     tr->GetEntry(ev); | 
     TPaveText *pt1; | 
| 438 | 
     ph = eh->GetPscuHeader(); | 
     TPad *pt,*pt0;         //pad for histos | 
| 439 | 
     dsp=0; | 
    | 
| 440 | 
     ALARM=0; | 
     ofstream warning(out + "warning.txt",ios::out); | 
| 441 | 
     for(Int_t i=0; i<12; i++){ | 
  | 
| 442 | 
       dsp=te->DSPnumber[i]-1; | 
     //**************************************************************************************** | 
| 443 | 
       yd[(ev-minevent)*12+dsp]= te->DATAlength[i]; | 
     //COMPRESSIONTIME vs. OBT Output Pages | 
| 444 | 
       yc[(ev-minevent)*12+dsp]= 0.051*te->compressiontime[i]; | 
     //**************************************************************************************** | 
| 445 | 
       for(Int_t j=0;j<3;j++){ | 
     fromfile.str(""); | 
| 446 | 
         illum[(ev-minevent)*12+dsp][j]=te->addrcluster[i][j]; | 
     fromfile<<"FTrkQLook_EXPERT      File: "<<ffile; | 
| 447 | 
         if(!(dsp%2)&&(te->signcluster[i][j])!=0) | 
     isfile<<"COMPRESSIONTIME vs. OBT   pag"<<ii+1; | 
| 448 | 
           land[(ev-minevent)*12+dsp][j]=1024-(te->signcluster[i][j]); | 
     CompTimeCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); | 
| 449 | 
         else land[(ev-minevent)*12+dsp][j]=te->signcluster[i][j]; | 
     CompTimeCanv[ii]->SetFillColor(10); | 
| 450 | 
  | 
     CompTimeCanv[ii]->Range(0,0,100,100); | 
| 451 | 
  | 
     t->SetTextFont(32); | 
| 452 | 
  | 
     t->SetTextColor(1); | 
| 453 | 
  | 
     t->SetTextAlign(12); | 
| 454 | 
  | 
     t->SetTextSize(0.02); | 
| 455 | 
  | 
     t->DrawLatex(2.,98.7,fromfile.str().c_str()); | 
| 456 | 
  | 
     t1->SetTextFont(32); | 
| 457 | 
  | 
     t1->SetTextColor(1); | 
| 458 | 
  | 
     t1->SetTextAlign(12); | 
| 459 | 
  | 
     t1->SetTextSize(0.02); | 
| 460 | 
  | 
     t1->DrawLatex(62.,98.7,isfile.str().c_str()); | 
| 461 | 
  | 
     isfile.str(""); | 
| 462 | 
  | 
  | 
| 463 | 
  | 
     //**************************************************************************************** | 
| 464 | 
  | 
     //DSP EVENT NUMBER Output Pages | 
| 465 | 
  | 
     //**************************************************************************************** | 
| 466 | 
  | 
  | 
| 467 | 
  | 
     isfile<<"WARNINGS on DSP EVENT NUMBER   pag"<<ii+1; | 
| 468 | 
  | 
     EventNumCanv[ii]=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); | 
| 469 | 
  | 
     EventNumCanv[ii]->SetFillColor(10); | 
| 470 | 
  | 
     EventNumCanv[ii]->Range(0,0,100,100); | 
| 471 | 
  | 
     t->SetTextFont(32); | 
| 472 | 
  | 
     t->SetTextColor(1); | 
| 473 | 
  | 
     t->SetTextAlign(12); | 
| 474 | 
  | 
     t->SetTextSize(0.02); | 
| 475 | 
  | 
     t->DrawLatex(2.,98.7,fromfile.str().c_str()); | 
| 476 | 
  | 
     t1->SetTextFont(32); | 
| 477 | 
  | 
     t1->SetTextColor(1); | 
| 478 | 
  | 
     t1->SetTextAlign(12); | 
| 479 | 
  | 
     t1->SetTextSize(0.02); | 
| 480 | 
  | 
     t1->DrawLatex(65.,98.7,isfile.str().c_str()); | 
| 481 | 
  | 
     isfile.str(""); | 
| 482 | 
  | 
  | 
| 483 | 
  | 
     Float_t posy = 0.95;    // up y-coord - top pads | 
| 484 | 
  | 
     Float_t hpad = 0;   // pad height | 
| 485 | 
  | 
     Float_t posx1=0;          // left  x-coord - pad column | 
| 486 | 
  | 
     Float_t posx0=0;          //       x-coord - column division | 
| 487 | 
  | 
     Float_t wrel = 0;     // relative x size of first sub-column | 
| 488 | 
  | 
     Float_t marg = 0.004;   // margin among pads | 
| 489 | 
  | 
     | 
| 490 | 
  | 
     hpad = (posy-marg*11)/6; | 
| 491 | 
  | 
     wrel = (1-marg*4)/2; | 
| 492 | 
  | 
     | 
| 493 | 
  | 
     for(Int_t n = 0; n<12; n++) { | 
| 494 | 
  | 
       | 
| 495 | 
  | 
       if ( (n+1)%2==1 ) { | 
| 496 | 
  | 
         if(n>1) posy = posy-(marg*2+hpad); | 
| 497 | 
  | 
         posx1 = marg; | 
| 498 | 
  | 
         posx0 = posx1 + wrel; | 
| 499 | 
       } | 
       } | 
| 500 | 
       x[(ev-minevent)]= ph->GetOrbitalTime(); | 
       else { | 
| 501 | 
         | 
         posx1 = posx0 + 2*marg; | 
| 502 | 
       WARNING[i]=0; | 
         posx0 = posx1 + wrel; | 
| 503 | 
       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){ | 
       }      | 
| 504 | 
         ALARM = 1;      //general alarm | 
       | 
| 505 | 
         WARNING[i] = 1; // DSP warning | 
       /* -----------> pad for histograms  */ | 
| 506 | 
       }; | 
       pad1[n] = new TPad("pad1"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
| 507 | 
  | 
       pad2[n] = new TPad("pad2"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
| 508 | 
       if(te->alarm[i]!=0){ // hardware alarm | 
       pad3[n] = new TPad("pad3"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
| 509 | 
         ALARM = 1; | 
       pad4[n] = new TPad("pad4"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
| 510 | 
       }; | 
       pad5[n] = new TPad("pad5"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
| 511 | 
  | 
     } | 
| 512 | 
  | 
     | 
| 513 | 
  | 
     // | 
| 514 | 
  | 
     // Obtain information about the tracker data | 
| 515 | 
  | 
     // and fill graphs and histos | 
| 516 | 
  | 
     Int_t warning_dspnumber=0,al=0; | 
| 517 | 
  | 
     Float_t x[MAXSTORAGE]; | 
| 518 | 
  | 
     Float_t yc[MAXSTORAGE][12]; | 
| 519 | 
  | 
     Float_t eventint[MAXSTORAGE]; | 
| 520 | 
  | 
     | 
| 521 | 
  | 
     for (Int_t ev=minev; ev<maxevent; ev++){ | 
| 522 | 
  | 
       tr->GetEntry(ev); | 
| 523 | 
  | 
       ph = eh->GetPscuHeader(); | 
| 524 | 
  | 
       cod = eh->GetCounter(); | 
| 525 | 
  | 
       | 
| 526 | 
  | 
       if(ev==maxevent-1) maxev=maxevent-1; | 
| 527 | 
  | 
  | 
| 528 | 
  | 
       if((ph->GetOrbitalTime()<x[ev-minev-1] && ev-minev!=0) || ev-minev==MAXSTORAGE){ | 
| 529 | 
  | 
         maxev=ev; | 
| 530 | 
  | 
         break; | 
| 531 | 
  | 
       } | 
| 532 | 
  | 
       else{ | 
| 533 | 
  | 
         x[(ev-minev)]= ph->GetOrbitalTime(); | 
| 534 | 
  | 
         ALARM=0; | 
| 535 | 
  | 
          | 
| 536 | 
  | 
         Int_t dsp=0; | 
| 537 | 
  | 
         for(Int_t i=0; i<12; i++){ | 
| 538 | 
  | 
           dsp=te->DSPnumber[i]-1; | 
| 539 | 
  | 
           yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; | 
| 540 | 
  | 
            | 
| 541 | 
  | 
           // | 
| 542 | 
  | 
           // Fill Cluster Signal and Lighting of the view histos | 
| 543 | 
  | 
           for(Int_t j=0;j<3;j++){ | 
| 544 | 
  | 
             if(te->signcluster[i][j]!=0){ | 
| 545 | 
  | 
               if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ | 
| 546 | 
  | 
                 illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); | 
| 547 | 
  | 
               } | 
| 548 | 
  | 
             } | 
| 549 | 
  | 
           } | 
| 550 | 
  | 
           if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ | 
| 551 | 
  | 
             if(!(dsp%2)){ | 
| 552 | 
  | 
               if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); | 
| 553 | 
  | 
               if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); | 
| 554 | 
  | 
               if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); | 
| 555 | 
  | 
             } | 
| 556 | 
  | 
             else{ | 
| 557 | 
  | 
               if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); | 
| 558 | 
  | 
               if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); | 
| 559 | 
  | 
               if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); | 
| 560 | 
  | 
             } | 
| 561 | 
  | 
           } | 
| 562 | 
  | 
  | 
| 563 | 
  | 
           WARNING[i]=0; | 
| 564 | 
  | 
           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){ | 
| 565 | 
  | 
             ALARM = 1;      //general alarm | 
| 566 | 
  | 
             al=1; | 
| 567 | 
  | 
             WARNING[i] = 1; // DSP warning | 
| 568 | 
  | 
           }; | 
| 569 | 
  | 
  | 
| 570 | 
  | 
           if(te->alarm[i]!=0){ // hardware alarm | 
| 571 | 
  | 
             ALARM = 1; | 
| 572 | 
  | 
             al=1; | 
| 573 | 
  | 
           }; | 
| 574 | 
        | 
        | 
| 575 | 
       //************************************************************************************** | 
           //************************************************************************************** | 
| 576 | 
       // warning for internal number | 
           // warning for internal number | 
| 577 | 
       //************************************************************************************** | 
           //************************************************************************************** | 
| 578 | 
       if(i<=10){ | 
           if(i<=10){ | 
| 579 | 
         if(te->eventn[i]!=te->eventn[i+1]){ | 
             if(te->eventn[i]!=te->eventn[i+1]){ | 
| 580 | 
           warning_dspnumber++; | 
               warning_dspnumber++; | 
| 581 | 
           warning<< "==> WARNING!!    Check entry "<< ev<<" (DSP "<<dsp<<")" <<endl<<  | 
               warning<< "==> WARNING!!    Check entry "<< ev<<" (DSP "<<dsp<<")" <<endl<<  | 
| 582 | 
                     "eventn["<<i<<"]= "<<te->eventn[i]<<"!= eventn["<<i+1<<"]= "<< te->eventn[i+1]<<endl; | 
                 "eventn["<<i<<"]= "<<te->eventn[i]<<"!= eventn["<<i+1<<"]= "<< te->eventn[i+1]<<endl; | 
| 583 | 
  | 
             } | 
| 584 | 
  | 
             else  | 
| 585 | 
  | 
               eventint[(ev-minev)]=te->eventn[0]; | 
| 586 | 
  | 
           } | 
| 587 | 
         } | 
         } | 
 | 
         else  | 
  | 
 | 
           eventint[(ev-minevent)]=te->eventn[0]; | 
  | 
 | 
       } | 
  | 
 | 
      } | 
  | 
| 588 | 
  | 
  | 
| 589 | 
     if(ev<=maxevent-1){ | 
         if(ev<=maxevent-1){ | 
| 590 | 
  | 
  | 
| 591 | 
       if((ev-minevent)>=1 && eventint[(ev-minevent)]!=eventint[(ev-minevent)-1]+1 && eventint[(ev-minevent)]!=1){ | 
           if((ev-minev)>=1 && eventint[(ev-minev)]!=eventint[(ev-minev)-1]+1 && eventint[(ev-minev)]!=1){ | 
| 592 | 
         warning_dspnumber++; | 
             warning_dspnumber++; | 
| 593 | 
         warning<< "==> WARNING!!    Check entry "<< ev<<endl<< | 
             warning<< "==> WARNING!!    Check entry "<< ev<<endl<< | 
| 594 | 
                   " DSP event num.= "<< eventint[(ev-minevent)]<< | 
               " DSP event num.= "<< eventint[(ev-minev)]<< | 
| 595 | 
                   " is different from (previus+1) ="<<eventint[(ev-minevent)-1]+1 <<"\n"<<endl; | 
               " is different from (previus+1) ="<<eventint[(ev-minev)-1]+1 <<"\n"<<endl; | 
| 596 | 
       } | 
           } | 
| 597 | 
     }; | 
         } | 
 | 
        | 
  | 
 | 
     //******************************************************************************************** | 
  | 
 | 
     // file ALARM | 
  | 
 | 
     //******************************************************************************************** | 
  | 
 | 
     if(ALARM==1) { | 
  | 
 | 
  | 
  | 
 | 
       alarm << "================================================="<< endl; | 
  | 
 | 
       alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; | 
  | 
 | 
       alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; | 
  | 
 | 
       alarm << "(ROOT-tree entry "<<ev<<")"<<endl; | 
  | 
 | 
       alarm << "================================================="<< endl; | 
  | 
 | 
        | 
  | 
 | 
       alarm << " DSPn"; | 
  | 
 | 
       alarm << " Event"; | 
  | 
 | 
       alarm << " Words"; | 
  | 
 | 
       alarm << " crc"; | 
  | 
 | 
       alarm << "  FC"; | 
  | 
 | 
       alarm << " FL1"; | 
  | 
 | 
       alarm << " FL2"; | 
  | 
 | 
       alarm << " FL3"; | 
  | 
 | 
       alarm << " FL4"; | 
  | 
 | 
       alarm << " FL5"; | 
  | 
 | 
       alarm << " FL6" << endl; | 
  | 
| 598 | 
        | 
        | 
| 599 | 
       for(Int_t i=0; i<12 ; i++){ | 
         //******************************************************************************************** | 
| 600 | 
         alarm.width(5); alarm << te->DSPnumber[i]; | 
         // file DSP warning | 
| 601 | 
         alarm.width(6); alarm << te->eventn[i]; | 
         //******************************************************************************************** | 
| 602 | 
         alarm.width(6); alarm << te->DATAlength[i]; | 
  | 
| 603 | 
         alarm.width(4); alarm << te->crc[i]; | 
         if(ALARM==1) {   | 
| 604 | 
         alarm.width(4); alarm << te->fc[i]; | 
           alarm <<endl<< "================================================="<< endl; | 
| 605 | 
         alarm.width(4); alarm << te->fl1[i]; | 
           alarm << "PSCU-Pkt N. "<< ph->GetCounter() ; | 
| 606 | 
         alarm.width(4); alarm << te->fl2[i]; | 
           alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<<endl; | 
| 607 | 
         alarm.width(4); alarm << te->fl3[i]; | 
           alarm << "(ROOT-tree entry "<<ev<<" in page "<<ii+1<<" )"<<endl; | 
| 608 | 
         alarm.width(4); alarm << te->fl4[i]; | 
           alarm << "================================================="<< endl; | 
| 609 | 
         alarm.width(4); alarm << te->fl5[i]; | 
            | 
| 610 | 
         alarm.width(4); alarm << te->fl6[i]; | 
           alarm << " DSPn"; | 
| 611 | 
         if(te->alarm[i]!=0)alarm<<" >> ALARM "; | 
           alarm << " Event"; | 
| 612 | 
         if(WARNING[i]!=0)alarm<<" (DSP warning) "; | 
           alarm << " Words"; | 
| 613 | 
         alarm    << endl; | 
           alarm << " crc"; | 
| 614 | 
  | 
           alarm << "  FC"; | 
| 615 | 
  | 
           alarm << " FL1"; | 
| 616 | 
  | 
           alarm << " FL2"; | 
| 617 | 
  | 
           alarm << " FL3"; | 
| 618 | 
  | 
           alarm << " FL4"; | 
| 619 | 
  | 
           alarm << " FL5"; | 
| 620 | 
  | 
           alarm << " FL6" << endl; | 
| 621 | 
  | 
            | 
| 622 | 
  | 
           for(Int_t i=0; i<12 ; i++){ | 
| 623 | 
  | 
             alarm.width(5); alarm << te->DSPnumber[i]; | 
| 624 | 
  | 
             alarm.width(6); alarm << te->eventn[i]; | 
| 625 | 
  | 
             alarm.width(6); alarm << te->DATAlength[i]; | 
| 626 | 
  | 
             alarm.width(4); alarm << te->crc[i]; | 
| 627 | 
  | 
             alarm.width(4); alarm << te->fc[i]; | 
| 628 | 
  | 
             alarm.width(4); alarm << te->fl1[i]; | 
| 629 | 
  | 
             alarm.width(4); alarm << te->fl2[i]; | 
| 630 | 
  | 
             alarm.width(4); alarm << te->fl3[i]; | 
| 631 | 
  | 
             alarm.width(4); alarm << te->fl4[i]; | 
| 632 | 
  | 
             alarm.width(4); alarm << te->fl5[i]; | 
| 633 | 
  | 
             alarm.width(4); alarm << te->fl6[i]; | 
| 634 | 
  | 
             if(te->alarm[i]!=0)alarm<<" >> ALARM "; | 
| 635 | 
  | 
             if(WARNING[i]!=0)alarm<<" (DSP warning) "; | 
| 636 | 
  | 
             alarm    << endl; | 
| 637 | 
  | 
           } | 
| 638 | 
  | 
         } | 
| 639 | 
       } | 
       } | 
| 640 | 
     } | 
     } | 
| 641 | 
   } | 
     if(al==0) alarm << endl<< "Page "<<ii+1<< ": ------>  NO ALARM!!! <-------"<<endl; | 
| 642 | 
   if(ALARM==0) alarm << endl<< "------>  NO ALARM!!! <-------"<<endl; | 
     if(warning_dspnumber==0) warning<<"NONE"<<endl; | 
 | 
    | 
  | 
 | 
   if(warning_dspnumber==0) warning<<"NONE"<<endl; | 
  | 
| 643 | 
  | 
  | 
| 644 | 
   //***************************************** | 
     // | 
| 645 | 
   //close all files | 
     // Draw the graphs | 
| 646 | 
   //*****************************************    | 
     for (Int_t i=0; i<12 ; i++){  | 
| 647 | 
   warning.close(); | 
       Float_t yyc[maxev-minev]; | 
| 648 | 
   alarm.close(); | 
       for (Int_t v=0; v<maxev-minev; v++){ | 
| 649 | 
   datafile->Close(); | 
         yyc[v]=yc[v][i]; | 
| 650 | 
  | 
       } | 
 | 
  | 
  | 
 | 
   gStyle->SetLabelSize(0.05,"x"); | 
  | 
 | 
   gStyle->SetLabelSize(0.06,"y"); | 
  | 
 | 
   gStyle->SetStatFontSize(0.075); | 
  | 
 | 
   gStyle->SetOptStat(1110); | 
  | 
 | 
   gStyle->SetFillColor(10);   | 
  | 
 | 
   gStyle->SetTitleFillColor(10);   | 
  | 
 | 
   gStyle->SetTitleFontSize(0.1); | 
  | 
 | 
   gStyle->SetTitleOffset(0.8,"y"); | 
  | 
 | 
   gStyle->SetTitleOffset(0.9,"x"); | 
  | 
 | 
   gStyle->SetTitleSize(0.06,"y"); | 
  | 
 | 
   gStyle->SetTitleSize(0.055,"x"); | 
  | 
| 651 | 
  | 
  | 
| 652 | 
   //**************************************************************************************** | 
       CompTimeCanv[ii]->cd(); | 
| 653 | 
   //Output figures --- First sheet: | 
       pad3[i]->SetFillColor(10); | 
| 654 | 
   //**************************************************************************************** | 
       pad3[i]->SetFrameFillColor(10); | 
| 655 | 
    | 
       pad3[i]->Draw(); | 
| 656 | 
   TCanvas *CompTimeCanv=new TCanvas("Tracker_Detector_Report_4/6","",900,1200); | 
       pad3[i]->cd(); | 
| 657 | 
   CompTimeCanv->SetFillColor(10); | 
       comprtime[i][ii]= new TGraph(maxev-minev,x,yyc); | 
| 658 | 
   CompTimeCanv->Range(0,0,100,100); | 
       oss1<<"DSP  "<<i+1; | 
| 659 | 
   fromfile<<"FTrkQLook_EXPERT      File: "<<ffile; | 
       comprtime[i][ii]->SetTitle(oss1.str().c_str()); | 
| 660 | 
   isfile<<"COMPRESSIONTIME vs. OBT"; | 
       comprtime[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); | 
| 661 | 
   TLatex *t=new TLatex(); | 
       comprtime[i][ii]->GetXaxis()->CenterTitle(); | 
| 662 | 
   t->SetTextFont(32); | 
       comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); | 
| 663 | 
   t->SetTextColor(1); | 
       comprtime[i][ii]->GetYaxis()->CenterTitle(); | 
| 664 | 
   t->SetTextAlign(12); | 
       comprtime[i][ii]->GetYaxis()->SetRangeUser(0,2); | 
| 665 | 
   t->SetTextSize(0.02); | 
       comprtime[i][ii]->Draw("ap");  | 
| 666 | 
   t->DrawLatex(2.,98.7,fromfile.str().c_str()); | 
       oss1.str("");  | 
| 667 | 
   TLatex *t1=new TLatex(); | 
       CompTimeCanv[ii]->Update(); | 
| 668 | 
   t1->SetTextFont(32); | 
     } | 
| 669 | 
   t1->SetTextColor(1); | 
     | 
| 670 | 
   t1->SetTextAlign(12); | 
     EventNumCanv[ii]->cd(); | 
| 671 | 
   t1->SetTextSize(0.02); | 
     pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); | 
| 672 | 
   t1->DrawLatex(64.,98.7,isfile.str().c_str()); | 
     pt1 = new TPaveText(0.004,0.004,0.986,0.996); | 
| 673 | 
   isfile.str(""); | 
     pt = new TPad("pt"," ",0.004,0.004,0.7,0.98,18,0,0); | 
| 674 | 
  | 
     pt1->SetFillColor(10); | 
| 675 | 
  | 
     pt1->ReadFile(out + "warning.txt"); | 
| 676 | 
  | 
     pt1->SetTextAlign(22); | 
| 677 | 
  | 
     pt1->SetTextSize(0.035); | 
| 678 | 
  | 
     pt0->SetFillColor(10); | 
| 679 | 
  | 
     pt0->SetFrameFillColor(10); | 
| 680 | 
  | 
     pt0->Draw(); | 
| 681 | 
  | 
     pt0->cd(); | 
| 682 | 
  | 
     pt1->Draw(); | 
| 683 | 
  | 
     EventNumCanv[ii]->cd(); | 
| 684 | 
  | 
     pt->SetFillColor(10); | 
| 685 | 
  | 
     pt->SetFrameFillColor(10); | 
| 686 | 
  | 
     pt->Draw(); | 
| 687 | 
  | 
     pt->cd(); | 
| 688 | 
  | 
     eventnumb[ii]=new TGraph(maxev-minev,x,eventint); | 
| 689 | 
  | 
     eventnumb[ii]->SetTitle(""); | 
| 690 | 
  | 
     eventnumb[ii]->GetXaxis()->SetLabelSize(0.03); | 
| 691 | 
  | 
     eventnumb[ii]->GetXaxis()->SetTitleSize(0.04); | 
| 692 | 
  | 
     eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); | 
| 693 | 
  | 
     eventnumb[ii]->GetXaxis()->CenterTitle(); | 
| 694 | 
  | 
     eventnumb[ii]->GetXaxis()->SetTickLength(0.01); | 
| 695 | 
  | 
     eventnumb[ii]->GetXaxis()->SetTitleOffset(1.2); | 
| 696 | 
  | 
     eventnumb[ii]->GetYaxis()->SetLabelSize(0.03); | 
| 697 | 
  | 
     eventnumb[ii]->GetYaxis()->SetTitleSize(0.04); | 
| 698 | 
  | 
     eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); | 
| 699 | 
  | 
     eventnumb[ii]->GetYaxis()->CenterTitle(); | 
| 700 | 
  | 
     eventnumb[ii]->GetYaxis()->SetTitleOffset(1.5); | 
| 701 | 
  | 
     eventnumb[ii]->SetMarkerStyle(21); | 
| 702 | 
  | 
     eventnumb[ii]->SetMarkerColor(kBlue); | 
| 703 | 
  | 
     eventnumb[ii]->SetMarkerSize(0.3); | 
| 704 | 
  | 
     eventnumb[ii]->Draw("ap"); | 
| 705 | 
  | 
     EventNumCanv[ii]->Update(); | 
| 706 | 
  | 
      | 
| 707 | 
  | 
  | 
| 708 | 
   //**************************************************************************************** | 
     warning.close(); | 
| 709 | 
   //Output figures --- Second sheet: | 
     minev=maxev; | 
| 710 | 
   //**************************************************************************************** | 
     if(maxev==maxevent-1) { | 
| 711 | 
  | 
       cntpgdat=ii+1; | 
| 712 | 
  | 
       break; | 
| 713 | 
  | 
     } | 
| 714 | 
  | 
   } | 
| 715 | 
  | 
  | 
| 716 | 
   TCanvas *EventNumCanv=new TCanvas("Tracker_Detector_Report_5/6","",900,1200); | 
   alarm.close(); | 
 | 
   EventNumCanv->SetFillColor(10); | 
  | 
 | 
   EventNumCanv->Range(0,0,100,100); | 
  | 
 | 
   isfile<<"WARNINGS on DSP EVENT NUMBER "; | 
  | 
 | 
   t->SetTextFont(32); | 
  | 
 | 
   t->SetTextColor(1); | 
  | 
 | 
   t->SetTextAlign(12); | 
  | 
 | 
   t->SetTextSize(0.02); | 
  | 
 | 
   t->DrawLatex(2.,98.7,fromfile.str().c_str()); | 
  | 
 | 
   t1->SetTextFont(32); | 
  | 
 | 
   t1->SetTextColor(1); | 
  | 
 | 
   t1->SetTextAlign(12); | 
  | 
 | 
   t1->SetTextSize(0.02); | 
  | 
 | 
   t1->DrawLatex(68.4,98.7,isfile.str().c_str()); | 
  | 
 | 
   isfile.str(""); | 
  | 
| 717 | 
  | 
  | 
| 718 | 
   //**************************************************************************************** | 
   //**************************************************************************************** | 
| 719 | 
   //Output figures --- Third sheet: | 
   //Cluster Signal ladder1 Output Pages | 
| 720 | 
   //**************************************************************************************** | 
   //**************************************************************************************** | 
| 721 | 
  | 
  | 
| 722 | 
   TCanvas *LandauCanv1=new TCanvas("Landau ladder1","",900,1200); | 
   fromfile.str(""); | 
| 723 | 
  | 
   fromfile<<"FTrkQLook_EXPERT      File: "<<ffile; | 
| 724 | 
  | 
   isfile<<"Cluster Signal ladder1"; | 
| 725 | 
  | 
   LandauCanv1=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); | 
| 726 | 
   LandauCanv1->SetFillColor(10); | 
   LandauCanv1->SetFillColor(10); | 
| 727 | 
   LandauCanv1->Range(0,0,100,100); | 
   LandauCanv1->Range(0,0,100,100); | 
 | 
   isfile<<"Landau ladder1"; | 
  | 
| 728 | 
  | 
  | 
| 729 | 
   t->SetTextFont(32); | 
   t->SetTextFont(32); | 
| 730 | 
   t->SetTextColor(1); | 
   t->SetTextColor(1); | 
| 739 | 
   isfile.str(""); | 
   isfile.str(""); | 
| 740 | 
    | 
    | 
| 741 | 
   //**************************************************************************************** | 
   //**************************************************************************************** | 
| 742 | 
   //Output figures --- Third sheet: | 
   //Cluster Signal ladder2 Output Pages  | 
| 743 | 
   //**************************************************************************************** | 
   //**************************************************************************************** | 
| 744 | 
  | 
  | 
| 745 | 
   TCanvas *LandauCanv2=new TCanvas("Landau ladder2","",900,1200); | 
   isfile<<"Cluster Signal ladder2"; | 
| 746 | 
  | 
   LandauCanv2=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); | 
| 747 | 
   LandauCanv2->SetFillColor(10); | 
   LandauCanv2->SetFillColor(10); | 
| 748 | 
   LandauCanv2->Range(0,0,100,100); | 
   LandauCanv2->Range(0,0,100,100); | 
 | 
   isfile<<"Landau ladder2"; | 
  | 
| 749 | 
  | 
  | 
| 750 | 
   t->SetTextFont(32); | 
   t->SetTextFont(32); | 
| 751 | 
   t->SetTextColor(1); | 
   t->SetTextColor(1); | 
| 760 | 
   isfile.str(""); | 
   isfile.str(""); | 
| 761 | 
  | 
  | 
| 762 | 
   //**************************************************************************************** | 
   //**************************************************************************************** | 
| 763 | 
   //Output figures --- Third sheet: | 
   //Cluster Signal ladder3 Output Pages | 
| 764 | 
   //**************************************************************************************** | 
   //**************************************************************************************** | 
| 765 | 
  | 
  | 
| 766 | 
   TCanvas *LandauCanv3=new TCanvas("Landau ladder3","",900,1200); | 
   isfile<<"Cluster Signal ladder3"; | 
| 767 | 
  | 
   LandauCanv3=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); | 
| 768 | 
   LandauCanv3->SetFillColor(10); | 
   LandauCanv3->SetFillColor(10); | 
| 769 | 
   LandauCanv3->Range(0,0,100,100); | 
   LandauCanv3->Range(0,0,100,100); | 
 | 
   isfile<<"Landau ladder3"; | 
  | 
| 770 | 
  | 
  | 
| 771 | 
   t->SetTextFont(32); | 
   t->SetTextFont(32); | 
| 772 | 
   t->SetTextColor(1); | 
   t->SetTextColor(1); | 
| 781 | 
   isfile.str(""); | 
   isfile.str(""); | 
| 782 | 
    | 
    | 
| 783 | 
   //**************************************************************************************** | 
   //**************************************************************************************** | 
| 784 | 
   //Output figures --- Fourth sheet: | 
   //Lighting of the views Output Pages | 
| 785 | 
   //**************************************************************************************** | 
   //**************************************************************************************** | 
| 786 | 
  | 
  | 
| 787 | 
   TCanvas *IlluminaCanv=new TCanvas("Illuminazione","",900,1200); | 
   isfile<<"lighting of the views"; | 
| 788 | 
  | 
   IlluminaCanv=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); | 
| 789 | 
   IlluminaCanv->SetFillColor(10); | 
   IlluminaCanv->SetFillColor(10); | 
| 790 | 
   IlluminaCanv->Range(0,0,100,100); | 
   IlluminaCanv->Range(0,0,100,100); | 
 | 
   isfile<<"lighting of the views"; | 
  | 
| 791 | 
   t->SetTextFont(32); | 
   t->SetTextFont(32); | 
| 792 | 
   t->SetTextColor(1); | 
   t->SetTextColor(1); | 
| 793 | 
   t->SetTextAlign(12); | 
   t->SetTextAlign(12); | 
| 799 | 
   t1->SetTextSize(0.02); | 
   t1->SetTextSize(0.02); | 
| 800 | 
   t1->DrawLatex(70.,98.7,isfile.str().c_str()); | 
   t1->DrawLatex(70.,98.7,isfile.str().c_str()); | 
| 801 | 
   isfile.str(""); | 
   isfile.str(""); | 
 | 
  | 
  | 
 | 
   //**************************************************************************************** | 
  | 
 | 
   //Output figures --- Fifth sheet: | 
  | 
 | 
   //**************************************************************************************** | 
  | 
 | 
   | 
  | 
 | 
   TCanvas *TempCanv=new TCanvas("Tracker_Detector_Temperaturt","",900,1200); | 
  | 
 | 
   TempCanv->SetFillColor(10); | 
  | 
 | 
   TempCanv->Range(0,0,100,100); | 
  | 
 | 
   isfile<<"Temperatures vs OBT"; | 
  | 
 | 
  | 
  | 
 | 
   t->SetTextFont(32); | 
  | 
 | 
   t->SetTextColor(1); | 
  | 
 | 
   t->SetTextAlign(12); | 
  | 
 | 
   t->SetTextSize(0.02); | 
  | 
 | 
   t->DrawLatex(2.,98.7,fromfile.str().c_str()); | 
  | 
 | 
   t1->SetTextFont(32); | 
  | 
 | 
   t1->SetTextColor(1); | 
  | 
 | 
   t1->SetTextAlign(12); | 
  | 
 | 
   t1->SetTextSize(0.02); | 
  | 
 | 
   t1->DrawLatex(80.,98.7,isfile.str().c_str()); | 
  | 
 | 
   isfile.str(""); | 
  | 
| 802 | 
    | 
    | 
| 803 | 
   //************************************************************************************* | 
   // | 
| 804 | 
   //book pads and histos | 
   // Draw the histos | 
 | 
   //*************************************************************************************** | 
  | 
 | 
  | 
  | 
 | 
   TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5];          //pad for histos | 
  | 
 | 
   Double_t posy = 0.95;    // up y-coord - top pads | 
  | 
 | 
   Double_t hpad = 0;   // pad height | 
  | 
 | 
   Double_t posx1=0;          // left  x-coord - pad column | 
  | 
 | 
   Double_t posx0=0;          //       x-coord - column division | 
  | 
 | 
   Double_t wrel = 0;     // relative x size of first sub-column | 
  | 
 | 
   Double_t marg = 0.004;   // margin among pads | 
  | 
 | 
   Double_t tposy = 0.95;    // up y-coord - top pads | 
  | 
 | 
   Double_t thpad = 0;   // pad height | 
  | 
 | 
   Double_t tposx1=0;          // left  x-coord - pad column | 
  | 
 | 
   Double_t tposx0=0;          //       x-coord - column division | 
  | 
 | 
   Double_t twrel = 0;     // relative x size of first sub-column | 
  | 
 | 
   Double_t tmarg = 0.004;   // margin among pads | 
  | 
 | 
  | 
  | 
 | 
   hpad = (posy-marg*11)/6; | 
  | 
 | 
   wrel = (1-marg*4)/2; | 
  | 
 | 
   thpad = (tposy-tmarg*5)/3; | 
  | 
 | 
   twrel = (1-tmarg*4)/2; | 
  | 
 | 
   stringstream title; | 
  | 
 | 
   stringstream hid; | 
  | 
 | 
  | 
  | 
 | 
   for(Int_t n = 0; n<12; n++) { | 
  | 
 | 
      | 
  | 
 | 
     if ( (n+1)%2==1 ) { | 
  | 
 | 
       if(n>1) posy = posy-(marg*2+hpad); | 
  | 
 | 
       posx1 = marg; | 
  | 
 | 
       posx0 = posx1 + wrel; | 
  | 
 | 
     } | 
  | 
 | 
     else { | 
  | 
 | 
       posx1 = posx0 + 2*marg; | 
  | 
 | 
       posx0 = posx1 + wrel; | 
  | 
 | 
     } | 
  | 
 | 
      | 
  | 
 | 
     if ( (n+1)%2==1 ) { | 
  | 
 | 
       if(n>1) tposy = tposy-(tmarg*2+thpad); | 
  | 
 | 
       tposx1 = tmarg; | 
  | 
 | 
       tposx0 = tposx1 + twrel; | 
  | 
 | 
     } | 
  | 
 | 
     else { | 
  | 
 | 
       tposx1 = tposx0 + 2*tmarg; | 
  | 
 | 
       tposx0 = tposx1 + twrel; | 
  | 
 | 
     } | 
  | 
 | 
  | 
  | 
 | 
  | 
  | 
 | 
     /* -----------> pad for histograms  */ | 
  | 
 | 
     pad1[n] = new TPad("pad1"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
  | 
 | 
     pad2[n] = new TPad("pad2"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
  | 
 | 
     pad3[n] = new TPad("pad3"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
  | 
 | 
     pad4[n] = new TPad("pad4"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
  | 
 | 
     pad5[n] = new TPad("pad5"," ",posx1,posy-hpad,posx0,posy,18,0,0); | 
  | 
 | 
     if(n<5) pad6[n] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); | 
  | 
 | 
  | 
  | 
 | 
  | 
  | 
 | 
     /* -----------> HISTOGRAMS          */ | 
  | 
 | 
   | 
  | 
 | 
     oss1<<"DSP  "<<n+1; | 
  | 
 | 
     oss2<<"DSPh  "<<n+1; | 
  | 
 | 
     oss3<<"DSP h "<<n+1; | 
  | 
 | 
     oss4<<"DSP   h"<<n+1; | 
  | 
 | 
       | 
  | 
 | 
     landau1[n]=new TH1F(oss1.str().c_str(),oss1.str().c_str(),1201,-0.5,1200.5); | 
  | 
 | 
     landau1[n]->GetXaxis()->SetTitle("max signal"); | 
  | 
 | 
     landau1[n]->GetXaxis()->CenterTitle(); | 
  | 
 | 
     landau2[n]=new TH1F(oss2.str().c_str(),oss1.str().c_str(),1201,-0.5,1200.5); | 
  | 
 | 
     landau2[n]->GetXaxis()->SetTitle("max signal"); | 
  | 
 | 
     landau2[n]->GetXaxis()->CenterTitle(); | 
  | 
 | 
     landau3[n]=new TH1F(oss3.str().c_str(),oss1.str().c_str(),1201,-0.5,1200.5); | 
  | 
 | 
     landau3[n]->GetXaxis()->SetTitle("max signal"); | 
  | 
 | 
     landau3[n]->GetXaxis()->CenterTitle(); | 
  | 
 | 
  | 
  | 
 | 
     illuminazione[n]=new TH1F(oss4.str().c_str(),oss1.str().c_str(),3073,-0.5,3072.5); | 
  | 
 | 
     illuminazione[n]->GetXaxis()->SetTitle("strip with max signal"); | 
  | 
 | 
     illuminazione[n]->GetXaxis()->CenterTitle(); | 
  | 
 | 
  | 
  | 
 | 
     oss1.str(""); | 
  | 
 | 
     oss2.str(""); | 
  | 
 | 
     oss3.str(""); | 
  | 
 | 
     oss4.str(""); | 
  | 
 | 
   };             | 
  | 
 | 
     | 
  | 
 | 
  | 
  | 
 | 
   //********************************************************************************** | 
  | 
 | 
   // Fill Graphs and Histos | 
  | 
 | 
   //********************************************************************************** | 
  | 
 | 
     | 
  | 
 | 
   Double_t maxhist=0; | 
  | 
 | 
   TBox b; | 
  | 
 | 
   b.SetFillColor(5); | 
  | 
 | 
  | 
  | 
| 805 | 
   for (Int_t i=0; i<12 ; i++){  | 
   for (Int_t i=0; i<12 ; i++){  | 
| 806 | 
   | 
          | 
| 807 | 
     for (Int_t ev=minevent; ev<maxevent; ev++){ | 
     TBox b; | 
| 808 | 
       yyc[(ev-minevent)]=yc[12*(ev-minevent)+i]; | 
     b.SetFillColor(6); | 
| 809 | 
       // if( land[12*(ev-minevent)+i][0]!=0 && illum[12*(ev-minevent)+i][0]>510 && illum[12*(ev-minevent)+i][0]<515)  landau1[i]->Fill(land[12*(ev-minevent)+i][0]); | 
     b.SetFillStyle(3945); | 
| 810 | 
       if( land[12*(ev-minevent)+i][0]!=0)  landau1[i]->Fill(land[12*(ev-minevent)+i][0]); | 
  | 
| 811 | 
       if( land[12*(ev-minevent)+i][1]!=0)  landau2[i]->Fill(land[12*(ev-minevent)+i][1]); | 
     Float_t maxhist=0; | 
 | 
       if( land[12*(ev-minevent)+i][2]!=0)  landau3[i]->Fill(land[12*(ev-minevent)+i][2]); | 
  | 
 | 
       for(Int_t j=0;j<3;j++){ | 
  | 
 | 
         if(land[12*(ev-minevent)+i][j]!=0){ | 
  | 
 | 
           hi=(j*1024)+illum[12*(ev-minevent)+i][j]; | 
  | 
 | 
           illuminazione[i]->Fill(hi); | 
  | 
 | 
         } | 
  | 
 | 
       } | 
  | 
 | 
     } | 
  | 
 | 
      | 
  | 
| 812 | 
     LandauCanv1->cd(); | 
     LandauCanv1->cd(); | 
| 813 | 
     pad1[i]->SetFillColor(10); | 
     pad1[i]->SetFillColor(10); | 
| 814 | 
     pad1[i]->SetFrameFillColor(10); | 
     pad1[i]->SetFrameFillColor(10); | 
| 815 | 
     pad1[i]->Draw(); | 
     pad1[i]->Draw(); | 
| 816 | 
     pad1[i]->cd(); | 
     pad1[i]->cd(); | 
| 817 | 
  | 
     landau1[i]->GetXaxis()->SetTitle("max signal"); | 
| 818 | 
  | 
     landau1[i]->GetXaxis()->CenterTitle(); | 
| 819 | 
     landau1[i]->Draw(""); | 
     landau1[i]->Draw(""); | 
| 820 | 
  | 
     LandauCanv1->Update(); | 
| 821 | 
  | 
  | 
| 822 | 
     LandauCanv2->cd(); | 
     LandauCanv2->cd(); | 
| 823 | 
     pad4[i]->SetFillColor(10); | 
     pad4[i]->SetFillColor(10); | 
| 824 | 
     pad4[i]->SetFrameFillColor(10); | 
     pad4[i]->SetFrameFillColor(10); | 
| 825 | 
     pad4[i]->Draw(); | 
     pad4[i]->Draw(); | 
| 826 | 
     pad4[i]->cd(); | 
     pad4[i]->cd(); | 
| 827 | 
  | 
     landau2[i]->GetXaxis()->SetTitle("max signal"); | 
| 828 | 
  | 
     landau2[i]->GetXaxis()->CenterTitle(); | 
| 829 | 
     landau2[i]->Draw(""); | 
     landau2[i]->Draw(""); | 
| 830 | 
  | 
     LandauCanv2->Update(); | 
| 831 | 
  | 
  | 
| 832 | 
     LandauCanv3->cd(); | 
     LandauCanv3->cd(); | 
| 833 | 
     pad5[i]->SetFillColor(10); | 
     pad5[i]->SetFillColor(10); | 
| 834 | 
     pad5[i]->SetFrameFillColor(10); | 
     pad5[i]->SetFrameFillColor(10); | 
| 835 | 
     pad5[i]->Draw(); | 
     pad5[i]->Draw(); | 
| 836 | 
     pad5[i]->cd(); | 
     pad5[i]->cd(); | 
| 837 | 
  | 
     landau3[i]->GetXaxis()->SetTitle("max signal"); | 
| 838 | 
  | 
     landau3[i]->GetXaxis()->CenterTitle(); | 
| 839 | 
     landau3[i]->Draw(""); | 
     landau3[i]->Draw(""); | 
| 840 | 
  | 
     LandauCanv3->Update(); | 
| 841 | 
  | 
  | 
| 842 | 
     IlluminaCanv->cd(); | 
     IlluminaCanv->cd(); | 
| 843 | 
     pad2[i]->SetFillColor(10); | 
     pad2[i]->SetFillColor(10); | 
| 844 | 
     pad2[i]->SetFrameFillColor(10); | 
     pad2[i]->SetFrameFillColor(10); | 
| 845 | 
  | 
     pad2[i]->SetLogy(); | 
| 846 | 
     pad2[i]->Draw(); | 
     pad2[i]->Draw(); | 
| 847 | 
     pad2[i]->cd(); | 
     pad2[i]->cd(); | 
| 848 | 
     pad2[i]->SetLogy(); | 
     illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); | 
| 849 | 
     // illuminazione[i]->SetStats(KFALSE); | 
     illuminazione[i]->GetXaxis()->CenterTitle(); | 
| 850 | 
    if(i==1){ | 
     illuminazione[i]->Draw(""); | 
| 851 | 
       illuminazione[i]->Draw("ah"); | 
     if(i==1){ | 
| 852 | 
       maxhist= illuminazione[i]->GetMaximum(); | 
       maxhist= illuminazione[i]->GetMaximum(); | 
| 853 | 
       b.DrawBox(2816.,0.,3060.,maxhist); | 
       b.DrawBox(2816.,0.,3060.,maxhist); | 
 | 
       illuminazione[i]->Draw("axis same"); | 
  | 
 | 
       illuminazione[i]->Draw("same ]["); | 
  | 
| 854 | 
     } | 
     } | 
| 855 | 
     else if(i==6){ | 
     else if(i==6){ | 
 | 
       illuminazione[i]->Draw("ah"); | 
  | 
| 856 | 
       maxhist= illuminazione[i]->GetMaximum(); | 
       maxhist= illuminazione[i]->GetMaximum(); | 
| 857 | 
       b.DrawBox(2560.,0.,2816.,maxhist); | 
       b.DrawBox(2560.,0.,2816.,maxhist); | 
| 858 | 
       b.DrawBox(512.,0.,768.,maxhist); | 
       b.DrawBox(512.,0.,768.,maxhist); | 
| 859 | 
       b.DrawBox(1024.,0.,1792.,maxhist); | 
       b.DrawBox(1024.,0.,1792.,maxhist); | 
 | 
       illuminazione[i]->Draw("axis same"); | 
  | 
 | 
       illuminazione[i]->Draw("same]["); | 
  | 
| 860 | 
     } | 
     } | 
| 861 | 
     else if(i==11){ | 
     else if(i==11){ | 
 | 
       illuminazione[i]->Draw("ah"); | 
  | 
| 862 | 
       maxhist= illuminazione[i]->GetMaximum(); | 
       maxhist= illuminazione[i]->GetMaximum(); | 
| 863 | 
       b.DrawBox(768.,0.,1024.,maxhist); | 
       b.DrawBox(768.,0.,1024.,maxhist); | 
 | 
       illuminazione[i]->Draw("axis same"); | 
  | 
 | 
       illuminazione[i]->Draw("same]["); | 
  | 
| 864 | 
     } | 
     } | 
| 865 | 
     else illuminazione[i]->Draw(""); | 
     IlluminaCanv->Update(); | 
 | 
  | 
  | 
 | 
    CompTimeCanv->cd(); | 
  | 
 | 
     pad3[i]->SetFillColor(10); | 
  | 
 | 
     pad3[i]->SetFrameFillColor(10); | 
  | 
 | 
     pad3[i]->Draw(); | 
  | 
 | 
     pad3[i]->cd(); | 
  | 
 | 
     comprtime= new TGraph(nevent,x,yyc); | 
  | 
 | 
     oss1<<"DSP  "<<i+1; | 
  | 
 | 
     comprtime->SetTitle(oss1.str().c_str()); | 
  | 
 | 
     comprtime->GetXaxis()->SetTitle("OBT (ms)"); | 
  | 
 | 
     comprtime->GetXaxis()->CenterTitle(); | 
  | 
 | 
     comprtime->GetYaxis()->SetTitle("compressiontime (ms)"); | 
  | 
 | 
     comprtime->GetYaxis()->CenterTitle(); | 
  | 
 | 
     comprtime->GetYaxis()->SetRangeUser(0,2); | 
  | 
 | 
     comprtime->Draw("ap");  | 
  | 
 | 
     oss1.str("");  | 
  | 
 | 
   }; | 
  | 
 | 
     | 
  | 
 | 
   EventNumCanv->cd(); | 
  | 
 | 
   TPad *pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); | 
  | 
 | 
   pt1 = new TPaveText(0.004,0.004,0.986,0.996); | 
  | 
 | 
   pt = new TPad("pt"," ",0.004,0.004,0.7,0.98,18,0,0); | 
  | 
 | 
   pt1->SetFillColor(10); | 
  | 
 | 
   pt1->ReadFile(out + "warning.txt"); | 
  | 
 | 
   pt1->SetTextAlign(22); | 
  | 
 | 
   pt1->SetTextSize(0.035); | 
  | 
 | 
   pt0->SetFillColor(10); | 
  | 
 | 
   pt0->SetFrameFillColor(10); | 
  | 
 | 
   pt0->Draw(); | 
  | 
 | 
   pt0->cd(); | 
  | 
 | 
   pt1->Draw(); | 
  | 
 | 
   EventNumCanv->cd(); | 
  | 
 | 
   pt->SetFillColor(10); | 
  | 
 | 
   pt->SetFrameFillColor(10); | 
  | 
 | 
   pt->Draw(); | 
  | 
 | 
   pt->cd(); | 
  | 
 | 
   eventnumb=new TGraph(nevent,x,eventint); | 
  | 
 | 
   eventnumb->SetTitle(""); | 
  | 
 | 
   eventnumb->GetXaxis()->SetLabelSize(0.04); | 
  | 
 | 
   eventnumb->GetXaxis()->SetTitleSize(0.04); | 
  | 
 | 
   eventnumb->GetXaxis()->SetTitle("OBT (ms)"); | 
  | 
 | 
   eventnumb->GetXaxis()->CenterTitle(); | 
  | 
 | 
   eventnumb->GetXaxis()->SetTickLength(0.01); | 
  | 
 | 
   eventnumb->GetXaxis()->SetTitleOffset(1.2); | 
  | 
 | 
   eventnumb->GetYaxis()->SetLabelSize(0.04); | 
  | 
 | 
   eventnumb->GetYaxis()->SetTitleSize(0.04); | 
  | 
 | 
   eventnumb->GetYaxis()->SetTitle("DSP event-number"); | 
  | 
 | 
   eventnumb->GetYaxis()->CenterTitle(); | 
  | 
 | 
   eventnumb->GetYaxis()->SetTitleOffset(1.5); | 
  | 
 | 
   eventnumb->SetMarkerStyle(21); | 
  | 
 | 
   eventnumb->SetMarkerColor(kBlue); | 
  | 
 | 
   eventnumb->SetMarkerSize(0.3); | 
  | 
 | 
   eventnumb->Draw("ap"); | 
  | 
 | 
  | 
  | 
 | 
   for(Int_t i=0; i<5; i++){ | 
  | 
 | 
     for (Int_t ev=0; ev<tsize; ev++){ | 
  | 
 | 
       tempt_tmp[ev]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); | 
  | 
 | 
     } | 
  | 
 | 
     TempCanv->cd(); | 
  | 
 | 
     tit<<"T"<<i+5<<" (magnetic module "<<i+1<<")"; | 
  | 
 | 
     pad6[i]->SetFillColor(10); | 
  | 
 | 
     pad6[i]->Draw(); | 
  | 
 | 
     pad6[i]->cd(); | 
  | 
 | 
     temp[i]= new TGraph(tsize,xt,tempt_tmp); | 
  | 
 | 
     temp[i]->SetTitle(tit.str().c_str()); | 
  | 
 | 
     temp[i]->GetXaxis()->SetLabelSize(0.04); | 
  | 
 | 
     temp[i]->GetXaxis()->SetTitleSize(0.04); | 
  | 
 | 
     temp[i]->GetXaxis()->SetTitle("OBT (ms)"); | 
  | 
 | 
     temp[i]->GetXaxis()->CenterTitle(); | 
  | 
 | 
     temp[i]->GetXaxis()->SetTitleOffset(0.85); | 
  | 
 | 
     temp[i]->GetYaxis()->SetTitleOffset(1.2); | 
  | 
 | 
     temp[i]->GetYaxis()->SetLabelOffset(0.001); | 
  | 
 | 
     temp[i]->GetYaxis()->SetLabelSize(0.04); | 
  | 
 | 
     temp[i]->GetYaxis()->SetTitleSize(0.04); | 
  | 
 | 
     temp[i]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); | 
  | 
 | 
     temp[i]->GetYaxis()->CenterTitle(); | 
  | 
 | 
     temp[i]->SetMarkerStyle(21); | 
  | 
 | 
     temp[i]->SetMarkerSize(0.2); | 
  | 
 | 
     temp[i]->Draw("ap"); | 
  | 
 | 
     tit.str(""); | 
  | 
| 866 | 
   } | 
   } | 
| 867 | 
   CompTimeCanv->Update(); | 
  | 
 | 
   LandauCanv1->Update(); | 
  | 
 | 
   LandauCanv2->Update(); | 
  | 
 | 
   LandauCanv3->Update(); | 
  | 
 | 
   IlluminaCanv->Update(); | 
  | 
 | 
   TempCanv->Update(); | 
  | 
 | 
    | 
  | 
| 868 | 
   printf("... end of packets. \n"); | 
   printf("... end of packets. \n"); | 
| 869 | 
  | 
  | 
| 870 | 
   //************************************************************************* | 
   //************************************************************************* | 
| 871 | 
   // Save output Files | 
   // Save output Files | 
| 872 | 
   //************************************************************************* | 
   //************************************************************************* | 
| 873 | 
   stringstream out1,out2,out3,command; | 
   stringstream out1,out2,out3,command; | 
| 874 | 
    | 
   Int_t totpg=0; | 
| 875 | 
   if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ | 
   if(cntpgtemp>cntpgdat) totpg=cntpgtemp; | 
| 876 | 
     out1.str(""); | 
   else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; | 
| 877 | 
     out2.str(""); | 
  | 
| 878 | 
     out3.str(""); | 
   for(Int_t fl=0;fl<totpg;fl++){ | 
| 879 | 
      | 
     if(!strcmp(outfile.Data(),"ps")||!strcmp(outfile.Data(),"pdf")){ | 
| 880 | 
     out1<<ffile<<"_FTrkQLook_EXPERT.ps("; | 
       out1.str(""); | 
| 881 | 
     out2<<ffile<<"_FTrkQLook_EXPERT.ps"; | 
       out2.str(""); | 
| 882 | 
     out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; | 
       out3.str(""); | 
| 883 | 
      | 
        | 
| 884 | 
     CompTimeCanv->Print(out+out1.str().c_str(),"Portrait"); | 
       out1<<ffile<<"_FTrkQLook_EXPERT.ps("; | 
| 885 | 
     EventNumCanv->Print(out+out2.str().c_str(),"Portrait"); | 
       out2<<ffile<<"_FTrkQLook_EXPERT.ps"; | 
| 886 | 
     LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); | 
       out3<<ffile<<"_FTrkQLook_EXPERT.ps)"; | 
 | 
     LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); | 
  | 
 | 
     LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); | 
  | 
 | 
     IlluminaCanv->Print(out+out2.str().c_str(),"Portrait"); | 
  | 
 | 
     TempCanv->Print(out+out3.str().c_str(),"Portrait"); | 
  | 
| 887 | 
      | 
      | 
| 888 | 
     if(!strcmp(outfile.Data(),"pdf")){ | 
       if(totpg==1){ | 
| 889 | 
       stringstream com; | 
         CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); | 
| 890 | 
       com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; | 
         EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); | 
| 891 | 
       system(com.str().c_str()); | 
         TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); | 
| 892 | 
       printf("\n---> ps file converted in pdf format!\n"); | 
         LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); | 
| 893 | 
       com.str(""); | 
         LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); | 
| 894 | 
       com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; | 
         LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); | 
| 895 | 
       system(com.str().c_str()); | 
         IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); | 
| 896 | 
       printf("---> ps file removed!\n\n"); | 
       } | 
| 897 | 
       com.str(""); | 
       else if(totpg>1){ | 
| 898 | 
  | 
         if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); | 
| 899 | 
  | 
         if(fl>0 && fl<cntpgdat) CompTimeCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); | 
| 900 | 
  | 
         if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait");  | 
| 901 | 
  | 
         if(fl<cntpgtemp) TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); | 
| 902 | 
  | 
         if(fl==totpg-1){ | 
| 903 | 
  | 
           LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); | 
| 904 | 
  | 
           LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); | 
| 905 | 
  | 
           LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); | 
| 906 | 
  | 
           IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); | 
| 907 | 
  | 
         } | 
| 908 | 
  | 
       } | 
| 909 | 
     } | 
     } | 
| 910 | 
  | 
     else{ | 
| 911 | 
  | 
       out1.str(""); | 
| 912 | 
  | 
       out1<<ffile<<"_FTrkQLook_EXPERT-CompTime-pag"<<fl+1<<"."<<outfile.Data(); | 
| 913 | 
  | 
       if(fl<cntpgdat) CompTimeCanv[fl]->Print(out+out1.str().c_str()); | 
| 914 | 
  | 
       out1.str(""); | 
| 915 | 
  | 
       out1<<ffile<<"_FTrkQLook_EXPERT-Temp-pag"<<fl+1<<"."<<outfile.Data(); | 
| 916 | 
  | 
       if(fl<cntpgtemp) TempCanv[fl]->Print(out+out1.str().c_str()); | 
| 917 | 
  | 
       out1.str(""); | 
| 918 | 
  | 
       out1<<ffile<<"_FTrkQLook_EXPERT-EvNum-pag"<<fl+1<<"."<<outfile.Data(); | 
| 919 | 
  | 
       if(fl<cntpgdat) EventNumCanv[fl]->Print(out+out1.str().c_str()); | 
| 920 | 
  | 
       if(fl==totpg-1){ | 
| 921 | 
  | 
         out1.str(""); | 
| 922 | 
  | 
         out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1."<<outfile.Data(); | 
| 923 | 
  | 
         LandauCanv1->Print(out+out1.str().c_str()); | 
| 924 | 
  | 
         out1.str(""); | 
| 925 | 
  | 
         out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2."<<outfile.Data(); | 
| 926 | 
  | 
         LandauCanv2->Print(out+out1.str().c_str()); | 
| 927 | 
  | 
         out1.str(""); | 
| 928 | 
  | 
         out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3."<<outfile.Data(); | 
| 929 | 
  | 
         LandauCanv3->Print(out+out1.str().c_str()); | 
| 930 | 
  | 
         out1.str(""); | 
| 931 | 
  | 
         out1<<ffile<<"_FTrkQLook_EXPERT-Lighting."<<outfile.Data(); | 
| 932 | 
  | 
         IlluminaCanv->Print(out+out1.str().c_str()); | 
| 933 | 
  | 
       } | 
| 934 | 
  | 
     } | 
| 935 | 
  | 
   }   | 
| 936 | 
  | 
  | 
| 937 | 
  | 
   // | 
| 938 | 
  | 
   // Convert ps to pdf if required | 
| 939 | 
  | 
   if(!strcmp(outfile.Data(),"pdf")){ | 
| 940 | 
  | 
     stringstream com; | 
| 941 | 
  | 
     com<<"ps2pdf13 "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "<<out<<ffile<<"_FTrkQLook_EXPERT.pdf"; | 
| 942 | 
  | 
     system(com.str().c_str()); | 
| 943 | 
  | 
     printf("\n---> ps file converted in pdf format!\n"); | 
| 944 | 
  | 
     com.str(""); | 
| 945 | 
  | 
     com<<"rm -f "<<out<<ffile<<"_FTrkQLook_EXPERT.ps "; | 
| 946 | 
  | 
     system(com.str().c_str()); | 
| 947 | 
  | 
     printf("---> ps file removed!\n\n"); | 
| 948 | 
  | 
     com.str(""); | 
| 949 | 
   } | 
   } | 
| 950 | 
   else{ | 
  | 
 | 
     out1.str(""); | 
  | 
 | 
     out1<<ffile<<"_FTrkQLook_EXPERT-CompTime."<<outfile.Data(); | 
  | 
 | 
     CompTimeCanv->Print(out+out1.str().c_str()); | 
  | 
 | 
     out1.str(""); | 
  | 
 | 
     out1<<ffile<<"_FTrkQLook_EXPERT-Temp."<<outfile.Data(); | 
  | 
 | 
     TempCanv->Print(out+out1.str().c_str()); | 
  | 
 | 
     out1.str(""); | 
  | 
 | 
     out1<<ffile<<"_FTrkQLook_EXPERT-EvNum."<<outfile.Data(); | 
  | 
 | 
     EventNumCanv->Print(out+out1.str().c_str()); | 
  | 
 | 
     out1.str(""); | 
  | 
 | 
     out1<<ffile<<"_FTrkQLook_EXPERT-LandauL1."<<outfile.Data(); | 
  | 
 | 
     LandauCanv1->Print(out+out1.str().c_str()); | 
  | 
 | 
     out1.str(""); | 
  | 
 | 
     out1<<ffile<<"_FTrkQLook_EXPERT-LandauL2."<<outfile.Data(); | 
  | 
 | 
     LandauCanv2->Print(out+out1.str().c_str()); | 
  | 
 | 
     out1.str(""); | 
  | 
 | 
     out1<<ffile<<"_FTrkQLook_EXPERT-LandauL3."<<outfile.Data(); | 
  | 
 | 
     LandauCanv3->Print(out+out1.str().c_str()); | 
  | 
 | 
     out1.str(""); | 
  | 
 | 
     out1<<ffile<<"_FTrkQLook_EXPERT-Lighting."<<outfile.Data(); | 
  | 
 | 
     IlluminaCanv->Print(out+out1.str().c_str()); | 
  | 
 | 
   } | 
  | 
 | 
   | 
  | 
| 951 | 
   command.str(""); | 
   command.str(""); | 
| 952 | 
   command<<"rm -f "<<out<<"warning.txt"; | 
   command<<"rm -f "<<out<<"warning.txt"; | 
| 953 | 
   system(command.str().c_str()); | 
   system(command.str().c_str()); | 
| 954 | 
  | 
    | 
| 955 | 
   gROOT->Reset(); | 
   gROOT->Reset(); | 
| 956 | 
   return; | 
   return; | 
| 957 | 
 } | 
 } |