source: trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.h@ 8037

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