Changeset 6131 for trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
- Timestamp:
- 01/30/05 16:18:58 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
r5940 r6131 119 119 #include <TLegend.h> 120 120 #include <TGraph.h> 121 #include <TEnv.h> 121 122 122 123 ClassImp(MHCalibrationRelTimeCam); … … 134 135 const TString MHCalibrationRelTimeCam::gsHistXTitle = "Arr. Time [FADC slices]"; 135 136 const TString MHCalibrationRelTimeCam::gsHistYTitle = "Nr. events"; 137 const TString MHCalibrationRelTimeCam::fgReferenceFile = "mjobs/calibrationref.rc"; 136 138 // -------------------------------------------------------------------------- 137 139 // … … 170 172 SetHistYTitle(gsHistYTitle.Data()); 171 173 174 SetReferenceFile(); 175 176 fInnerRefTime = 2.95; 177 fOuterRefTime = 3.6; 172 178 } 173 179 … … 195 201 cam->fFirst = fFirst; 196 202 cam->fLast = fLast; 203 204 cam->fReferenceFile = fReferenceFile; 205 cam->fInnerRefTime = fInnerRefTime; 206 cam->fOuterRefTime = fOuterRefTime; 197 207 198 208 // … … 648 658 { 649 659 MHCalibrationPix &lopix = GetAverageLoGainArea(i); 650 DrawDataCheckPixel(lopix, 0.);660 DrawDataCheckPixel(lopix,i ? fOuterRefTime+1.5 : fInnerRefTime+1.5); 651 661 } 652 662 else 653 DrawDataCheckPixel(hipix, 0.);663 DrawDataCheckPixel(hipix,i ? fOuterRefTime : fInnerRefTime); 654 664 } 655 665 } … … 751 761 } 752 762 753 // DisplayRefLines(null,refline); 754 755 gPad->Modified(); 756 gPad->Update(); 763 DisplayRefLines(null,refline); 757 764 758 765 newpad->cd(2); … … 793 800 } 794 801 802 void MHCalibrationRelTimeCam::DisplayRefLines(const TH1F *hist, const Float_t refline) const 803 { 804 805 TGraph *gr = new TGraph(2); 806 gr->SetPoint(0,refline,0.); 807 gr->SetPoint(1,refline,hist->GetMaximum()); 808 gr->SetBit(kCanDelete); 809 gr->SetLineColor(kGreen); 810 gr->SetLineStyle(2); 811 gr->SetLineWidth(3); 812 gr->Draw("L"); 813 814 TLegend *leg = new TLegend(0.8,0.65,0.99,0.99); 815 leg->SetBit(kCanDelete); 816 leg->AddEntry(gr,"Trigger Time Calib.","l"); 817 leg->Draw(); 818 } 819 820 Int_t MHCalibrationRelTimeCam::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 821 { 822 823 Bool_t rc = kFALSE; 824 825 if (IsEnvDefined(env, prefix, "ReferenceFile", print)) 826 { 827 SetReferenceFile(GetEnvValue(env,prefix,"ReferenceFile",fReferenceFile.Data())); 828 rc = kTRUE; 829 } 830 831 TEnv refenv(fReferenceFile); 832 833 fInnerRefTime = refenv.GetValue("InnerRefTime",fInnerRefTime); 834 fOuterRefTime = refenv.GetValue("OuterRefTime",fOuterRefTime); 835 836 return MHCalibrationCam::ReadEnv(env,prefix,print) ? kTRUE : rc; 837 838 }
Note:
See TracChangeset
for help on using the changeset viewer.