KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVINDRACodeMask.h
1
3
4#ifndef __KVINDRACODEMASK__
5#define __KVINDRACODEMASK__
6
7#include "TObject.h"
8
10
11
12
113
114private:
117
118public:
119 /* Global bits for code masks */
121 kIDCode0 = BIT(0), //these bits concern KVINDRACodeMask::fIDMask
135 kECode0 = BIT(0), //these bits concern KVINDRACodeMask::fEMask
142 kECode5 = BIT(7)
143 };
144
163 void Copy(TObject& object) const
164 {
165 KVINDRACodeMask& i = (KVINDRACodeMask&)object;
166 i.fIDMask = fIDMask;
167 i.fEMask = fEMask;
168 TObject::Copy(object);
169 }
170
172 {
174 fIDMask = 0;
175 fEMask = 0;
176 };
177 virtual ~ KVINDRACodeMask()
178 {
180 fIDMask = 0;
181 fEMask = 0;
182 };
183
185 {
186 return fIDMask;
187 }
189 {
190 return fEMask;
191 }
192 void SetIDMask(UShort_t codes)
193 {
194 fIDMask = codes;
195 }
198 void SetEMask(UChar_t codes)
199 {
200 fEMask = codes;
201 }
202
204 {
205 return (TestIDCode(msk.GetIDMask()) && TestECode(msk.GetEMask()));
206 };
207
208 void Clear(Option_t* = "")
209 {
210 fIDMask = 0;
211 fEMask = 0;
213 };
214
216 {
218 return (!fIDMask && !fEMask);
219 }
220
221 ClassDef(KVINDRACodeMask, 1); //Handles setting and testing code masks for particle calibration quality control
222};
223
224
225#endif
bool Bool_t
unsigned short UShort_t
unsigned char UChar_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
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)
virtual void Clear(Option_t *="")
virtual void Copy(TObject &object) const