/[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.3 by pam-fi, Tue Jun 20 11:10:38 2006 UTC revision 1.4 by pam-rm2, Wed Jun 21 12:56:21 2006 UTC
# Line 213  void TmtcTemperature(TString base, TStri Line 213  void TmtcTemperature(TString base, TStri
213    
214  string titolocc[] ={"IPM1","IPM2","IPM3","IPM4","IPM5","IPM6","KHB_HOT","KHB_COLD","IDAQ_HOT","IDAQ_COLD","VCB_STANDBY","VRL_HOT","VRL_COLD","PSB","TOFHV_HOT","TOFHV_COLD"};  string titolocc[] ={"IPM1","IPM2","IPM3","IPM4","IPM5","IPM6","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_TH","DCDC_TH","CPU_TH1","CPU_TH2", "IPM_CPU_TH", "VRL_TH1", "VRL_TH2", "VME_COOL_TH"};   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;    const Int_t size = nevents;
# Line 238  string titolocc[] ={"IPM1","IPM2","IPM3" Line 238  string titolocc[] ={"IPM1","IPM2","IPM3"
238          ev[0]=0;          ev[0]=0;
239          records[0]=0;          records[0]=0;
240          OBT[0]=tmr->TM_RECORD_OBT;          OBT[0]=tmr->TM_RECORD_OBT;
241        }else if (fmod(i, 50)==0 || ((tmr->TM_RECORD_OBT)<OBT[i-1]) || (i==(size-1)) ){        }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)) ){          //}else if ((fmod(i, 20)==0) || (i==(size-1)) ){
243          tot=tot+1;          tot=tot+1;
244          if (recordstotmax<recordstot) recordstotmax=recordstot;          if (recordstotmax<recordstot) recordstotmax=recordstot;
# Line 256  string titolocc[] ={"IPM1","IPM2","IPM3" Line 256  string titolocc[] ={"IPM1","IPM2","IPM3"
256    const Int_t lungmin=6*recordstotmax;    const Int_t lungmin=6*recordstotmax;
257        
258        
259     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], limth[lungmax], limvolt1[lungmin], limvolt2[lungmin], limvolt3[lungmin];       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     Double_t yccdiagacq_11u[lungmax], yccdiagacq_11d[lungmax], yccipm12u[lungmax], yccipm12d[lungmax], yccipmkk1u[lungmax], yccipmkk1d[lungmax], yccipmerror[lungmax],  yccipmerror2[lungmax];     Double_t yccdiagacq_11u[lungmax], yccdiagacq_11d[lungmax], yccipm12u[lungmax], yccipm12d[lungmax], yccipmkk1u[lungmax], yccipmkk1d[lungmax], yccipmerror[lungmax],  yccipmerror2[lungmax];
262    
# Line 713  string titolocc[] ={"IPM1","IPM2","IPM3" Line 713  string titolocc[] ={"IPM1","IPM2","IPM3"
713        
714     // TH Graph     // TH Graph
715     Canvasthdea->cd();     Canvasthdea->cd();
    //thermistors number 12  
    if (tr->GetBranch("Records.TM_TH_ANA[12]")){  
      for (Int_t k =0; k<12; k++){  
        for (Int_t i = 0; i < recordstot; i++){  
          ythana_1[i]= ythana[12*i+k];  
          xrecordobtth_1[i]= xrecordobtth[12*i+k];  
          limth[i] = 45;  
        }  
        Canvasthdea->cd(k+1);  
        TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth);  
        graph->SetMarkerColor(50);  
        graph->SetLineColor(50);  
        graph->SetMarkerStyle(21);  
        graph->SetMarkerSize(0.3);  
        graph->SetMinimum(-10);  
        graph->SetMaximum(60);  
        graph->GetXaxis()->SetTitle("OBT");  
        graph->GetXaxis()->CenterTitle();  
        graph->GetYaxis()->SetTitle("Temperature value (C)");  
        graph->GetYaxis()->CenterTitle();  
        oss.str("");  
        oss << filename.Data() <<":  " <<titoloth[k] ;  
        graph->SetTitle(oss.str().c_str());  
         
        TPaveText *pt = new TPaveText (.45,.7,.55,.77);  
        pt->AddText("OFF");  
        pt->SetBorderSize(1);  
        pt->Draw();  
        graph->Draw("ACP");  
        pt->Draw();  
         
        TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1);  
        threcord->SetLineColor(kBlue);  
        threcord->SetMarkerColor(kBlue);  
        threcord->SetMarkerStyle(21);  
        threcord->Draw("C");  
      }  
    }  
