/[PAMELA software]/quicklook/QLflightTmtc_Header/TmtcTemperature.cpp
ViewVC logotype

Diff of /quicklook/QLflightTmtc_Header/TmtcTemperature.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by pam-fi, Tue Jun 20 11:03:03 2006 UTC revision 1.5 by pam-rm2, Thu Jul 6 17:01:08 2006 UTC
# Line 1  Line 1 
1    
2    
3  /**  /**
4  * TmtcTemperature  * TmtcTemperature
5  * author Marcelli  * author Marcelli
# Line 50  Line 52 
52  #include <sstream>  #include <sstream>
53  #include "TStyle.h"  #include "TStyle.h"
54  #include "TFile.h"  #include "TFile.h"
55    #include "TAxis.h"
56    #include "TLegend.h"
57    #include "TF1.h"
58  #include "TList.h"  #include "TList.h"
59  #include "TTree.h"  #include "TTree.h"
60  #include "TObjString.h"  #include "TObjString.h"
61  #include "TCanvas.h"  #include "TCanvas.h"
62  #include "TGraph.h"  #include "TGraph.h"
63    #include "TMultiGraph.h"
64  #include "TH1F.h"  #include "TH1F.h"
65  #include "TGaxis.h"  #include "TGaxis.h"
66  #include "TString.h"  #include "TString.h"
# Line 168  float convert_volt(int in) { Line 174  float convert_volt(int in) {
174  }  }
175    
176    
   
177  ////////////////////////////////////////////////////////////////////////////////  ////////////////////////////////////////////////////////////////////////////////
178  //////////////////////////  TMTC TEMPERATURE   //////////////////////////////////  //////////////////////////  TMTC TEMPERATURE   //////////////////////////////////
179  //////////////////////////////////////////////////////////////////////////////////  //////////////////////////////////////////////////////////////////////////////////
# Line 196  void TmtcTemperature(TString base, TStri Line 201  void TmtcTemperature(TString base, TStri
201    pamela::TmtcRecord *tmr=0;    pamela::TmtcRecord *tmr=0;
202        
203    tr->SetBranchAddress("Tmtc", &tme);    tr->SetBranchAddress("Tmtc", &tme);
   
   ///-------to create canvas--------------------//  
   TCanvas *Canvascchot = new TCanvas("Tmtc_1", base, 1280, 1024);  
   Canvascchot->Divide(2,3);  
   Canvascchot->SetFillColor(10);  
   
   TCanvas *Canvascccold = new TCanvas("Tmtc_2", base, 1280,1024);  
   Canvascccold->Divide(2,3);  
   Canvascccold->SetFillColor(10);  
     
   TCanvas *Canvasccvrl = new TCanvas("Tmtc_3", base, 1280, 1024);  
   Canvasccvrl->Divide(1,3);  
   Canvasccvrl->SetFillColor(10);  
   
   
   TCanvas *Canvasthdea = new TCanvas("Tmtc_4", base, 1280, 1024);  
   if (tr->GetBranch("Records.TM_TH_ANA[12]")){  
     Canvasthdea->SetFillColor(10);  
     Canvasthdea->Divide(3,4);  
   }  
   else if (tr->GetBranch("Records.TM_TH_ANA[16]")){  
     Canvasthdea->SetFillColor(10);  
     Canvasthdea->Divide(4,4);  
   }  
   
   TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024);  
   Canvasvoltdea->SetFillColor(10);  
   Canvasvoltdea->Divide(2,3);  
204        
205    //////--------to analize data-----------------//////    //////--------to analize data-----------------//////
206    Long64_t nevents = tmtcBr->GetEntries();    Long64_t nevents = tmtcBr->GetEntries();
# Line 234  void TmtcTemperature(TString base, TStri Line 211  void TmtcTemperature(TString base, TStri
211    }    }
212    
213    
214   const Int_t size = nevents;  string titolocc[] ={"IPM1 input","IPM2 input","IPM3 input","IPM4 input","IPM5 input","IPM6 input","KHB_HOT","KHB_COLD","IDAQ_HOT","IDAQ_COLD","VCB_STANDBY","VRL_HOT","VRL_COLD","PSB","TOFHV_HOT","TOFHV_COLD"};
215    
216     string titoloth[]      ={"IPM_TH","S1_TH","S4_TH","S4_ND_PLATE_TH","TRK_TH1","TRK_TH2","FLUID_IN_TH","FLUID_OUT_TH","VME_TH1","DCDC_TH","CPU_TH1","CPU_TH2", "IPM_CPU_TH", "VRL_TH1", "VRL_TH2", "VME_TH2"};
217    
218    
219      const Int_t size = nevents;
220    std::stringstream oss;    std::stringstream oss;
221    Int_t recordstot=0;    Int_t recordstot=0;
222      Int_t recordstotmax=0;
223      Int_t records[size];
224      Int_t ev[size];
225      Double_t OBT[size];
226      Int_t tot=0;
227    Int_t m=0;    Int_t m=0;
228    Int_t l=0;    Int_t l=0;
   Int_t n=0;  
229    
230   for (Int_t i = 0; i < size; i++){  
231      for (Int_t i = 0; i < size; i++){    ///ciclo per decidere le pagine
232      tmtcBr->GetEntry(i);        tmtcBr->GetEntry(i);  
233      Long64_t tmpSize = tme->Records->GetEntries();        Long64_t tmpSize = tme->Records->GetEntries();
     //Int_t size_b = tmpSize;  
234      recordstot=recordstot+tmpSize;      recordstot=recordstot+tmpSize;
235   }        if (tmpSize>0){
236          tmr = (pamela::TmtcRecord*)tme->Records->At(0);
237   const Int_t lungmax=16*recordstot;        if(i==0){
238   const Int_t lungmin=6*recordstot;          ev[0]=0;
239            records[0]=0;
240   Double_t xrecordobtcc[lungmax], yccdiagacq[lungmax], ythana[lungmax], xrecordobtth[lungmax], xrecordobtdea[lungmin], ydea[lungmin], xrecordobtcc_1[lungmax], yccdiagacq_1[lungmax],  ythana_1[lungmax], xrecordobtth_1[lungmax], xrecordobtdea_1[lungmin], ydea_1[lungmin], limth[lungmax], limvolt1[lungmin], limvolt2[lungmin], limvolt3[lungmin];            OBT[0]=tmr->TM_RECORD_OBT;
241          }else if (fmod(i, 35)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){
242            //}else if ((fmod(i, 20)==0) || (i==(size-1)) ){
243   string titolocc[] ={"IPM1","IPM2","IPM3","IPM4","IPM5","IPM6","KHB_HOT_LATCHUP","KHB_COLD_LATCHUP","IDAQ_HOT_ALARM","IDAQ_COLD_ALARM","VCB_STANDBY","VRL_HOT","VRL_COLD","PSB_ALARM","TOFHV_HOT_ALARM","TOFHV_COLD_ALARM"};          tot=tot+1;
244            if (recordstotmax<recordstot) recordstotmax=recordstot;
245   string titoloth[]      ={"IPM_TH","S1_TH","S4_TH","S4_ND_PLATE_TH","TRK_TH1","TRK_TH2","FLUID_IN_TH","FLUID_OUT_TH","VME_TH","DCDC_TH","CPU_TH1","CPU_TH2", "", "", "", ""};          records[tot]=recordstot;
246            OBT[tot]=tmr->TM_RECORD_OBT;
247            ev[tot]=i;
248   recordstot=0;          recordstot=0;
  for (Int_t i = 0; i < size; i++){  
    tmtcBr->GetEntry(i);    
    Long64_t tmpSize = tme->Records->GetEntries();    
    Int_t size_b = tmpSize;  
     for (Int_t j = 0; j < size_b; j++){  
       tmr = (pamela::TmtcRecord*)tme->Records->At(j);  
         
       for (Int_t k =0; k <16; k++){  
         yccdiagacq[16*recordstot+16*j+k]   = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001);          
         xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT;  
249        }        }
250        }
251      }  
252    
       if (tr->GetBranch("Records.TM_TH_ANA[12]")){  
           for (Int_t k =0; k <12; k++){  
             ythana[12*recordstot+12*j+k]       = convert_th(tmr->TM_TH_ANA[k]);          
             xrecordobtth[12*recordstot+12*j+k] = tmr->TM_RECORD_OBT;  
           }  
       }  
       else if (tr->GetBranch("Records.TM_TH_ANA[16]")){  
           for (Int_t k =0; k <16; k++){  
             ythana[16*recordstot+16*j+k]       = convert_th(tmr->TM_TH_ANA[k]);          
             xrecordobtth[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT;  
           }  
       }  
253    
      for (Int_t k =0; k <6; k++){  
         ydea[6*recordstot+6*j+k]        = convert_volt(tmr->TM_DEA_ANA[k]);              
         xrecordobtdea[6*recordstot+6*j+k]  = tmr->TM_RECORD_OBT;  
      }  
     }  
     recordstot=recordstot+tmpSize;  
   }  
   
   TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString();  
   filename = ((TObjString*)filename.Tokenize('.')->First())->GetString();  
254    
255    //CC Graph      const Int_t lungmax=16*recordstotmax;
256    for (Int_t k =0; k<16; k++){    const Int_t lungmin=6*recordstotmax;
257      for (Int_t i = 0; i < recordstot; i++){    
258        yccdiagacq_1[i]= yccdiagacq[16*i+k];    
259        xrecordobtcc_1[i]= xrecordobtcc[16*i+k];     Double_t xrecordobtcc[lungmax], yccdiagacq[lungmax], ythana[lungmax], xrecordobtth[lungmax], xrecordobtdea[lungmin], ydea[lungmin], xrecordobtcc_1[lungmax], xrecordobtcc_1d[lungmax], xrecordobtcc_1u[lungmax], yccdiagacq_1[lungmax], yccdiagacq_1d[lungmax], yccdiagacq_1u[lungmax],  ythana_1[lungmax], xrecordobtth_1[lungmax], xrecordobtdea_1[lungmin], ydea_1[lungmin];  
260      }    
261      //CC IPM     Double_t yccdiagacq_11u[lungmax], yccdiagacq_11d[lungmax], yccipm12u[lungmax], yccipm12d[lungmax], yccipmkk1u[lungmax], yccipmkk1d[lungmax], yccipmerror[lungmax],  yccipmerror2[lungmax];
262      if (k==0 || k==1 ||k==2 || k==3 || k==4 || k==5 ){    
263      Canvascchot->cd(m+1);  
     gPad->SetFillColor(10);  
     TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1);  
     
     pt = new TPaveText (.01,.07,.09,.13);  
     pt->AddText("ON");  
     pt->SetBorderSize(1);  
     pt->Draw();  
     pt1 = new TPaveText (.01,.47,.09,.53);  
     pt1->AddText("OFF");  
     pt1->SetBorderSize(1);  
     pt1->Draw();  
     oss.str("");  
     oss<<filename.Data()<<":  "<<titolocc[k];  
     ccrecord->SetTitle(oss.str().c_str());  
     ccrecord->SetMaximum(1.5);  
     ccrecord->SetMinimum(0);  
     ccrecord->SetFillColor(8);  
     ccrecord->GetXaxis()->SetTitle("OBT");  
     ccrecord->GetXaxis()->CenterTitle();  
     ccrecord->GetYaxis()->SetTitle("");  
     ccrecord->GetYaxis()->CenterTitle();  
     ccrecord->GetYaxis()->SetNdivisions(3,-1);  
     ccrecord->GetYaxis()->SetLabelSize(0);  
     ccrecord->SetMaximum(2);  
     ccrecord->SetMinimum(0);  
     ccrecord->Draw("AB");  
     pt->Draw();  
     pt1->Draw();  
     m=m+1;  
     }  
     //CC idaq-khb-tof  
     if (k==6 || k==7 || k==8 || k==9 || k==14 || k==15){    
     Canvascccold->cd(l+1);  
     gPad->SetFillColor(10);  
     TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1);  
     if (k==6 || k==7){    
       TPaveText *pt = new TPaveText (.01,.07,.09,.13);  
       pt->AddText("ON");  
       pt->SetBorderSize(1);  
       pt->Draw();  
       TPaveText *pt1 = new TPaveText (.01,.47,.15,.53);  
       pt1->AddText("OFF/LATCHUP");  
       pt1->SetBorderSize(1);  
       pt1->Draw();  
     }  
     if (k==8 || k==9 || k==14 || k==15){    
       TPaveText *pt = new TPaveText (.01,.07,.09,.13);  
       pt->AddText("ON");  
       pt->SetBorderSize(1);  
       pt->Draw();  
       TPaveText *pt1 = new TPaveText (.01,.47,.13,.53);  
       pt1->AddText("OFF/ALARM");  
       pt1->SetBorderSize(1);  
       pt1->Draw();  
     }  
     oss.str("");  
     oss<<filename.Data()<<":  "<<titolocc[k];  
     ccrecord->SetTitle(oss.str().c_str());  
     ccrecord->SetMaximum(1.5);  
     ccrecord->SetMinimum(0);  
     ccrecord->SetFillColor(8);  
     ccrecord->GetXaxis()->SetTitle("OBT");  
     ccrecord->GetXaxis()->CenterTitle();  
     ccrecord->GetYaxis()->SetTitle("");  
     ccrecord->GetYaxis()->CenterTitle();  
     ccrecord->GetYaxis()->SetNdivisions(3,-1);  
     ccrecord->GetYaxis()->SetLabelSize(0);  
     ccrecord->SetMaximum(2);  
     ccrecord->SetMinimum(0);  
     ccrecord->Draw("AB");  
     l=l+1;  
     }  
     //CC vrl  
     if (k==11 || k==12 || k==13 ){    
     Canvasccvrl->cd(n+1);  
     gPad->SetFillColor(10);  
     TGraph *ccrecord = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1);  
     if (k==11 || k==12){    
       TPaveText *pt = new TPaveText (.05,.07,.09,.13);  
       pt->AddText("ON");  
       pt->SetBorderSize(1);  
       pt->Draw();  
       TPaveText *pt1 = new TPaveText (.05,.47,.09,.53);  
       pt1->AddText("OFF");  
       pt1->SetBorderSize(1);  
       pt1->Draw();  
     }  
     if (k==13){    
       TPaveText *pt = new TPaveText (.05,.07,.09,.13);  
       pt->AddText("ON");  
       pt->SetBorderSize(1);  
       pt->Draw();  
       TPaveText *pt1 = new TPaveText (.03,.47,.11,.53);  
       pt1->AddText("OFF/ALARM");  
       pt1->SetBorderSize(1);  
       pt1->Draw();  
     }  
     oss.str("");  
     oss<<filename.Data()<<":  "<<titolocc[k];  
     ccrecord->SetTitle(oss.str().c_str());  
     ccrecord->SetMaximum(1.5);  
     ccrecord->SetMinimum(0);  
     ccrecord->SetFillColor(8);  
     ccrecord->GetXaxis()->SetTitle("OBT");  
     ccrecord->GetXaxis()->CenterTitle();  
     ccrecord->GetYaxis()->SetTitle("");  
     ccrecord->GetYaxis()->CenterTitle();  
     ccrecord->GetYaxis()->SetNdivisions(3,-1);  
     ccrecord->GetYaxis()->SetLabelSize(0);  
     ccrecord->SetMaximum(2);  
     ccrecord->SetMinimum(0);  
     ccrecord->Draw("AB");  
     n=n+1;  
     }  
   }  
264    
265     /////ciclo sulle pagine////////////////////
266     for (Int_t interval=0; interval<tot; interval++){
267      
268     ///-------to create canvas--------------------//
269       TCanvas *Canvascc = new TCanvas("Tmtc_1", base, 2500, 2000);
270       Canvascc->Divide(1,15);
271       Canvascc->SetFillColor(10);
272      
273       TCanvas *Canvasthdea = new TCanvas("Tmtc_4", base, 1280, 1024);
274       Canvasthdea->SetFillColor(10);
275       Canvasthdea->Divide(4,4);
276        
277    // TH Graph    
278    Canvasthdea->cd();     TCanvas *Canvasvoltdea = new TCanvas("Tmtc_5", base, 1280, 1024);
279    //thermistors number 12     Canvasvoltdea->SetFillColor(10);
280    if (tr->GetBranch("Records.TM_TH_ANA[12]")){     Canvasvoltdea->Divide(2,3);
281      for (Int_t k =0; k<12; k++){    
282        for (Int_t i = 0; i < recordstot; i++){    
283          ythana_1[i]= ythana[12*i+k];     recordstot=0;
284          xrecordobtth_1[i]= xrecordobtth[12*i+k];    
285          limth[i] = 45;     for (Int_t i = ev[interval]; i < ev[interval+1]; i++){     //ciclo su un sottogruppo
286        }       // cout<<"ciclo da "<<ev[interval]<<" a "<< ev[interval+1]<<"\n";
287        Canvasthdea->cd(k+1);       tmtcBr->GetEntry(i);  
288        TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth);       l=0;
289        graph->SetMarkerColor(50);       m=0;
290        graph->SetLineColor(50);       Long64_t tmpSize = tme->Records->GetEntries();  
291        graph->SetMarkerStyle(21);       Int_t size_b = tmpSize;
292        graph->SetMarkerSize(0.3);       for (Int_t j = 0; j < size_b; j++){
293        graph->SetMinimum(-10);         tmr = (pamela::TmtcRecord*)tme->Records->At(j);
294        graph->SetMaximum(60);        
295        graph->GetXaxis()->SetTitle("OBT");         for (Int_t k =0; k <16; k++){
296        graph->GetXaxis()->CenterTitle();           yccdiagacq[16*recordstot+16*j+k]   = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001);        
297        graph->GetYaxis()->SetTitle("Temperature value (°C)");           xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT;
298        graph->GetYaxis()->CenterTitle();         }
299        oss.str("");        
300        oss << filename.Data() <<":  " <<titoloth[k] ;         for (Int_t k =0; k <16; k++){
301        graph->SetTitle(oss.str().c_str());           ythana[16*recordstot+16*j+k]       = convert_th(tmr->TM_TH_ANA[k]);            
302               xrecordobtth[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT;
303        TPaveText *pt = new TPaveText (.45,.7,.55,.77);         }
304        pt->AddText("OFF");        
305        pt->SetBorderSize(1);         for (Int_t k =0; k <6; k++){
306        pt->Draw();           ydea[6*recordstot+6*j+k]       = convert_volt(tmr->TM_DEA_ANA[k]);            
307        graph->Draw("ACP");           xrecordobtdea[6*recordstot+6*j+k]  = tmr->TM_RECORD_OBT;
308        pt->Draw();         }
309         }
310        TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1);       recordstot=recordstot+tmpSize;
311        threcord->SetLineColor(kBlue);     }
312        threcord->SetMarkerColor(kBlue);    
313        threcord->SetMarkerStyle(21);     TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString();
314        threcord->Draw("C");     filename = ((TObjString*)filename.Tokenize('.')->First())->GetString();
315      }    
316    }     TLegend *leg1 = new TLegend(0.87,0.80,0.98,0.94, "");
317    //thermistors number=16     leg1->SetFillColor(10);
318    if (tr->GetBranch("Records.TM_TH_ANA[16]")){     leg1->SetBorderSize(0);
319      for (Int_t k =0; k<16; k++){    
320        for (Int_t i = 0; i < recordstot; i++){     Canvascc->cd();
321          ythana_1[i]= ythana[16*i+k];     pt = new TPaveText (.87,.95,.98,.98);
322          xrecordobtth_1[i]= xrecordobtth[16*i+k];     oss.str("");
323          limth[i] = 45;     oss<<filename.Data();
324        }     pt->AddText(oss.str().c_str());
325        Canvasthdea->cd(k+1);     pt->SetTextColor(1);
326        TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth);     //pt->SetTextSize(1);
327        graph->SetMarkerColor(50);     pt->SetFillColor(10);
328        graph->SetLineColor(50);     pt->SetBorderSize(0);
329        graph->SetMarkerStyle(21);     pt->Draw();
330        graph->SetMarkerSize(0.3);    
331        graph->SetMinimum(-10);     /*
332        graph->SetMaximum(60);       TLine *line = new TLine;
333        graph->GetXaxis()->SetTitle("OBT");       line->SetLineColor(4);
334        graph->GetXaxis()->CenterTitle();       line->SetLineWidth(2);
335        graph->GetYaxis()->SetTitle("Temperature value (°C)");       line->DrawLine(0, 0.60, 1, 0.60);
336        graph->GetYaxis()->CenterTitle();       line->Draw();
337        oss.str("");       line->DrawLine(0, 0.33, 1, 0.33);
338        oss << filename.Data() <<":  " <<titoloth[k] ;       line->Draw();
339        graph->SetTitle(oss.str().c_str());       line->DrawLine(0, 0.20, 1, 0.20);
340               line->Draw();
341        TPaveText *pt = new TPaveText (.45,.7,.55,.77);       line->DrawLine(0, 0.13, 1, 0.13);
342        pt->AddText("OFF");       line->Draw();
343        pt->SetBorderSize(1);     */
344        pt->Draw();    
345        graph->Draw("ACP");    
346        pt->Draw();    
347             //CC Graph  
348        TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1);     for (Int_t k =0; k<16; k++){
349        threcord->SetLineColor(kBlue);       for (Int_t i = 0; i < recordstot; i++){
350        threcord->SetMarkerColor(kBlue);         if (k>0) {
351        threcord->SetMarkerStyle(21);           yccdiagacq_11u[i]=yccdiagacq_1u[i];
352        threcord->Draw("C");           yccdiagacq_11d[i]=yccdiagacq_1d[i];
353      }         }
354    }           yccdiagacq_1d[i]=0;
355             yccdiagacq_1u[i]=0;
356    // DEA Graph         if (yccdiagacq[16*i+k]==0) {
357    Canvasvoltdea->cd();           yccdiagacq_1d[i]=-1;
358    for (Int_t k =0; k<6; k++){           xrecordobtcc_1[i]= xrecordobtcc[16*i+k];
359      for (Int_t i = 0; i < recordstot; i++){         }
360        ydea_1[i]= ydea[6*i + k];         else if (yccdiagacq[16*i+k]==1){
361        xrecordobtdea_1[i]= xrecordobtdea[6*i+k];           yccdiagacq_1u[i]=1;
362        limvolt1[i]= 0.65;           xrecordobtcc_1[i]= xrecordobtcc[16*i+k];
363        limvolt2[i]= 3.15;               }
364        limvolt3[i]= 4.25;         if (k==1) {
365      }           if (yccdiagacq_11u[i]==1 && yccdiagacq_1u[i]==1)  yccipm12u[i]=1;
366      Canvasvoltdea->cd(k+1);           else yccipm12u[i]=0;
367      TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1);           if (yccdiagacq_11d[i]==-1 && yccdiagacq_1d[i]==-1) yccipm12d[i]=-1;
368      TPaveText *pt = new TPaveText (.84,.13,.92,.19);           else  yccipm12d[i]=0;
369      pt->AddText("OFF");         }
370      pt->SetBorderSize(1);         if (k==1 || k==3 || k==5 || k==7 || k==9) {
371      pt->Draw();           if (yccdiagacq_11u[i]==1  && yccdiagacq_1u[i]==1)   yccipmkk1u[i]=1;
372      TPaveText *pt1 = new TPaveText (.84,.67,.92,.73);           else yccipmkk1u[i]=0;
373      pt1->AddText("ON");           if (yccdiagacq_11d[i]==-1  && yccdiagacq_1d[i]==-1)   yccipmkk1d[i]=-1;
374      pt1->SetBorderSize(1);           else yccipmkk1d[i]=0;
375      pt1->Draw();           if (k==7 || k==9) {
376      graph1->SetMarkerColor(50);             /* if (yccipmkk1u[i]==1  && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1;
377      graph1->SetLineColor(50);             else if (yccipmkk1d[i]==-1 && yccipm12d[i]==0 && yccipm12u[i]==0 || (yccipmkk1d[i]==-1 && yccipm12u[i]==1)) yccipmerror[i]=-1;
378      graph1->SetMarkerStyle(21);             else  yccipmerror[i]=0;*/
379      graph1->SetMarkerSize(0.3);             if ((yccipmkk1u[i]==1  && ydea[6*i]<0.65  &&  ydea[6*i+1]>3.15 && ydea[6*i+1]<4.25) || (yccipmkk1u[i]==1  && ydea[6*i+1]<0.65  &&  ydea[6*i]>3.15 && ydea[6*i]<4.25)) yccipmerror[i]=1;
380      graph1->SetMinimum(0.0);             else if ((yccipmkk1d[i]==-1 && ydea[6*i]<0.65  && ydea[6*i+1]>3.15 && ydea[6*i+1]<4.25) || (yccipmkk1d[i]==-1 && ydea[6*i+1]<0.65  && ydea[6*i]>3.15 && ydea[6*i]<4.25) || (yccipmkk1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65)) yccipmerror[i]=-1;
381      graph1->SetMaximum(5.0);             else  yccipmerror[i]=0;
382      graph1->GetXaxis()->SetTitle("OBT");           }
383      graph1->GetXaxis()->CenterTitle();         }
384      graph1->GetYaxis()->SetTitle("Voltage value (V)");         if (k==6 || k==7 || k==8 || k==9) {
385      graph1->GetYaxis()->CenterTitle();           /*if (yccdiagacq_1d[i]==-1 && yccipm12u[i]==1) yccipmerror2[i]=-1;
386      oss.str("");           else yccipmerror2[i]=0;*/
387      oss <<  filename.Data()<<": IPM "<<k+1<<" Voltage";           if (yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65 && ydea[6*i+1]<0.65) yccipmerror2[i]=-1;
388      graph1->SetTitle(oss.str().c_str());           else yccipmerror2[i]=0;
389      graph1->Draw("ACP");         }
390      pt1->Draw();         if (k==13) {
391      pt->Draw();           if ((yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65  &&  ydea[6*i+1]>3.15 && ydea[6*i+1]<4.25) || (yccdiagacq_1d[i]==-1 && ydea[6*i+1]<0.65  &&  ydea[6*i]>3.15 && ydea[6*i]<4.25))  yccdiagacq_1d[i]==-1;                                   //psb on
392             if (yccdiagacq_1u[i]==1  && ydea[6*i]<0.65  &&  ydea[6*i+1]<0.65)   yccdiagacq_1u[i]==1;   //psb off
393      TGraph *graph2 = new TGraph(recordstot, xrecordobtth_1, limvolt2);           /*if (yccdiagacq_1d[i]==-1 && yccipm12d[i]==-1) yccipmerror[i]=-1;
394      graph2->SetMarkerColor(50);           else if (yccdiagacq_1u[i]==1  && yccipm12d[i]==0 && yccipm12u[i]==0) yccipmerror[i]=1;
395      graph2->SetLineColor(50);           else yccipmerror[i]=0;*/      
396      graph2->SetMarkerStyle(21);           if (yccdiagacq_1d[i]==-1 && ydea[6*i]<0.65  &&  ydea[6*i+1]<0.65) yccipmerror[i]=-1;
397      graph2->SetMarkerSize(0.2);           else if ((yccdiagacq_1u[i]==1 && ydea[6*i]<0.65  &&  ydea[6*i+1]>3.15 && ydea[6*i+1]<4.25) || (yccdiagacq_1u[i]==1 && ydea[6*i+1]<0.65  &&  ydea[6*i]>3.15 && ydea[6*i]<4.25)) yccipmerror[i]=1;
398      graph2->SetMinimum(0.0);           else yccipmerror[i]=0;                                                                    //psb alarm
399      graph2->SetMaximum(5.0);         }
400      graph2->Draw("CP");         if (k==15) {
401             yccdiagacq_11u[i]=0;
402      TGraph *graph3 = new TGraph(recordstot, xrecordobtth_1, limvolt3);           yccdiagacq_11d[i]=0;
403      graph3->SetMarkerColor(50);         }
404      graph3->SetLineColor(50);       }
405      graph3->SetMarkerStyle(21);      
406      graph3->SetMarkerSize(0.2);       //CC IPM
407      graph3->SetMinimum(0.0);       if (k==0 || k==1 ||k==2 || k==3 || k==4 || k==5 ){  
408      graph3->SetMaximum(5.0);         Canvascc->cd(m+1);
409      graph3->Draw("CP");         Canvascc->cd(m+1)->SetGridx();
410           gPad->SetFillColor(10);
411      TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1);         gPad->SetFrameBorderSize(0);
412      dearecord->SetLineColor(kBlue);         gPad->SetLineColor(1);
413      dearecord->SetLineWidth(1);         gPad->SetFrameBorderMode(0);
414      dearecord->SetMarkerStyle(21);        
415      dearecord->SetMarkerSize(0.5);        
416      dearecord->SetMarkerColor(kBlue);         pt = new TPaveText (.01,.30,.10,.70);
417      dearecord->Draw("CPL");         oss.str("");
418    }         oss<<titolocc[k];
419             pt->AddText(oss.str().c_str());
420           pt->SetFillColor(10);
421           pt->SetBorderSize(0);
422           pt->Draw();
423          
424          
425           TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d);
426           ccrecordd->SetTitle("");
427           ccrecordd->SetFillColor(8);
428           ccrecordd->GetXaxis()->SetLabelSize(0);
429           ccrecordd->GetXaxis()->SetTickLength(0);
430           ccrecordd->GetYaxis()->SetLabelSize(0);
431           ccrecordd->GetYaxis()->SetTickLength(0);
432           ccrecordd->SetMaximum(1.3);
433           ccrecordd->SetMinimum(-1.3);
434           ccrecordd->GetXaxis()->SetAxisColor(0);
435           ccrecordd->Draw("AB");
436           if (k==0) leg1->AddEntry(ccrecordd,"ON","f");
437          
438           TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u);
439           ccrecordu->SetTitle("");
440           ccrecordu->SetFillColor(17);
441           ccrecordu->GetXaxis()->SetLabelSize(0);
442           ccrecordu->GetXaxis()->SetTickLength(0);
443           ccrecordu->GetYaxis()->SetLabelSize(0);
444           ccrecordu->GetYaxis()->SetTickLength(0);  
445           ccrecordu->GetXaxis()->SetAxisColor(0);
446           ccrecordu->SetMaximum(1.3);
447           ccrecordu->SetMinimum(-1.3);
448           ccrecordu->Draw("Bsame");
449           if (k==0) leg1->AddEntry(ccrecordu,"OFF","f");
450          
451        
452           if (k==1 || k==3 || k==5){
453             Canvascc->cd(m);
454             TGraph *ccrecorderrord = new TGraph(recordstot, xrecordobtcc_1, yccipmkk1d);
455             ccrecorderrord->SetTitle("");
456             ccrecorderrord->SetFillColor(2);
457             ccrecorderrord->GetXaxis()->SetLabelSize(0);
458             ccrecorderrord->GetXaxis()->SetTickLength(0);
459             ccrecorderrord->GetYaxis()->SetLabelSize(0);
460             ccrecorderrord->GetYaxis()->SetTickLength(0);
461             ccrecorderrord->SetMaximum(1.3);
462             ccrecorderrord->SetMinimum(-1.3);
463             ccrecorderrord->GetXaxis()->SetAxisColor(0);
464             ccrecorderrord->Draw("Bsame");
465            
466             TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmkk1u);
467             ccrecorderroru->SetTitle("");
468             ccrecorderroru->SetFillColor(2);
469             ccrecorderroru->GetXaxis()->SetLabelSize(0);
470             ccrecorderroru->GetXaxis()->SetTickLength(0);
471             ccrecorderroru->GetYaxis()->SetLabelSize(0);
472             ccrecorderroru->GetYaxis()->SetTickLength(0);
473             ccrecorderroru->SetMaximum(1.3);
474             ccrecorderroru->SetMinimum(-1.3);
475             ccrecorderroru->GetXaxis()->SetAxisColor(0);
476             ccrecorderroru->Draw("Bsame");
477            
478             Canvascc->cd(m+1);
479             ccrecorderrord->Draw("Bsame");
480             ccrecorderroru->Draw("Bsame");
481           }
482          
483          
484           Double_t xmin;
485           Double_t xmax;
486           xmin=ccrecordu->GetXaxis()->GetXmin();
487           xmax=ccrecordu->GetXaxis()->GetXmax();
488           TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0);
489           axis->Draw("same");
490           /*TF1 *func1 = new TF1("func1", "0");
491             func1->SetRange(xmin,xrecordobtcc_1[recordstot-1]);
492             func1->SetLineColor(1);
493             func1->SetLineStyle(1);
494             func1->SetLineWidth(2);
495             func1->Draw("same");*/
496          
497           m=m+1;
498         }
499        
500         //CC idaq-khb-tof
501         if (k==6 || k==7 || k==8 || k==9 || k==14 || k==15){  
502           Canvascc->cd(l+7);
503           gPad->SetFillColor(10);
504           gPad->SetFrameBorderSize(0);
505          
506           pt = new TPaveText (.00,.30,.09,.70);
507           oss.str("");
508           oss<<titolocc[k];
509           pt->AddText(oss.str().c_str());
510           pt->SetFillColor(10);
511           pt->SetBorderSize(0);
512           pt->Draw();
513          
514          
515           TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d);
516           ccrecordd->SetTitle("");
517           if (k==14 || k==15)  ccrecordd->SetFillColor(2);
518           else ccrecordd->SetFillColor(8);
519           ccrecordd->GetXaxis()->SetLabelSize(0);
520           ccrecordd->GetXaxis()->SetTickLength(0);
521           ccrecordd->GetYaxis()->SetLabelSize(0);
522           ccrecordd->GetYaxis()->SetTickLength(0);
523           ccrecordd->SetMaximum(1.3);
524           ccrecordd->SetMinimum(-1.3);
525           ccrecordd->GetXaxis()->SetAxisColor(0);
526           ccrecordd->Draw("AB");
527    
528           TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u);
529           ccrecordu->SetTitle("");
530           if (k==14 || k==15) {
531             ccrecordu->SetFillColor(7);
532             if (k==14) leg1->AddEntry(ccrecordu,"ON-OFF-LATCHUP","f");
533           }
534           else ccrecordu->SetFillColor(17);
535           ccrecordu->GetXaxis()->SetAxisColor(0);
536           ccrecordu->GetXaxis()->SetLabelSize(0);
537           ccrecordu->GetXaxis()->SetTickLength(0);
538           ccrecordu->GetYaxis()->SetLabelSize(0);
539           ccrecordu->GetYaxis()->SetTickLength(0);
540           ccrecordu->SetMaximum(1.3);
541           ccrecordu->SetMinimum(-1.3);
542           ccrecordu->Draw("Bsame");
543          
544           if (k==6 || k==7 || k==8 || k==9){
545             Canvascc->cd(l+7);
546             TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror2);
547             ccrecorderroru->SetTitle("");
548             ccrecorderroru->SetFillColor(2);
549             ccrecorderroru->GetXaxis()->SetLabelSize(0);
550             ccrecorderroru->GetXaxis()->SetTickLength(0);
551             ccrecorderroru->GetYaxis()->SetLabelSize(0);
552             ccrecorderroru->GetYaxis()->SetTickLength(0);
553             ccrecorderroru->SetMaximum(1.3);
554             ccrecorderroru->SetMinimum(-1.3);
555             ccrecorderroru->GetXaxis()->SetAxisColor(0);
556             ccrecorderroru->Draw("Bsame");
557           }
558          
559          
560            if (k==7 || k==9){
561             Canvascc->cd(l+7-1);
562             TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror);
563             ccrecorderroru->SetTitle("");
564             ccrecorderroru->SetFillColor(2);
565             ccrecorderroru->GetXaxis()->SetLabelSize(0);
566             ccrecorderroru->GetXaxis()->SetTickLength(0);
567             ccrecorderroru->GetYaxis()->SetLabelSize(0);
568             ccrecorderroru->GetYaxis()->SetTickLength(0);
569             ccrecorderroru->SetMaximum(1.3);
570             ccrecorderroru->SetMinimum(-1.3);
571             ccrecorderroru->GetXaxis()->SetAxisColor(0);
572             if (k==7) leg1->AddEntry(ccrecorderroru,"ALARM","f");
573             ccrecorderroru->Draw("Bsame");
574            
575             Canvascc->cd(l+7);  
576             ccrecorderroru->Draw("Bsame");
577             }
578          
579          
580           Double_t xmin;
581           Double_t xmax;
582           xmin=ccrecordu->GetXaxis()->GetXmin();
583           xmax=ccrecordu->GetXaxis()->GetXmax();
584           TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 1.5);
585           axis->Draw("same");
586           /*TF1 *func1 = new TF1("func1", "0");
587             func1->SetRange(xmin,xrecordobtcc_1[recordstot-1]);
588             func1->SetLineColor(1);
589             func1->SetLineStyle(1);
590             func1->SetLineWidth(2);
591             func1->Draw("same");*/
592           l=l+1;
593          
594         }
595        
596         //CC vrl
597         if (k==11 || k==12 || k==13 ){  
598           if (k==13) Canvascc->cd(13);
599           if (k==11) Canvascc->cd(14);
600           if (k==12) Canvascc->cd(15);
601           gPad->SetFillColor(10);
602           gPad->SetFrameBorderSize(0);
603          
604           pt = new TPaveText (.01,.30,.09,.70);
605           oss.str("");
606           oss<<titolocc[k];
607           pt->AddText(oss.str().c_str());
608           pt->SetFillColor(10);
609           pt->SetBorderSize(0);
610           pt->Draw();
611          
612           if (k==11 || k==12){
613             TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d);
614             ccrecordd->SetTitle("");
615             ccrecordd->SetFillColor(8);
616             ccrecordd->GetXaxis()->SetAxisColor(0);
617             ccrecordd->GetXaxis()->SetLabelSize(0);
618             ccrecordd->GetXaxis()->SetTickLength(0);
619             ccrecordd->GetYaxis()->SetLabelSize(0);
620             ccrecordd->GetYaxis()->SetTickLength(0);
621             ccrecordd->SetMaximum(1.3);
622             ccrecordd->SetMinimum(-1.3);
623             ccrecordd->Draw("AB");
624            
625            
626             TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u);
627             ccrecordu->SetTitle("");
628             ccrecordu->SetFillColor(17);
629             ccrecordu->GetXaxis()->SetAxisColor(0);
630             ccrecordu->GetXaxis()->SetLabelSize(0);
631             ccrecordu->GetXaxis()->SetTickLength(0);
632             ccrecordu->GetYaxis()->SetLabelSize(0);
633             ccrecordu->GetYaxis()->SetTickLength(0);
634             ccrecordu->SetMaximum(1.3);
635             ccrecordu->SetMinimum(-1.3);
636             ccrecordu->Draw("Bsame");
637            
638             Double_t xmin;
639             Double_t xmax;
640             xmin=ccrecordu->GetXaxis()->GetXmin();
641             xmax=ccrecordu->GetXaxis()->GetXmax();
642             if (k==12){
643               TGaxis *axis = new TGaxis (xmin, -1, xmax, -1, xmin, xmax, 510, "", 0);
644               axis->SetLabelSize(0.24);
645               axis->SetLabelColor(1);
646               axis->SetTitle("OBT (ms)");
647               //axis->CenterTitle();
648               axis->SetTitleOffset(0.4);
649               axis->SetTitleSize(0.21);
650               axis->Draw();
651               TF1 *func1 = new TF1("func1", "0");
652               func1->SetRange(xmin,xmax);
653               func1->SetLineColor(1);
654               func1->SetLineStyle(1);
655               func1->SetLineWidth(1);
656               func1->Draw("same");
657             }
658             if (k==11){
659               TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0);
660               axis->SetLineWidth(1);
661               axis->SetTickSize(2);
662               axis->Draw("same");
663             }
664           }
665          
666           if (k==13){
667             Canvascc->cd(13);
668            
669             TGraph *ccrecordd = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1d);
670             ccrecordd->SetTitle("");
671             ccrecordd->SetFillColor(8);
672             ccrecordd->GetXaxis()->SetAxisColor(0);
673             ccrecordd->GetXaxis()->SetLabelSize(0);
674             ccrecordd->GetXaxis()->SetTickLength(0);
675             ccrecordd->GetYaxis()->SetLabelSize(0);
676             ccrecordd->GetYaxis()->SetTickLength(0);
677             ccrecordd->SetMaximum(1.3);
678             ccrecordd->SetMinimum(-1.3);
679             ccrecordd->Draw("AB");
680            
681             TGraph *ccrecordu = new TGraph(recordstot, xrecordobtcc_1, yccdiagacq_1u);
682             ccrecordu->SetTitle("");
683             ccrecordu->SetFillColor(17);
684             ccrecordu->GetXaxis()->SetAxisColor(0);
685             ccrecordu->GetXaxis()->SetLabelSize(0);
686             ccrecordu->GetXaxis()->SetTickLength(0);
687             ccrecordu->GetYaxis()->SetLabelSize(0);
688             ccrecordu->GetYaxis()->SetTickLength(0);
689             ccrecordu->SetMaximum(1.3);
690             ccrecordu->SetMinimum(-1.3);
691             ccrecordu->Draw("Bsame");
692            
693             TGraph *ccrecorderroru = new TGraph(recordstot, xrecordobtcc_1, yccipmerror);
694             ccrecorderroru->SetTitle("");
695             ccrecorderroru->SetFillColor(2);
696             ccrecorderroru->GetXaxis()->SetLabelSize(0);
697             ccrecorderroru->GetXaxis()->SetTickLength(0);
698             ccrecorderroru->GetYaxis()->SetLabelSize(0);
699             ccrecorderroru->GetYaxis()->SetTickLength(0);
700             ccrecorderroru->SetMaximum(1.3);
701             ccrecorderroru->SetMinimum(-1.3);
702             ccrecorderroru->GetXaxis()->SetAxisColor(0);
703             ccrecorderroru->Draw("Bsame");
704            
705            
706             Double_t xmin=ccrecordu->GetXaxis()->GetXmin();
707             Double_t xmax=ccrecordu->GetXaxis()->GetXmax();
708             TGaxis *axis = new TGaxis (xmin, 0, xmax, 0, xmin, xmax, 510, "+-", 0);
709             axis->SetLineWidth(1);
710             axis->SetTickSize(2);
711             axis->Draw("same");
712           }
713          
714         }
715        
716       }
717      
718       Canvascc->cd();
719       leg1->Draw();        
720       Canvascc->Update();
721      
722       // TH Graph
723       Canvasthdea->cd();
724       //thermistors number=16
725       if (tr->GetBranch("Records.TM_TH_ANA[16]")){
726         for (Int_t k =0; k<16; k++){
727           for (Int_t i = 0; i < recordstot; i++){
728             ythana_1[i]= ythana[16*i+k];
729             xrecordobtth_1[i]= xrecordobtth[16*i+k];
730           }
731           Canvasthdea->cd(k+1);
732          
733           TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1);
734           threcord->SetLineColor(kBlue);
735           threcord->SetMarkerColor(kBlue);
736           threcord->SetMarkerStyle(21);
737           threcord->SetMinimum(-10);
738           threcord->SetMaximum(60);
739           threcord->GetXaxis()->SetTitle("OBT");
740           threcord->GetXaxis()->CenterTitle();
741           threcord->GetYaxis()->SetTitle("Temperature value (°C)");
742           threcord->GetYaxis()->CenterTitle();
743           oss.str("");
744           oss << filename.Data() <<":  " <<titoloth[k] ;
745           threcord->SetTitle(oss.str().c_str());
746          
747           Double_t xmin=threcord->GetXaxis()->GetXmin();
748           Double_t xmax=threcord->GetXaxis()->GetXmax();
749           if (k==10 || k==11 ) {
750             TPaveText *pt = new TPaveText (.45,.75,.55,.82);
751             pt->AddText("OFF");
752             pt->SetBorderSize(1);
753             pt->Draw();
754             threcord->Draw("ACsame");
755             TF1 *func1 = new TF1("func1", "50");
756             func1->SetRange(xmin,xmax);
757             func1->SetLineColor(2);
758             func1->SetLineStyle(1);
759             func1->SetLineWidth(2);
760             func1->Draw("same");
761             pt->Draw();
762           }else {
763             TPaveText *pt = new TPaveText (.45,.7,.55,.77);
764             pt->AddText("OFF");
765             pt->SetBorderSize(1);
766             pt->Draw();
767             threcord->Draw("ACsame");
768             TF1 *func1 = new TF1("func1", "45");
769             func1->SetRange(xmin,xmax);
770             func1->SetLineColor(2);
771             func1->SetLineStyle(1);
772             func1->SetLineWidth(2);
773             func1->Draw("same");
774             pt->Draw();
775           }
776        
777    
778    
779         }
780       }  
781      
782       // DEA Graph
783       Canvasvoltdea->cd();
784       for (Int_t k =0; k<6; k++){
785         for (Int_t i = 0; i < recordstot; i++){
786           ydea_1[i]= ydea[6*i + k];
787           xrecordobtdea_1[i]= xrecordobtdea[6*i+k];
788         }
789         Canvasvoltdea->cd(k+1);
790    
791         TPaveText *pt = new TPaveText (.84,.13,.92,.19);
792         pt->AddText("OFF");
793         pt->SetBorderSize(1);
794         pt->Draw();
795         TPaveText *pt1 = new TPaveText (.84,.67,.92,.73);
796         pt1->AddText("ON");
797         pt1->SetBorderSize(1);
798         pt1->Draw();
799        
800         TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1);
801         dearecord->SetLineColor(kBlue);
802         dearecord->SetLineWidth(1);
803         dearecord->SetMarkerStyle(21);
804         dearecord->SetMarkerSize(0.5);
805         dearecord->SetMarkerColor(kBlue);
806         dearecord->SetMinimum(0.0);
807         dearecord->SetMaximum(5.0);
808         dearecord->GetXaxis()->SetTitle("OBT");
809         dearecord->GetXaxis()->CenterTitle();
810         dearecord->GetYaxis()->SetTitle("Voltage value (V)");
811         dearecord->GetYaxis()->CenterTitle();
812         oss.str("");
813         oss <<  filename.Data()<<": IPM "<<k+1<<" output";
814         dearecord->SetTitle(oss.str().c_str());
815         dearecord->Draw("ACPLsame");
816    
817         Double_t xmin=dearecord->GetXaxis()->GetXmin();
818         Double_t xmax=dearecord->GetXaxis()->GetXmax();
819         TF1 *func1 = new TF1("func1", "0.65");
820         func1->SetRange(xmin, xmax);
821         func1->SetLineColor(2);
822         func1->SetLineStyle(1);
823         func1->SetLineWidth(2);
824         func1->Draw("Csame");
825    
826         TF1 *func2 = new TF1("func2", "3.15");
827         func2->SetRange(xmin, xmax);
828         func2->SetLineColor(2);
829         func2->SetLineStyle(1);
830         func2->SetLineWidth(2);
831         func2->Draw("Csame");
832    
833         TF1 *func3 = new TF1("func3", "4.25");
834         func3->SetRange(xmin, xmax);
835         func3->SetLineColor(2);
836         func3->SetLineStyle(1);
837         func3->SetLineWidth(2);
838         func3->Draw("Csame");
839    
840    
841         pt1->Draw();
842         pt->Draw();
843       }
844      
845      
846       stringstream  oss1, oss2, oss3, oss4;
847       oss.str("");
848       oss1.str("");
849       oss2.str("");
850       oss  << outDir.Data() << filename.Data() << "_Tmtc_cc_"<<interval+1<<"." << format;
851       oss1 << outDir.Data() << filename.Data() << "_Tmtc_th_dea_"<<interval+1<<"." << format;
852       oss2 << outDir.Data() << filename.Data() << "_Tmtc_volt_dea_"<<interval+1<<"." << format;
853       Canvascc->SaveAs(oss.str().c_str());
854       Canvasthdea->SaveAs(oss1.str().c_str());
855       Canvasvoltdea->SaveAs(oss2.str().c_str());     //// fine del lavoro sul sottogruppo
856      
857       Canvascc->Clear();
858       Canvasthdea->Clear();
859       Canvasvoltdea->Clear();
860       //gROOT->GetListOfCanvases()->Delete();
861       //gROOT->Reset();
862      
863     }
864    
   stringstream  oss1, oss2, oss3, oss4;  
   oss.str("");  
   oss1.str("");  
   oss2.str("");  
   oss3.str("");  
   oss4.str("");  
   oss  << outDir.Data() << filename.Data() << "_Tmtc_cc_hot." << format;  
   oss3 << outDir.Data() << filename.Data() << "_Tmtc_cc_cold." << format;  
   oss4 << outDir.Data() << filename.Data() << "_Tmtc_cc_vrl." << format;  
   oss1 << outDir.Data() << filename.Data() << "_Tmtc_th_dea." << format;  
   oss2 << outDir.Data() << filename.Data() << "_Tmtc_volt_dea." << format;  
   Canvascchot->SaveAs(oss.str().c_str());  
   Canvascccold->SaveAs(oss3.str().c_str());  
   Canvasccvrl->SaveAs(oss4.str().c_str());  
   Canvasthdea->SaveAs(oss1.str().c_str());  
   Canvasvoltdea->SaveAs(oss2.str().c_str());  
865    
866    file->Close();   file->Close();
867  }  }
868    
869    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23