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