716     //thermistors number=16     //thermistors number=16
717     if (tr->GetBranch("Records.TM_TH_ANA[16]")){     if (tr->GetBranch("Records.TM_TH_ANA[16]")){
718       for (Int_t k =0; k<16; k++){       for (Int_t k =0; k<16; k++){
719         for (Int_t i = 0; i < recordstot; i++){         for (Int_t i = 0; i < recordstot; i++){
720           ythana_1[i]= ythana[16*i+k];           ythana_1[i]= ythana[16*i+k];
721           xrecordobtth_1[i]= xrecordobtth[16*i+k];           xrecordobtth_1[i]= xrecordobtth[16*i+k];
          limth[i] = 45;  
722         }         }
723         Canvasthdea->cd(k+1);         Canvasthdea->cd(k+1);
        TGraph *graph = new TGraph(recordstot, xrecordobtth_1, limth);  
        graph->SetMarkerColor(50);  
        graph->SetLineColor(50);  
        graph->SetMarkerStyle(21);  
        graph->SetMarkerSize(0.3);  
        graph->SetMinimum(-10);  
        graph->SetMaximum(60);  
        graph->GetXaxis()->SetTitle("OBT");  
        graph->GetXaxis()->CenterTitle();  
        graph->GetYaxis()->SetTitle("Temperature value (C)");  
        graph->GetYaxis()->CenterTitle();  
        oss.str("");  
        oss << filename.Data() <<":  " <<titoloth[k] ;  
        graph->SetTitle(oss.str().c_str());  
         
        TPaveText *pt = new TPaveText (.45,.7,.55,.77);  
        pt->AddText("OFF");  
        pt->SetBorderSize(1);  
        pt->Draw();  
        graph->Draw("ACP");  
        pt->Draw();  
724                
725         TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1);         TGraph *threcord = new TGraph(recordstot, xrecordobtth_1, ythana_1);
726         threcord->SetLineColor(kBlue);         threcord->SetLineColor(kBlue);
727         threcord->SetMarkerColor(kBlue);         threcord->SetMarkerColor(kBlue);
728         threcord->SetMarkerStyle(21);         threcord->SetMarkerStyle(21);
729         threcord->Draw("C");         threcord->SetMinimum(-10);
730           threcord->SetMaximum(60);
731           threcord->GetXaxis()->SetTitle("OBT");
732           threcord->GetXaxis()->CenterTitle();
733           threcord->GetYaxis()->SetTitle("Temperature value (°C)");
734           threcord->GetYaxis()->CenterTitle();
735           oss.str("");
736           oss << filename.Data() <<":  " <<titoloth[k] ;
737           threcord->SetTitle(oss.str().c_str());
738          
739           Double_t xmin=threcord->GetXaxis()->GetXmin();
740           Double_t xmax=threcord->GetXaxis()->GetXmax();
741           if (k==10 || k==11 ) {
742             TPaveText *pt = new TPaveText (.45,.75,.55,.82);
743             pt->AddText("OFF");
744             pt->SetBorderSize(1);
745             pt->Draw();
746             threcord->Draw("ACsame");
747             TF1 *func1 = new TF1("func1", "50");
748             func1->SetRange(xmin,xmax);
749             func1->SetLineColor(2);
750             func1->SetLineStyle(1);
751             func1->SetLineWidth(2);
752             func1->Draw("same");
753             pt->Draw();
754           }else {
755             TPaveText *pt = new TPaveText (.45,.7,.55,.77);
756             pt->AddText("OFF");
757             pt->SetBorderSize(1);
758             pt->Draw();
759             threcord->Draw("ACsame");
760             TF1 *func1 = new TF1("func1", "45");
761             func1->SetRange(xmin,xmax);
762             func1->SetLineColor(2);
763             func1->SetLineStyle(1);
764             func1->SetLineWidth(2);
765             func1->Draw("same");
766             pt->Draw();
767           }
768        
769    
770    
771       }       }
772     }       }  
773        
# Line 796  string titolocc[] ={"IPM1","IPM2","IPM3" Line 777  string titolocc[] ={"IPM1","IPM2","IPM3"
777       for (Int_t i = 0; i < recordstot; i++){       for (Int_t i = 0; i < recordstot; i++){
778         ydea_1[i]= ydea[6*i + k];         ydea_1[i]= ydea[6*i + k];
779         xrecordobtdea_1[i]= xrecordobtdea[6*i+k];         xrecordobtdea_1[i]= xrecordobtdea[6*i+k];
        limvolt1[i]= 0.65;  
        limvolt2[i]= 3.15;        
        limvolt3[i]= 4.25;  
780       }       }
781       Canvasvoltdea->cd(k+1);       Canvasvoltdea->cd(k+1);
782       TGraph *graph1 = new TGraph(recordstot, xrecordobtth_1, limvolt1);  
783       TPaveText *pt = new TPaveText (.84,.13,.92,.19);       TPaveText *pt = new TPaveText (.84,.13,.92,.19);
784       pt->AddText("OFF");       pt->AddText("OFF");
785       pt->SetBorderSize(1);       pt->SetBorderSize(1);
# Line 810  string titolocc[] ={"IPM1","IPM2","IPM3" Line 788  string titolocc[] ={"IPM1","IPM2","IPM3"
788       pt1->AddText("ON");       pt1->AddText("ON");
789       pt1->SetBorderSize(1);       pt1->SetBorderSize(1);
790       pt1->Draw();       pt1->Draw();
      graph1->SetMarkerColor(50);  
      graph1->SetLineColor(50);  
      graph1->SetMarkerStyle(21);  
      graph1->SetMarkerSize(0.3);  
      graph1->SetMinimum(0.0);  
      graph1->SetMaximum(5.0);  
      graph1->GetXaxis()->SetTitle("OBT");  
      graph1->GetXaxis()->CenterTitle();  
      graph1->GetYaxis()->SetTitle("Voltage value (V)");  
      graph1->GetYaxis()->CenterTitle();  
      oss.str("");  
      oss <<  filename.Data()<<": IPM "<<k+1<<" Voltage";  
      graph1->SetTitle(oss.str().c_str());  
      graph1->Draw("ACP");  
      pt1->Draw();  
      pt->Draw();  
       
      TGraph *graph2 = new TGraph(recordstot, xrecordobtth_1, limvolt2);  
      graph2->SetMarkerColor(50);  
      graph2->SetLineColor(50);  
      graph2->SetMarkerStyle(21);  
      graph2->SetMarkerSize(0.2);  
      graph2->SetMinimum(0.0);  
      graph2->SetMaximum(5.0);  
      graph2->Draw("CP");  
       
      TGraph *graph3 = new TGraph(recordstot, xrecordobtth_1, limvolt3);  
      graph3->SetMarkerColor(50);  
      graph3->SetLineColor(50);  
      graph3->SetMarkerStyle(21);  
      graph3->SetMarkerSize(0.2);  
      graph3->SetMinimum(0.0);  
      graph3->SetMaximum(5.0);  
      graph3->Draw("CP");  
