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

Last change on this file since 3414 was 3068, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.3 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_TArrayC
9#include <TArrayC.h>
10#endif
11
12class MBadPixelsPix : public MParContainer
13{
14private:
15 TArrayC 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 };
24
25 static const Char_t fgRunMask; // All types which are not event wise determined
26
27 void Reset();
28 void Clear(Option_t *o="");
29 void Copy(TObject &object) const
30 {
31 static_cast<MBadPixelsPix&>(object).fInfo = fInfo;
32 }
33
34 // Setter
35 void SetUnsuitable(UnsuitableType_t typ=kUnsuitableRun) { fInfo[0] |= typ; }
36 void SetSuitable(UnsuitableType_t typ=kUnsuitableRun) { fInfo[0] &= ~typ; }
37
38 // Getter
39 Bool_t IsUnsuitable(UnsuitableType_t typ=kUnsuitableRun) const { return fInfo[0]&typ; }
40 Bool_t IsSuitable(UnsuitableType_t typ=kUnsuitableRun) const { return !(fInfo[0]&typ); }
41
42 Bool_t IsOK() const { return fInfo[0]==0; }
43 Bool_t IsBad() const { return fInfo[0]!=0; }
44
45 void Merge(const MBadPixelsPix &pix);
46
47 const TArrayC &GetInfo() const { return fInfo; }
48
49 ClassDef(MBadPixelsPix, 1) // Storage Container for bad pixel information of a single pixel
50};
51
52#endif
53
Note: See TracBrowser for help on using the repository browser.