KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVINDRACodeMask.h
Go to the documentation of this file.
1 
4 #ifndef __KVINDRACODEMASK__
5 #define __KVINDRACODEMASK__
6 
7 #include "TObject.h"
8 
10 
11 /* Global bits for code masks */
12 enum EVedaCodes {
13  kIDCode0 = BIT(0), //these bits concern KVINDRACodeMask::fIDMask
14  kIDCode1 = BIT(1),
15  kIDCode2 = BIT(2),
16  kIDCode3 = BIT(3),
17  kIDCode4 = BIT(4),
18  kIDCode5 = BIT(5),
19  kIDCode6 = BIT(6),
20  kIDCode7 = BIT(7),
21  kIDCode8 = BIT(8),
22  kIDCode9 = BIT(9),
23  kIDCode10 = BIT(10),
24  kIDCode11 = BIT(11),
25  kIDCode14 = BIT(12),
26  kIDCode15 = BIT(13),
27  kECode0 = BIT(0), //these bits concern KVINDRACodeMask::fEMask
28  kECode1 = BIT(1),
29  kECode2 = BIT(2),
30  kECode3 = BIT(3),
31  kECode11 = BIT(4),
32  kECode15 = BIT(5),
33  kECode4 = BIT(6),
34  kECode5 = BIT(7)
35 };
36 
37 enum EIDCodes {
54 };
55 
154 class KVINDRACodeMask: public TObject {
155 
156 private:
159 
160 public:
161  void Copy(TObject& object) const
162  {
163  KVINDRACodeMask& i = (KVINDRACodeMask&)object;
164  i.fIDMask = fIDMask;
165  i.fEMask = fEMask;
166  TObject::Copy(object);
167  }
168 
170  {
172  fIDMask = 0;
173  fEMask = 0;
174  };
176  {
178  fIDMask = 0;
179  fEMask = 0;
180  };
181 
183  {
184  return fIDMask;
185  }
187  {
188  return fEMask;
189  }
190  void SetIDMask(UShort_t codes)
191  {
192  fIDMask = codes;
193  }
194  Bool_t TestIDCode(UShort_t code);
195  Bool_t TestECode(UChar_t code);
196  void SetEMask(UChar_t codes)
197  {
198  fEMask = codes;
199  }
200 
202  {
203  return (TestIDCode(msk.GetIDMask()) && TestECode(msk.GetEMask()));
204  };
205 
206  void Clear(Option_t* = "")
207  {
208  fIDMask = 0;
209  fEMask = 0;
210  TObject::Clear();
211  };
212 
213  Bool_t IsNull() const
214  {
216  return (!fIDMask && !fEMask);
217  }
218 
219  ClassDef(KVINDRACodeMask, 1); //Handles setting and testing code masks for particle calibration quality control
220 };
221 
222 
223 #endif
EVedaCodes
@ kECode15
@ kIDCode1
@ kIDCode2
@ kIDCode3
@ kIDCode7
@ kECode1
@ kIDCode8
@ kIDCode5
@ kIDCode14
@ kIDCode11
@ kIDCode0
@ kECode2
@ kIDCode10
@ kIDCode9
@ kECode3
@ kECode5
@ kIDCode15
@ kECode0
@ kIDCode4
@ kECode4
@ kIDCode6
@ kECode11
EIDCodes
@ kIDCode_ArretChIo
@ kIDCode_Bragg
@ kIDCode_Phoswich
@ kIDCode_ChIoSi75
@ kIDCode_Si75SiLi
@ kIDCode_SiCsI
@ kIDCode_ChIoCsI
@ kIDCode_ArretSi
@ kIDCode_Neutron
@ kIDCode_ZminCsI
@ kIDCode_MultihitChIo
@ kIDCode_Zmin
@ kIDCode_ChIoSi
@ kIDCode_Gamma
@ kIDCode_CsI
@ kIDCode_SiLiCsI
unsigned short UShort_t
unsigned char UChar_t
bool Bool_t
const char Option_t
#define BIT(n)
Bool_t IsNull() const
UShort_t fIDMask
16-bit mask with id codes
Bool_t TestIDCode(UShort_t code)
void SetEMask(UChar_t codes)
ClassDef(KVINDRACodeMask, 1)
void SetIDMask(UShort_t codes)
void Copy(TObject &object) const
virtual ~ KVINDRACodeMask()
void Clear(Option_t *="")
Bool_t operator&(KVINDRACodeMask &msk)
UChar_t fEMask
8-bit mask with e-calibration codes
Bool_t TestECode(UChar_t code)
UShort_t GetIDMask()
virtual void Clear(Option_t *="")
virtual void Copy(TObject &object) const