source: trunk/MagicSoft/Mars/mjobs/MJCalib.h@ 6839

Last change on this file since 6839 was 6777, checked in by gaug, 20 years ago
*** empty log message ***
File size: 2.5 KB
Line 
1#ifndef MARS_MJCalib
2#define MARS_MJCalib
3
4#ifndef MARS_MJob
5#include "MJob.h"
6#endif
7
8class MRunIter;
9
10class MJCalib : public MJob
11{
12public:
13 enum DataType_t
14 {
15 kIsUseRootData,
16 kIsUseRawData,
17 kIsUseMC
18 };
19
20private:
21
22 static const Int_t fgCheckedPixId; //! Default for fCheckedPixId
23
24 Byte_t fDataFlag; // Bit-field to store the data type
25
26 enum Storage_t // Possible devices for calibration
27 {
28 kNoStorage,
29 kHistsStorage
30 }; // Possible flags for the storage of results
31
32 Byte_t fStorage; // Bit-field for chosen storage type
33
34protected:
35
36 Bool_t fIsPixelCheck; // Check a test pixel?
37 Int_t fCheckedPixId; // ID of checked pixel
38
39 Bool_t fIsPulsePosCheck; // Check pulse position?
40 Bool_t fIsHiLoCalibration; // Choose to calibrate the high-gain vs. low-gains
41
42 MRunIter *fRuns; // Data files, only used for test applications, default is sequence files!
43
44 Bool_t CheckEnvLocal();
45 Byte_t GetDataFlag() { return fDataFlag; }
46
47 Bool_t IsNoStorage () const { return TESTBIT(fStorage,kNoStorage); }
48 Bool_t IsHistsStorage () const { return TESTBIT(fStorage,kHistsStorage); }
49
50public:
51
52 MJCalib();
53
54 void SetInput(MRunIter *iter) { fRuns = iter; }
55
56 Bool_t IsUseRawData() const { return fDataFlag==kIsUseRawData; }
57 Bool_t IsUseRootData() const { return fDataFlag==kIsUseRootData; }
58 Bool_t IsUseMC() const { return fDataFlag==kIsUseMC; }
59
60 void SetUseRawData () { fDataFlag=kIsUseRawData; }
61 void SetUseRootData() { fDataFlag=kIsUseRootData; }
62 void SetUseMC () { fDataFlag=kIsUseMC; }
63
64 void SetDataType(DataType_t type) { fDataFlag=type; }
65
66 void SetCheckedPixId ( const Int_t i=fgCheckedPixId ) { fCheckedPixId = i; }
67
68 void SetNoStorage ( const Bool_t b=kTRUE ) { b ? SETBIT(fStorage,kNoStorage) : CLRBIT(fStorage,kNoStorage); }
69 void SetHistsStorage ( const Bool_t b=kTRUE ) { b ? SETBIT(fStorage,kHistsStorage) : CLRBIT(fStorage,kHistsStorage); }
70
71 void SetHiLoCalibration( const Bool_t b=kTRUE ) { fIsHiLoCalibration = b; }
72 void SetPixelCheck ( const Bool_t b=kTRUE ) { fIsPixelCheck = b; }
73 void SetPulsePosCheck ( const Bool_t b=kTRUE ) { fIsPulsePosCheck = b; }
74
75 ClassDef(MJCalib, 0) // Base class for calibration jobs
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.