1 #ifndef ALIHLTTRIGGERDECISION_H
2 #define ALIHLTTRIGGERDECISION_H
3 /* This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 /// @file AliHLTTriggerDecision.h
8 /// @author Artur Szostak <artursz@iafrica.com>
10 /// @brief Declaration of the AliHLTTriggerDecision class storing the a AliHLTTrigger component's decision.
13 #include "AliHLTReadoutList.h"
14 #include "AliHLTTriggerDomain.h"
17 * \class AliHLTTriggerDecision
18 * Stores the information and result of a trigger decision made by a component
19 * deriving from AliHLTTrigger. The information includes the DDL readout list
20 * indicating which DDLs to readout and the trigger domain specifying which HLT
21 * raw data blocks to forward to HLTOUT.
23 class AliHLTTriggerDecision : public TObject
28 * Default constructor.
30 AliHLTTriggerDecision();
33 * Constructor specifying the result and trigger name.
34 * \param result The result of the trigger decision.
35 * \param name The name of the trigger decision. Should be the name of the
36 * AliHLTTrigger component.
38 AliHLTTriggerDecision(bool result, const char* name);
41 * Constructor specifying all information fields.
42 * \param result The result of the trigger decision.
43 * \param name The name of the trigger decision. Should be the name of the
44 * AliHLTTrigger component.
45 * \param triggerDomain The trigger domain for the trigger decision.
46 * \param description The description of (reason for) the trigger decision.
48 AliHLTTriggerDecision(
49 bool result, const char* name, const AliHLTTriggerDomain& triggerDomain,
50 const char* description = ""
56 virtual ~AliHLTTriggerDecision();
59 * Inherited from TObject. Returns the name of the trigger decision.
61 virtual const char* GetName() const { return fName.Data(); }
64 * Inherited from TObject. This prints the contents of the trigger decision.
65 * \param option Can be "short" which will print the short format.
67 virtual void Print(Option_t* option = "") const;
70 * Returns the result of the trigger decision.
71 * \returns true if the event was triggered and should be readout.
73 bool EventTriggered() const { return Result(); }
76 * Returns the result of the trigger decision.
77 * The decision is stored in bit 15 of the fBits field.
78 * \returns true if the event was triggered and should be readout.
80 bool Result() const { return TestBit(15) == 1; }
83 * Sets the result of the trigger decision.
84 * The decision is stored in bit 15 of the fBits field.
85 * \param value The value to set; true if the event triggered and should be
86 * readout and false otherwise.
88 void Result(bool value) { SetBit(15, value); }
91 * Returns the name of the trigger decision.
93 const char* Name() const { return fName.Data(); }
96 * Sets the name of the trigger decision.
98 void Name(const char* name) { fName = name; }
101 * Returns the description of (reason for) the trigger decision.
103 const char* Description() const { return fDescription.Data(); }
106 * Sets the description of the trigger decision.
108 void Description(const char* value) { fDescription = value; }
111 * Returns the DDL readout list associated with this trigger decision.
113 AliHLTReadoutList ReadoutList() const { return AliHLTReadoutList(fTriggerDomain); }
116 * Sets the DDL readout list associated with this trigger decision.
118 void ReadoutList(const AliHLTReadoutList& value)
120 fTriggerDomain.Remove("DAQRDOUT", kAliHLTDataOriginAny);
121 fTriggerDomain.Add(value);
125 * Returns the trigger domain associated with this trigger decision.
127 const AliHLTTriggerDomain& TriggerDomain() const { return fTriggerDomain; }
130 * Returns the trigger domain associated with this trigger decision for editing.
132 AliHLTTriggerDomain& TriggerDomain() { return fTriggerDomain; }
135 * Sets the trigger domain associated with this trigger decision.
137 void TriggerDomain(const AliHLTTriggerDomain& value) { fTriggerDomain = value; }
141 TString fName; /// The name of the trigger decision. Should be the name of the trigger component that generated it.
142 TString fDescription; /// Optional descriptive text giving the reason for the trigger.
143 AliHLTTriggerDomain fTriggerDomain; /// The trigger domain associated with this trigger. i.e. the HLT data blocks to read out.
145 ClassDef(AliHLTTriggerDecision, 1) // HLT trigger decision object storing information about the readout list, trigger domain and result.
148 #endif // ALIHLTTRIGGERDECISION_H