source: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h@ 3967

Last change on this file since 3967 was 3932, checked in by gaug, 21 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1#ifndef MARS_MBadPixelsPix
2#define MARS_MBadPixelsPix
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8#ifndef ROOT_TArrayI
9#include <TArrayI.h>
10#endif
11
12class MBadPixelsPix : public MParContainer
13{
14private:
15 TArrayI fInfo;
16
17public:
18 MBadPixelsPix(const char* name=NULL, const char* title=NULL);
19
20 enum UnsuitableType_t {
21 kUnsuitableRun = BIT(1),
22 kUnsuitableEvt = BIT(2),
23 kUnreliableRun = BIT(3)
24 };
25
26 static const Int_t fgRunMask; // All types which are not event wise determined
27
28 // All types are initialized to normal behaviour
29 enum UncalibratedType_t {
30 kHiGainNotFitted = BIT(1),
31 kLoGainNotFitted = BIT(2),
32 kRelTimeNotFitted = BIT(3),
33 kHiGainOscillating = BIT(4),
34 kLoGainOscillating = BIT(5),
35 kRelTimeOscillating = BIT(6),
36 kLoGainSaturation = BIT(7),
37 kChargeIsPedestal = BIT(8),
38 kChargeErrNotValid = BIT(9),
39 kChargeRelErrNotValid = BIT(10),
40 kChargeSigmaNotValid = BIT(11),
41 kMeanTimeInFirstBin = BIT(12),
42 kMeanTimeInLast2Bins = BIT(13),
43 kDeviatingNumPhes = BIT(14),
44 kDeviatingFFactor = BIT(15),
45 kDeviatingTimeResolution = BIT(16),
46 kConversionHiLoNotValid = BIT(17)
47 };
48
49 // This is just a start..
50 enum HardwareType_t {
51 kHVNotNominal = BIT(1)
52 };
53
54
55 void Reset();
56 void Clear(Option_t *o="");
57 void Copy(TObject &object) const
58 {
59 static_cast<MBadPixelsPix&>(object).fInfo = fInfo;
60 }
61
62 // Setter
63 void SetUnsuitable ( UnsuitableType_t typ ) { fInfo[0] |= typ; }
64 void SetUncalibrated( UncalibratedType_t typ ) { fInfo[1] |= typ; }
65 void SetHardware ( HardwareType_t typ ) { fInfo[2] |= typ; }
66
67 // Getter
68 Bool_t IsUnsuitable ( UnsuitableType_t typ ) const { return fInfo[0]&typ; }
69 Bool_t IsUncalibrated( UncalibratedType_t typ ) const { return fInfo[1]&typ; }
70 Bool_t IsHardwareBad ( HardwareType_t typ ) const { return fInfo[2]&typ; }
71
72 Bool_t IsOK() const { return fInfo[0]==0; }
73 Bool_t IsBad() const { return fInfo[0]!=0; }
74
75 Bool_t IsLoGainBad() const { return IsUnsuitable (kUnsuitableRun )
76 || IsUncalibrated(kLoGainSaturation )
77 || IsUncalibrated(kConversionHiLoNotValid)
78 || IsUncalibrated(kLoGainOscillating ) ; }
79 Bool_t IsHiGainBad() const { return IsUnsuitable (kUnsuitableRun )
80 || IsUncalibrated(kHiGainOscillating ) ; }
81
82 void Merge(const MBadPixelsPix &pix);
83
84 const TArrayI &GetInfo() const { return fInfo; }
85
86 ClassDef(MBadPixelsPix, 1) // Storage Container for bad pixel information of a single pixel
87};
88
89#endif
90
Note: See TracBrowser for help on using the repository browser.