3 #ifndef ALIHLTTRIGGERDECISION_H
4 #define ALIHLTTRIGGERDECISION_H
5 /* This file is property of and copyright by the ALICE HLT Project *
6 * ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 /// @file AliHLTTriggerDecision.h
10 /// @author Artur Szostak <artursz@iafrica.com>
12 /// @brief Declaration of the AliHLTTriggerDecision class storing the a AliHLTTrigger component's decision.
15 #include "AliHLTReadoutList.h"
16 #include "AliHLTTriggerDomain.h"
19 * \class AliHLTTriggerDecision
20 * Stores the information and result of a trigger decision made by a component
21 * deriving from AliHLTTrigger. The information includes the DDL readout list
22 * indicating which DDLs to readout and the trigger domain specifying which HLT
23 * raw data blocks to forward to HLTOUT.
25 class AliHLTTriggerDecision : public TObject
30 * Default constructor.
32 AliHLTTriggerDecision();
35 * Constructor specifying the result and trigger name.
36 * \param result The result of the trigger decision.
37 * \param name The name of the trigger decision. Should be the name of the
38 * AliHLTTrigger component.
40 AliHLTTriggerDecision(bool result, const char* name);
43 * Constructor specifying all information fields.
44 * \param result The result of the trigger decision.
45 * \param name The name of the trigger decision. Should be the name of the
46 * AliHLTTrigger component.
47 * \param triggerDomain The trigger domain for the trigger decision.
48 * \param description The description of (reason for) the trigger decision.
50 AliHLTTriggerDecision(
51 bool result, const char* name, const AliHLTTriggerDomain& triggerDomain,
52 const char* description = ""
58 virtual ~AliHLTTriggerDecision();
61 * Inherited from TObject. Returns the name of the trigger decision.
63 virtual const char* GetName() const { return fName.Data(); }
66 * Inherited from TObject. Returns the description of the trigger decision.
68 virtual const char* GetTitle() const { return fDescription.Data(); }
71 * Inherited from TObject. This prints the contents of the trigger decision.
72 * \param option Can be "short" which will print the short format.
74 virtual void Print(Option_t* option = "") const;
77 * Inherited from TObject. Copy this to the specified object.
79 virtual void Copy(TObject &object) const;
82 * Inherited from TObject. Create a new clone.
84 virtual TObject *Clone(const char *newname="") const;
87 * Inherited from TObject. Return the result of the trigger.
88 * @return "0" or "1" (note: its a string)
90 virtual Option_t *GetOption() const;
93 * Returns the result of the trigger decision.
94 * \returns true if the event was triggered and should be readout.
96 bool EventTriggered() const { return Result(); }
99 * Returns the result of the trigger decision.
100 * The decision is stored in bit 15 of the fBits field.
101 * \returns true if the event was triggered and should be readout.
103 bool Result() const { return TestBit(15) == 1; }
106 * Sets the result of the trigger decision.
107 * The decision is stored in bit 15 of the fBits field.
108 * \param value The value to set; true if the event triggered and should be
109 * readout and false otherwise.
111 void Result(bool value) { SetBit(15, value); }
114 * Returns the name of the trigger decision.
116 const char* Name() const { return fName.Data(); }
119 * Sets the name of the trigger decision.
121 void Name(const char* name) { fName = name; }
124 * Returns the description of (reason for) the trigger decision.
126 const char* Description() const { return fDescription.Data(); }
129 * Sets the description of the trigger decision.
131 void Description(const char* value) { fDescription = value; }
134 * Returns the DDL readout list associated with this trigger decision.
136 AliHLTReadoutList ReadoutList() const { return AliHLTReadoutList(fTriggerDomain); }
139 * Sets the DDL readout list associated with this trigger decision.
141 void ReadoutList(const AliHLTReadoutList& value)
143 fTriggerDomain.Remove("DAQRDOUT", kAliHLTDataOriginAny);
144 fTriggerDomain.Add(value);
148 * Returns the trigger domain associated with this trigger decision.
150 const AliHLTTriggerDomain& TriggerDomain() const { return fTriggerDomain; }
153 * Returns the trigger domain associated with this trigger decision for editing.
155 AliHLTTriggerDomain& TriggerDomain() { return fTriggerDomain; }
158 * Sets the trigger domain associated with this trigger decision.
160 void TriggerDomain(const AliHLTTriggerDomain& value) { fTriggerDomain = value; }
164 TString fName; /// The name of the trigger decision. Should be the name of the trigger component that generated it.
165 TString fDescription; /// Optional descriptive text giving the reason for the trigger.
166 AliHLTTriggerDomain fTriggerDomain; /// The trigger domain associated with this trigger. i.e. the HLT data blocks to read out.
168 ClassDef(AliHLTTriggerDecision, 1) // HLT trigger decision object storing information about the readout list, trigger domain and result.
171 #endif // ALIHLTTRIGGERDECISION_H