source: branches/Mars_use_drstimefiles/mcalib/MCalibrationRelTimeCalc.h@ 17989

Last change on this file since 17989 was 8428, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 3.6 KB
Line 
1#ifndef MARS_MCalibrationRelTimeCalc
2#define MARS_MCalibrationRelTimeCalc
3
4/////////////////////////////////////////////////////////////////////////////
5//
6// MCalibrationRelTimeCalc
7//
8// Integrates the time slices of the all pixels of a calibration event
9// and substract the pedestal value
10//
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef MARS_MTask
14#include "MTask.h"
15#endif
16
17#ifndef MARS_MBadPixelsPix
18#include "MBadPixelsPix.h"
19#endif
20
21class MCalibrationRelTimeCam;
22class MGeomCam;
23class MBadPixelsCam;
24
25class MCalibrationRelTimeCalc : public MTask
26{
27private:
28
29 static const Float_t fgRelTimeResolutionLimit; //! Default for fRelTimeResolutionLimit (now set to: 0.75)
30
31 // Variables
32 Float_t fRelTimeResolutionLimit; // Limit acceptance rel. time resolution (in FADC slices)
33
34 // Pointers
35 MBadPixelsCam *fBadPixels; // Bad Pixels
36 MCalibrationRelTimeCam *fCam; // Calibrated RelTimes of all pixels
37 MGeomCam *fGeom; //! Camera geometry
38
39 // enums
40 enum Check_t
41 {
42 kCheckHistOverflow,
43 kCheckDeviatingBehavior,
44 kCheckOscillations,
45 kCheckFitResults
46 }; // Possible Checks
47
48 Byte_t fCheckFlags; // Bit-field to hold the possible check flags
49
50 enum { kDebug }; // Possible flags
51
52 Byte_t fFlags; // Bit-field for the general flags
53
54 // functions
55 const char* GetOutputFile ();
56 void FinalizeAverageResolution();
57 void FinalizeRelTimes ();
58 void FinalizeBadPixels ();
59 void FinalizeUnsuitablePixels ();
60
61 void PrintUncalibrated(const char *text, Int_t in, Int_t out) const;
62 void PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
63
64 // Query checks
65 Bool_t IsCheckDeviatingBehavior() const { return TESTBIT(fCheckFlags,kCheckDeviatingBehavior); }
66 Bool_t IsCheckHistOverflow () const { return TESTBIT(fCheckFlags,kCheckHistOverflow); }
67 Bool_t IsCheckOscillations () const { return TESTBIT(fCheckFlags,kCheckOscillations); }
68 Bool_t IsCheckFitResults () const { return TESTBIT(fCheckFlags,kCheckFitResults); }
69
70 // MTask
71 Bool_t ReInit (MParList *pList);
72 Int_t Process () { return kTRUE; }
73 Int_t PostProcess();
74
75 // MParContainer
76 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
77
78public:
79 MCalibrationRelTimeCalc(const char *name=NULL, const char *title=NULL);
80
81 // TObject
82 void Clear(const Option_t *o="");
83
84 // MCalibrationRelTimeCalc
85 Int_t Finalize();
86
87 // Getter
88 Bool_t IsDebug() const { return TESTBIT(fFlags,kDebug); }
89
90 // Setter
91 void SetRelTimeResolutionLimit( const Float_t f=fgRelTimeResolutionLimit ) { fRelTimeResolutionLimit = f; }
92
93 // Checks
94 void SetCheckFitResults(const Bool_t b=kTRUE) { b ? SETBIT(fCheckFlags,kCheckFitResults) : CLRBIT(fCheckFlags,kCheckFitResults); }
95 void SetCheckDeviatingBehavior(const Bool_t b=kTRUE) { b ? SETBIT(fCheckFlags,kCheckDeviatingBehavior) : CLRBIT(fCheckFlags,kCheckDeviatingBehavior); }
96 void SetCheckHistOverflow(const Bool_t b=kTRUE) { b ? SETBIT(fCheckFlags,kCheckHistOverflow) : CLRBIT(fCheckFlags,kCheckHistOverflow); }
97 void SetCheckOscillations(const Bool_t b=kTRUE) { b ? SETBIT(fCheckFlags,kCheckOscillations) : CLRBIT(fCheckFlags,kCheckOscillations); }
98 void SetDebug(const Bool_t b=kTRUE) { b ? SETBIT(fFlags, kDebug) : CLRBIT(fFlags, kDebug); }
99
100 ClassDef(MCalibrationRelTimeCalc, 3) // Task finalizing the relative time Calibration
101};
102
103#endif
Note: See TracBrowser for help on using the repository browser.