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 */
7 /// @file AliHLTGlobalTriggerDecision.h
8 /// @author Artur Szostak <artursz@iafrica.com>
10 /// @brief Declaration of the AliHLTGlobalTriggerDecision class storing the global HLT decision.
12 #include "AliHLTTriggerDecision.h"
13 #include "TArrayL64.h"
14 #include "TObjArray.h"
16 class AliHLTGlobalTriggerDecision : public AliHLTTriggerDecision
21 * Default constructor.
23 AliHLTGlobalTriggerDecision();
26 * Constructor specifying multiple information fields.
27 * \param result The result of the global trigger decision.
28 * \param triggerDomain The trigger domain for the global trigger decision.
29 * \param description The description of (reason for) the global trigger decision.
31 AliHLTGlobalTriggerDecision(
32 bool result, const AliHLTTriggerDomain& triggerDomain,
33 const char* description = ""
39 virtual ~AliHLTGlobalTriggerDecision();
42 * Inherited from TObject, this prints the contents of the trigger decision.
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.
47 virtual void Print(Option_t* option = "") const;
50 * Returns the number of trigger inputs that contributed to this global trigger decision.
52 Int_t NumberOfTriggerInputs() const { return fContributingTriggers.GetEntriesFast(); }
55 * Returns the i'th trigger input object in fContributingTriggers.
57 const AliHLTTriggerDecision* TriggerInput(Int_t i) const
59 return static_cast<const AliHLTTriggerDecision*>( fContributingTriggers[i] );
63 * Returns the list of trigger inputs used when making the global HLT trigger decision.
65 const TClonesArray& TriggerInputs() const { return fContributingTriggers; }
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.
72 void AddTriggerInput(const AliHLTTriggerDecision& decision)
74 new (fContributingTriggers[fContributingTriggers.GetEntriesFast()]) AliHLTTriggerDecision(decision);
78 * Returns the number of other input objects that contributed to this global trigger decision.
80 Int_t NumberOfInputObjects() const { return fInputObjects.GetEntriesFast(); }
83 * Returns the i'th input object in fInputObjects.
85 const TObject* InputObject(Int_t i) const { return fInputObjects[i]; }
88 * Returns the list of other input objects used when making the global HLT trigger decision.
90 const TObjArray& InputObjects() const { return fInputObjects; }
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.
98 void AddInputObject(const TObject* object)
100 fInputObjects.Add(object->Clone());
104 * Sets the counter array.
106 void SetCounters(const TArrayL64& counters) { fCounters = counters; }
109 * Returns the event trigger counters associated with the global trigger classes.
111 const TArrayL64& Counters() const { return fCounters; }
115 TClonesArray fContributingTriggers; /// The list of contributing trigger decisions from all AliHLTTrigger components that were considered.
116 TObjArray fInputObjects; /// The list of other input objects.
117 TArrayL64 fCounters; /// Event trigger counters. One counter for each trigger class in the global trigger.
119 ClassDef(AliHLTGlobalTriggerDecision, 1) // Contains the HLT global trigger decision and information contributing to the decision.
122 #endif // ALIHLTGLOBALTRIGGERDECISION_H