Line data Source code
1 : #ifndef ALITRIGGERBCMASK_H
2 : #define ALITRIGGERBCMASK_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : ///////////////////////////////////////////////////////////////////////////////
8 : // //
9 : // This class represents the CTP bunch-crossing mask //
10 : // //
11 : // The Mask contains name and 3564 bits for each bunch-crossing in an orbit //
12 : // //
13 : // //
14 : ///////////////////////////////////////////////////////////////////////////////
15 :
16 : #include <TNamed.h>
17 : #include <TBits.h>
18 :
19 : class AliTriggerBCMask : public TNamed {
20 :
21 : public:
22 : AliTriggerBCMask();
23 : AliTriggerBCMask( TString & name);
24 : AliTriggerBCMask( TString & name, TString & mask );
25 : AliTriggerBCMask( const char* name, const char* mask );
26 : AliTriggerBCMask( const AliTriggerBCMask& mask );
27 : virtual ~AliTriggerBCMask();
28 : AliTriggerBCMask& operator=(const AliTriggerBCMask& mask);
29 :
30 0 : const UChar_t* GetFullMask () const {return fBCMask; }
31 : Bool_t GetMask(UShort_t index) const;
32 : void Print( const Option_t* opt) const;
33 : UShort_t GetNUnmaskedBCs() const;
34 : Bool_t SetMask (const char *mask);
35 :
36 : enum {kNBytesPerBCMask = 446, // Number of bytes to store the 3564 bits of BC mask
37 : kNBits = 3564 // BC mask contains 3564 bits
38 : };
39 :
40 : private:
41 : Bool_t CreateMask(TString &mask);
42 : Bool_t Bcm2Bits(TObjArray *tokens, Int_t &index, TBits &bits, Int_t &ibit, Int_t &level) const;
43 :
44 : UChar_t fBCMask[kNBytesPerBCMask]; // Bunch cross mask (3564 bits)
45 :
46 260 : ClassDef( AliTriggerBCMask, 2 ) // Define a trigger bunch-crossing mask
47 : };
48 :
49 : #endif
|