KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVINDRACodeMask.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 $Id: KVINDRACodeMask.cpp,v 1.2 2006/10/19 14:32:43 franklan Exp $
3  ***************************************************************************/
4 
5 /***************************************************************************
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  ***************************************************************************/
13 
14 #include "KVINDRACodeMask.h"
15 
17 
18 
19 
23 Bool_t KVINDRACodeMask::TestIDCode(UShort_t code)
24 {
25  //check identification code against code mask
26  //always kTRUE if no mask set (fIDMask==0)
27  if (!fIDMask)
28  return kTRUE;
29  return (Bool_t)((fIDMask & code) != 0);
30 }
31 
32 
33 
37 
39 {
40  //check calibration code against code mask
41  //always kTRUE if no mask set (fEMask==0)
42  if (!fEMask)
43  return kTRUE;
44  return (Bool_t)((fEMask & code) != 0);
45 }
46 
47 
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
unsigned short UShort_t
unsigned char UChar_t
bool Bool_t
const Bool_t kTRUE
UChar_t fEMask
8-bit mask with e-calibration codes
Bool_t TestECode(UChar_t code)