#ifndef ALITRIGGERINPUT_H
#define ALITRIGGERINPUT_H
#ifndef ROOT_TNamed
#include <TNamed.h>
#endif
#include "AliDAQ.h"
class AliTriggerInput : public TNamed {
public:
AliTriggerInput(): TNamed(),
fMask( 0 ),
fValue( 0 ),
fSignature( -1),
fLevel(0),
fDetectorId(-1),
fIsActive(kFALSE)
{}
AliTriggerInput( TString name, TString det, UChar_t level, Int_t signature = -1, Char_t number = -1);
AliTriggerInput( AliTriggerInput & inp )
: TNamed( inp ),
fMask( inp.fMask ),
fValue( inp.fValue ),
fSignature( inp.fSignature ),
fLevel( inp.fLevel),
fDetectorId( inp.fDetectorId),
fIsActive(kFALSE)
{}
virtual ~AliTriggerInput() {}
void Set() { if (fIsActive) fValue = fMask; }
void Reset() { fValue = 0; }
void Enable() { fIsActive = kTRUE; }
Bool_t Status() const { return (Bool_t)fValue; }
ULong64_t GetValue() const { return fValue; }
ULong64_t GetMask() const { return fMask; }
Int_t GetSignature() const { return fSignature; }
TString GetInputName() const { return GetName(); }
TString GetDetector() const { return GetTitle(); }
TString GetModule() const;
Char_t GetDetectorId() const { return fDetectorId; }
UChar_t GetLevel() const { return fLevel; }
Bool_t IsActive() const { return fIsActive; }
virtual void Print( const Option_t* opt ="" ) const;
static Bool_t fgkIsTriggerDetector[AliDAQ::kNDetectors];
static const char* fgkCTPDetectorName[AliDAQ::kNDetectors];
protected:
ULong64_t fMask;
ULong64_t fValue;
Int_t fSignature;
UChar_t fLevel;
Char_t fDetectorId;
Bool_t fIsActive;
ClassDef( AliTriggerInput, 4 )
};
#endif