Added constructor from MC
[u/mrichter/AliRoot.git] / STEER / AliTriggerBCMask.h
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 AliTriggerBCMask& mask );
26                virtual   ~AliTriggerBCMask();
27   AliTriggerBCMask&   operator=(const AliTriggerBCMask& mask);
28
29            const UChar_t* GetFullMask () const {return fBCMask; }
30                   Bool_t  GetMask(UShort_t index) const;
31                     void  Print( const Option_t* opt) const;
32
33                   Bool_t  SetMask (const char *mask);
34   
35   enum {kNBytesPerBCMask = 446,  // Number of bytes to store the 3564 bits of BC mask
36         kNBits = 3564            // BC mask contains 3564 bits
37   };
38
39 private:
40                 Bool_t    CreateMask(TString &mask);
41                 Bool_t    Bcm2Bits(TObjArray *tokens, Int_t &index, TBits &bits, Int_t &ibit, Int_t &level) const;
42
43                 UChar_t   fBCMask[kNBytesPerBCMask];         // Bunch cross mask (3564 bits)
44
45    ClassDef( AliTriggerBCMask, 2 )  // Define a trigger bunch-crossing mask
46 };
47
48 #endif