]>
Commit | Line | Data |
---|---|---|
1b9a175e | 1 | #ifndef ALIHLTGLOBALTRIGGERDECISION_H |
2 | #define ALIHLTGLOBALTRIGGERDECISION_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 AliHLTGlobalTriggerDecision.h | |
8 | /// @author Artur Szostak <artursz@iafrica.com> | |
9 | /// @date 26 Nov 2008 | |
10 | /// @brief Declaration of the AliHLTGlobalTriggerDecision class storing the global HLT decision. | |
11 | ||
12 | #include "AliHLTTriggerDecision.h" | |
e2bb8ddd | 13 | #include "TArrayL64.h" |
52f67e50 | 14 | #include "TObjArray.h" |
1b9a175e | 15 | |
16 | class AliHLTGlobalTriggerDecision : public AliHLTTriggerDecision | |
17 | { | |
18 | public: | |
19 | ||
20 | /** | |
21 | * Default constructor. | |
22 | */ | |
23 | AliHLTGlobalTriggerDecision(); | |
24 | ||
25 | /** | |
26 | * Constructor specifying multiple information fields. | |
27 | * \param result The result of the global trigger decision. | |
1b9a175e | 28 | * \param triggerDomain The trigger domain for the global trigger decision. |
29 | * \param description The description of (reason for) the global trigger decision. | |
30 | */ | |
31 | AliHLTGlobalTriggerDecision( | |
52f67e50 | 32 | bool result, const AliHLTTriggerDomain& triggerDomain, |
33 | const char* description = "" | |
1b9a175e | 34 | ); |
35 | ||
36 | /** | |
37 | * Default destructor. | |
38 | */ | |
39 | virtual ~AliHLTGlobalTriggerDecision(); | |
40 | ||
41 | /** | |
42 | * Inherited from TObject, this prints the contents of the trigger decision. | |
52f67e50 | 43 | * \param option Can be "short" which will print the short format or "counters" |
44 | * which will print only the counters or "compact" which will print only the | |
45 | * global information but not the lists of input objects. | |
1b9a175e | 46 | */ |
47 | virtual void Print(Option_t* option = "") const; | |
48 | ||
49 | /** | |
50 | * Returns the number of trigger inputs that contributed to this global trigger decision. | |
51 | */ | |
52 | Int_t NumberOfTriggerInputs() const { return fContributingTriggers.GetEntriesFast(); } | |
53 | ||
54 | /** | |
55 | * Returns the i'th trigger input object in fContributingTriggers. | |
56 | */ | |
57 | const AliHLTTriggerDecision* TriggerInput(Int_t i) const | |
58 | { | |
59 | return static_cast<const AliHLTTriggerDecision*>( fContributingTriggers[i] ); | |
60 | } | |
61 | ||
62 | /** | |
63 | * Returns the list of trigger inputs used when making the global HLT trigger decision. | |
64 | */ | |
65 | const TClonesArray& TriggerInputs() const { return fContributingTriggers; } | |
66 | ||
67 | /** | |
68 | * Adds a trigger input to the list of triggers that were considered when making | |
69 | * this global trigger decision. | |
70 | * \param decision The trigger decision object to add. | |
71 | */ | |
72 | void AddTriggerInput(const AliHLTTriggerDecision& decision) | |
73 | { | |
74 | new (fContributingTriggers[fContributingTriggers.GetEntriesFast()]) AliHLTTriggerDecision(decision); | |
75 | } | |
76 | ||
52f67e50 | 77 | /** |
78 | * Returns the number of other input objects that contributed to this global trigger decision. | |
79 | */ | |
80 | Int_t NumberOfInputObjects() const { return fInputObjects.GetEntriesFast(); } | |
81 | ||
82 | /** | |
83 | * Returns the i'th input object in fInputObjects. | |
84 | */ | |
85 | const TObject* InputObject(Int_t i) const { return fInputObjects[i]; } | |
86 | ||
87 | /** | |
88 | * Returns the list of other input objects used when making the global HLT trigger decision. | |
89 | */ | |
90 | const TObjArray& InputObjects() const { return fInputObjects; } | |
91 | ||
92 | /** | |
93 | * Adds a input object to the list of input objects that were considered when | |
94 | * making this global trigger decision. | |
95 | * \param object The input object to add. | |
96 | * \note A copy of the object is made with TObject::Clone() and added. | |
97 | */ | |
98 | void AddInputObject(const TObject* object) | |
99 | { | |
100 | fInputObjects.Add(object->Clone()); | |
101 | } | |
102 | ||
103 | /** | |
104 | * Sets the counter array. | |
105 | */ | |
106 | void SetCounters(const TArrayL64& counters) { fCounters = counters; } | |
107 | ||
1b9a175e | 108 | /** |
109 | * Returns the event trigger counters associated with the global trigger classes. | |
110 | */ | |
e2bb8ddd | 111 | const TArrayL64& Counters() const { return fCounters; } |
1b9a175e | 112 | |
113 | private: | |
114 | ||
115 | TClonesArray fContributingTriggers; /// The list of contributing trigger decisions from all AliHLTTrigger components that were considered. | |
52f67e50 | 116 | TObjArray fInputObjects; /// The list of other input objects. |
e2bb8ddd | 117 | TArrayL64 fCounters; /// Event trigger counters. One counter for each trigger class in the global trigger. |
1b9a175e | 118 | |
119 | ClassDef(AliHLTGlobalTriggerDecision, 1) // Contains the HLT global trigger decision and information contributing to the decision. | |
120 | }; | |
121 | ||
122 | #endif // ALIHLTGLOBALTRIGGERDECISION_H | |
123 |