]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliTriggerInput.h
Error messages stored in the global raw-reader error log (Cvetan, Chiara)
[u/mrichter/AliRoot.git] / STEER / AliTriggerInput.h
CommitLineData
a5a091ce 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
33class AliTriggerInput : public TNamed {
34
35public:
75e3794b 36 AliTriggerInput(): TNamed(),
37 fMask( 0 ),
38 fValue( 0 ) {}
a5a091ce 39 AliTriggerInput( TString name, TString description, Long_t mask )
40 : TNamed( name.Data(), description.Data() ),
41 fMask( mask ),
42 fValue( 0 ) {}
bacbe0fd 43 AliTriggerInput( AliTriggerInput & inp )
44 : TNamed( inp ),
45 fMask( inp.fMask ),
46 fValue( inp.fValue ) {}
a5a091ce 47 virtual ~AliTriggerInput() {}
48
49 // Setters
50 virtual void Set() { fValue = fMask; }
51 virtual void Reset() { fValue = 0; }
52
53 // Getters
54 Bool_t Status() const { return (Bool_t)fValue; }
55 Long_t GetValue() const { return fValue; }
56 Int_t GetMask() const { return fMask; }
57 // ULong_t Hash() const { return TMath::Hash( GetName().Data() ); };
58
59 virtual void Print( const Option_t* opt ="" ) const;
60
61protected:
62 Long_t fMask; // Trigger ID mask (1 bit)
63 Long_t fValue; // Trigger Signal (0 = false, > 1 = true = fMask )
64 // Int_t fLevel; // Trigger Level (L0, L1, L2)
65
66 ClassDef( AliTriggerInput, 1 ) // Define a Trigger Input
67};
68
69
70#endif