Changeset 8929 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 06/08/08 13:55:36 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc
r8695 r8929 19 19 ! Author(s): Wolfgang Wittek, 1/2002 <mailto:wittek@mppmu.mpg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 421 ! Copyright: MAGIC Software Development, 2000-2008 22 22 ! 23 23 ! … … 70 70 // Input Container: 71 71 // MPointingPos 72 // MRawRunHeader 73 // MTime 72 74 // 73 75 // Output Container: … … 81 83 // + UInt_t fNumEvents; 82 84 // - Int_t fNumEvents; 85 // 86 // Class version 3: 87 // ---------------- 88 // + Double_t fTotalTime; 83 89 // 84 90 // … … 276 282 #include "MParameters.h" 277 283 #include "MPointingPos.h" 284 #include "MRawRunHeader.h" 278 285 279 286 #include "MBinning.h" … … 293 300 MHEffectiveOnTime::MHEffectiveOnTime(const char *name, const char *title) 294 301 : fPointPos(0), fTime(0), fParam(0), fIsFinalized(kFALSE), 295 fNumEvents(200*60), fFirstBin(3) 302 fNumEvents(200*60), fFirstBin(3), fTotalTime(-1) 296 303 //fNumEvents(2*60), fFirstBin(1) 297 304 { … … 469 476 SetBinning(&fH2DeltaT, binsdtime, binstheta); 470 477 478 fTotalTime = 0; 479 471 480 return kTRUE; 481 } 482 483 Bool_t MHEffectiveOnTime::ReInit(MParList *pList) 484 { 485 MRawRunHeader *header = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 486 if (header) 487 { 488 *fLog << err << "MRawRunHeader not found... aborting." << endl; 489 return kFALSE; 490 } 491 492 fTotalTime += header->GetRunLength(); 493 494 return kTRUE; 472 495 } 473 496 … … 771 794 text.SetTextSize(0.04); 772 795 773 text.SetText(0.45, 0.94, Form("T_{eff} = %.1fs \\pm %.1fs", val, error));774 text.Paint();775 776 if ( range<0)777 return;778 779 text.SetText(0. 66, 0.94, Form("T_{axe} = %.1fs", range));796 TString txt = Form("T_{eff} = %.1fs \\pm %.1fs", val, error); 797 if (range>0) 798 txt += Form(" T_{axe} = %.1fs", range); 799 if (fTotalTime>0) 800 txt += Form(" T_{max} = %.1fs", fTotalTime); 801 802 text.SetText(0.35, 0.94, txt); 780 803 text.Paint(); 781 804 } -
trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.h
r7818 r8929 50 50 UInt_t fFirstBin; // For bin for fit 51 51 52 Double_t fTotalTime; //[s] Total time accumulated from run-header 53 54 // MHEffectiveOnTime 52 55 Bool_t FitH(TH1D *h, Double_t *res, Bool_t paint=kFALSE) const; 53 56 void FitThetaBins(); … … 60 63 void PrintStatistics(); 61 64 65 // MH 62 66 Bool_t SetupFill(const MParList *pList); 67 Bool_t ReInit(MParList *pList); 63 68 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 64 69 Bool_t Finalize(); 65 70 71 // MParContainer 66 72 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 67 73 … … 69 75 MHEffectiveOnTime(const char *name=NULL, const char *title=NULL); 70 76 77 // Setter 71 78 void SetNumEvents(Int_t i) { fNumEvents=i; } 72 79 void SetFirstBin(Int_t i) { fFirstBin=i; } 80 81 // Getter 82 Double_t GetTotalTime() const { return fTotalTime; } 73 83 74 84 const TH1D &GetHEffOnTheta() const { return fHThetaEffOn; } … … 77 87 const TH2D &GetH2DeltaT() const { return fH2DeltaT; } 78 88 89 // TObject 79 90 void Draw(Option_t *option=""); 80 91 void Paint(Option_t *opt=""); 81 92 82 ClassDef(MHEffectiveOnTime, 2) // Histogram to determin effective On-Time vs Time and Zenith Angle93 ClassDef(MHEffectiveOnTime, 3) // Histogram to determin effective On-Time vs Time and Zenith Angle 83 94 }; 84 95
Note:
See TracChangeset
for help on using the changeset viewer.