]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliTriggerInput.h
Now the full chain includes raw data.
[u/mrichter/AliRoot.git] / STEER / AliTriggerInput.h
1 #ifndef ALITRIGGERINPUT_H
2 #define ALITRIGGERINPUT_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 ///////////////////////////////////////////////////////////////////////////////
10 //
11 //  Class to define a Trigger Input from an specific detector                                                                                           //
12 //
13 //
14 //                        name         description     id mask
15 //    Ej:
16 //      AliTriggerInput( "V0_MB_L0", "VO minimum bias", 0x01 );
17 //      AliTriggerInput( "V0_SC_L0", "VO semi central", 0x02 );
18 //      AliTriggerInput( "V0_C_L0",  "VO central",      0x04 );
19
20 //    The name must be globaly unique. Spaces are not allowed.
21 //    As convention should start with detector name then an id
22 //    and the trigger level (L0, L1, L2)
23 //
24 //    A maximun of 60 inputs trigger are allow.
25 //    So, the id mask should set only bit from the position 1 to 60.
26 //
27 ///////////////////////////////////////////////////////////////////////////////
28
29 #ifndef ROOT_TNamed
30 #include <TNamed.h>
31 #endif
32
33 class AliTriggerInput : public TNamed {
34
35 public:
36                           AliTriggerInput() {}
37                           AliTriggerInput( TString name, TString description, Long_t mask )
38                                            : TNamed( name.Data(), description.Data() ),
39                                              fMask( mask ),
40                                              fValue( 0 ) {}
41                virtual   ~AliTriggerInput() {}
42
43   //  Setters
44           virtual void    Set()   { fValue = fMask; }
45           virtual void    Reset() { fValue = 0; }
46
47   //  Getters
48                 Bool_t    Status() const   { return (Bool_t)fValue; }
49                 Long_t    GetValue() const { return fValue; }
50                  Int_t    GetMask() const  { return fMask; }
51   //             ULong_t    Hash() const { return TMath::Hash( GetName().Data() ); };
52
53            virtual void    Print( const Option_t* opt ="" ) const;
54
55 protected:
56                 Long_t    fMask;        //  Trigger ID mask (1 bit)
57                 Long_t    fValue;       //  Trigger Signal (0 = false, > 1 = true = fMask )
58      //          Int_t      fLevel;       //  Trigger Level (L0, L1, L2)
59
60    ClassDef( AliTriggerInput, 1 )  // Define a Trigger Input
61 };
62
63
64 #endif