]>
Commit | Line | Data |
---|---|---|
1b9a175e | 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 */ | |
6 | ||
7 | /// @file AliHLTTriggerDecision.h | |
8 | /// @author Artur Szostak <artursz@iafrica.com> | |
9 | /// @date 21 Nov 2008 | |
10 | /// @brief Declaration of the AliHLTTriggerDecision class storing the a AliHLTTrigger component's decision. | |
11 | ||
12 | #include "TString.h" | |
13 | #include "AliHLTReadoutList.h" | |
14 | #include "AliHLTTriggerDomain.h" | |
15 | ||
16 | /** | |
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. | |
22 | */ | |
23 | class AliHLTTriggerDecision : public TObject | |
24 | { | |
25 | public: | |
26 | ||
27 | /** | |
28 | * Default constructor. | |
29 | */ | |
30 | AliHLTTriggerDecision(); | |
31 | ||
32 | /** | |
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. | |
37 | */ | |
38 | AliHLTTriggerDecision(bool result, const char* name); | |
39 | ||
40 | /** | |
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 readoutList The DDL readout list for the trigger decision. | |
46 | * \param triggerDomain The trigger domain for the trigger decision. | |
47 | * \param description The description of (reason for) the trigger decision. | |
48 | */ | |
49 | AliHLTTriggerDecision( | |
50 | bool result, const char* name, const AliHLTReadoutList& readoutList, | |
51 | const AliHLTTriggerDomain& triggerDomain, const char* description = "" | |
52 | ); | |
53 | ||
54 | /** | |
55 | * Default destructor. | |
56 | */ | |
57 | virtual ~AliHLTTriggerDecision(); | |
58 | ||
59 | /** | |
60 | * Inherited from TObject. Returns the name of the trigger decision. | |
61 | */ | |
62 | virtual const char* GetName() const { return fName.Data(); } | |
63 | ||
64 | /** | |
65 | * Inherited from TObject. This prints the contents of the trigger decision. | |
66 | * \param option Can be "short" which will print the short format. | |
67 | */ | |
68 | virtual void Print(Option_t* option = "") const; | |
69 | ||
70 | /** | |
71 | * Returns the result of the trigger decision. | |
72 | * \returns true if the event was triggered and should be readout. | |
73 | */ | |
74 | bool EventTriggered() const { return Result(); } | |
75 | ||
76 | /** | |
77 | * Returns the result of the trigger decision. | |
78 | * The decision is stored in bit 15 of the fBits field. | |
79 | * \returns true if the event was triggered and should be readout. | |
80 | */ | |
81 | bool Result() const { return TestBit(15) == 1; } | |
82 | ||
83 | /** | |
84 | * Sets the result of the trigger decision. | |
85 | * The decision is stored in bit 15 of the fBits field. | |
86 | * \param value The value to set; true if the event triggered and should be | |
87 | * readout and false otherwise. | |
88 | */ | |
89 | void Result(bool value) { SetBit(15, value); } | |
90 | ||
91 | /** | |
92 | * Returns the name of the trigger decision. | |
93 | */ | |
94 | const char* Name() const { return fName.Data(); } | |
95 | ||
96 | /** | |
97 | * Sets the name of the trigger decision. | |
98 | */ | |
99 | void Name(const char* name) { fName = name; } | |
100 | ||
101 | /** | |
102 | * Returns the description of (reason for) the trigger decision. | |
103 | */ | |
104 | const char* Description() const { return fDescription.Data(); } | |
105 | ||
106 | /** | |
107 | * Sets the description of the trigger decision. | |
108 | */ | |
109 | void Description(const char* value) { fDescription = value; } | |
110 | ||
111 | /** | |
112 | * Returns the DDL readout list associated with this trigger decision. | |
113 | */ | |
114 | const AliHLTReadoutList& ReadoutList() const { return fReadoutList; } | |
115 | ||
116 | /** | |
117 | * Returns the DDL readout list associated with this trigger decision for | |
118 | * modification. | |
119 | */ | |
120 | AliHLTReadoutList& ReadoutList() { return fReadoutList; } | |
121 | ||
122 | /** | |
123 | * Sets the DDL readout list associated with this trigger decision. | |
124 | */ | |
125 | void ReadoutList(const AliHLTReadoutList& value) { fReadoutList = value; } | |
126 | ||
127 | /** | |
128 | * Returns the trigger domain associated with this trigger decision. | |
129 | */ | |
130 | const AliHLTTriggerDomain& TriggerDomain() const { return fTriggerDomain; } | |
131 | ||
132 | /** | |
133 | * Sets the trigger domain associated with this trigger decision. | |
134 | */ | |
135 | void TriggerDomain(const AliHLTTriggerDomain& value) { fTriggerDomain = value; } | |
136 | ||
137 | private: | |
138 | ||
139 | TString fName; /// The name of the trigger decision. Should be the name of the trigger component that generated it. | |
140 | TString fDescription; /// Optional descriptive text giving the reason for the trigger. | |
141 | AliHLTReadoutList fReadoutList; /// The readout DDL list. | |
142 | AliHLTTriggerDomain fTriggerDomain; /// The trigger domain associated with this trigger. i.e. the HLT data blocks to read out. | |
143 | ||
144 | ClassDef(AliHLTTriggerDecision, 1) // HLT trigger decision object storing information about the readout list, trigger domain and result. | |
145 | }; | |
146 | ||
147 | #endif // ALIHLTTRIGGERDECISION_H | |
148 |