source: branches/AddingGoogleTestEnvironment/mcalib/MCalibCalcFromPast.h@ 18015

Last change on this file since 18015 was 8452, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 3.4 KB
Line 
1#ifndef MARS_MCalibCalcFromPast
2#define MARS_MCalibCalcFromPast
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8#ifndef ROOT_TArrayF
9#include <TArrayF.h>
10#endif
11
12class MParList;
13class MGeomCam;
14class MRawRunHeader;
15class MPedCalcFromLoGain;
16class MCalibrationChargeCalc;
17class MCalibrationRelTimeCalc;
18class MCalibrateData;
19class MCalibrationChargeCam;
20class MCalibrationBlindCam;
21class MCalibrationQECam;
22
23class MBadPixelsCam;
24
25class MCalibCalcFromPast : public MTask
26{
27private:
28 static const UInt_t fgNumEventsDump; //! Default for fNumEventsDump
29 static const UInt_t fgNumPhesDump; //! Default for fNumPhesDump
30
31 MGeomCam *fGeom; //! Camera Geometry
32 MParList *fParList; //! Parameter List
33 MRawRunHeader *fRunHeader; //! Run header storing the run number
34 MCalibrationChargeCam *fCharge; //! Intensity Charge Cam (to be created)
35
36 MCalibrationBlindCam *fBlindCam; //! Blind Cam
37 MCalibrationQECam *fQECam; //! QE Cam
38 MBadPixelsCam *fBadPixels; //! Bad Pixels Cam
39
40 MCalibrationChargeCalc *fChargeCalc; //! Charge Calibration Task
41 MCalibrationRelTimeCalc *fRelTimeCalc; //! Rel. Times Calibratio Task
42 MCalibrateData *fCalibrate; //! Data Calibration Task
43
44 UInt_t fNumCam; //! Number of currently used Calibration Cam
45 UInt_t fNumEventsDump; // Number of event after which the MCalibrationCams gets updated
46 UInt_t fNumEvents; //! Event counter only for calibration events
47 UInt_t fNumPhesDump; // Number of cams after which the number of phes gets averaged
48 UInt_t fNumPhes; //! Event counter for photo-electron updates
49
50 Float_t fMeanPhes;
51 Float_t fMeanPhesRelVar;
52
53 Bool_t fUpdateWithFFactorMethod; // Update the interlaced calib events with the full F-Factor method
54 Bool_t fUpdateNumPhes; // Update the number of photo-electrons only after fNumPhesDump number of Cams
55
56 TArrayF fPhes;
57 TArrayF fPhesVar;
58
59 Int_t fNumFails; //! How often got the update skipped?
60
61 // MTask
62 Int_t PreProcess(MParList *pList);
63 Int_t Process();
64 Int_t PostProcess();
65 Bool_t ReInit(MParList *pList);
66
67 // MCalibCalcFromPast
68 Bool_t ReInitialize();
69 void Finalize(const char* name, Bool_t finalize=kTRUE);
70
71 Bool_t UpdateMeanPhes();
72
73 // MParContainer
74 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
75
76public:
77 MCalibCalcFromPast(const char *name=NULL, const char *title=NULL);
78
79 // Getter
80 UInt_t GetNumEventsDump() const { return fNumEventsDump; }
81
82 // Setter
83 void SetNumEventsDump( const UInt_t i=fgNumEventsDump ) { fNumEventsDump = i; }
84 void SetNumPhesDump ( const UInt_t i=fgNumPhesDump ) { fNumPhesDump = i; }
85
86 void SetCalibrate ( MCalibrateData *c ) { fCalibrate = c; }
87 void SetChargeCalc ( MCalibrationChargeCalc *c ) { fChargeCalc = c; }
88 void SetRelTimeCalc ( MCalibrationRelTimeCalc *c ) { fRelTimeCalc = c; }
89 void SetUpdateNumPhes ( const Bool_t b=kTRUE ) { fUpdateNumPhes = b; }
90
91 void SetUpdateWithFFactorMethod(const Bool_t b=kTRUE){ fUpdateWithFFactorMethod = b; }
92
93 ClassDef(MCalibCalcFromPast, 2) // Task to steer the processing of interlace calibration events
94};
95
96#endif
97
Note: See TracBrowser for help on using the repository browser.