791            
792       TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1);       TGraph *dearecord = new TGraph(recordstot, xrecordobtdea_1, ydea_1);
793       dearecord->SetLineColor(kBlue);       dearecord->SetLineColor(kBlue);
# Line 851  string titolocc[] ={"IPM1","IPM2","IPM3" Line 795  string titolocc[] ={"IPM1","IPM2","IPM3"
795       dearecord->SetMarkerStyle(21);       dearecord->SetMarkerStyle(21);
796       dearecord->SetMarkerSize(0.5);       dearecord->SetMarkerSize(0.5);
797       dearecord->SetMarkerColor(kBlue);       dearecord->SetMarkerColor(kBlue);
798       dearecord->Draw("CPL");       dearecord->SetMinimum(0.0);
799         dearecord->SetMaximum(5.0);
800         dearecord->GetXaxis()->SetTitle("OBT");
801         dearecord->GetXaxis()->CenterTitle();
802         dearecord->GetYaxis()->SetTitle("Voltage value (V)");
803         dearecord->GetYaxis()->CenterTitle();
804         oss.str("");
805         oss <<  filename.Data()<<": IPM "<<k+1<<" Voltage";
806         dearecord->SetTitle(oss.str().c_str());
807         dearecord->Draw("ACPLsame");
808    
809         Double_t xmin=dearecord->GetXaxis()->GetXmin();
810         Double_t xmax=dearecord->GetXaxis()->GetXmax();
811         TF1 *func1 = new TF1("func1", "0.65");
812         func1->SetRange(xmin, xmax);
813         func1->SetLineColor(2);
814         func1->SetLineStyle(1);
815         func1->SetLineWidth(2);
816         func1->Draw("Csame");
817    
818         TF1 *func2 = new TF1("func2", "3.15");
819         func2->SetRange(xmin, xmax);
820         func2->SetLineColor(2);
821         func2->SetLineStyle(1);
822         func2->SetLineWidth(2);
823         func2->Draw("Csame");
824    
825         TF1 *func3 = new TF1("func3", "4.25");
826         func3->SetRange(xmin, xmax);
827         func3->SetLineColor(2);
828         func3->SetLineStyle(1);
829         func3->SetLineWidth(2);
830         func3->Draw("Csame");
831    
832    
833         pt1->Draw();
834         pt->Draw();
835     }     }
836        
837        

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23