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

Last change on this file since 6751 was 6725, checked in by gaug, 20 years ago
*** empty log message ***
File size: 2.3 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 fPixelCheck; // Check a test pixel?
37 Int_t fCheckedPixId; // ID of checked pixel
38
39 Bool_t fPulsePosCheck; // Check pulse position?
40
41 MRunIter *fRuns; // Data files, only used for test applications, default is sequence files!
42
43 Bool_t CheckEnvLocal();
44 Byte_t GetDataFlag() { return fDataFlag; }
45
46 Bool_t IsNoStorage () const { return TESTBIT(fStorage,kNoStorage); }
47 Bool_t IsHistsStorage () const { return TESTBIT(fStorage,kHistsStorage); }
48
49public:
50
51 MJCalib();
52
53 void SetInput(MRunIter *iter) { fRuns = iter; }
54
55 Bool_t IsUseRawData() const { return fDataFlag==kIsUseRawData; }
56 Bool_t IsUseRootData() const { return fDataFlag==kIsUseRootData; }
57 Bool_t IsUseMC() const { return fDataFlag==kIsUseMC; }
58
59 void SetUseRawData () { fDataFlag=kIsUseRawData; }
60 void SetUseRootData() { fDataFlag=kIsUseRootData; }
61 void SetUseMC () { fDataFlag=kIsUseMC; }
62
63 void SetDataType(DataType_t type) { fDataFlag=type; }
64
65 void SetPixelCheck ( const Bool_t b=kTRUE ) { fPixelCheck = b; }
66 void SetPulsePosCheck( const Bool_t b=kTRUE ) { fPulsePosCheck = b; }
67 void SetCheckedPixId ( const Int_t i=fgCheckedPixId ) { fCheckedPixId = i; }
68
69 void SetNoStorage ( const Bool_t b=kTRUE ) { b ? SETBIT(fStorage,kNoStorage) : CLRBIT(fStorage,kNoStorage); }
70 void SetHistsStorage ( const Bool_t b=kTRUE ) { b ? SETBIT(fStorage,kHistsStorage) : CLRBIT(fStorage,kHistsStorage); }
71
72 ClassDef(MJCalib, 0) // Base class for calibration jobs
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.