3 #ifndef ALIHLTGLOBALTRIGGERDECISION_H
4 #define ALIHLTGLOBALTRIGGERDECISION_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 AliHLTGlobalTriggerDecision.h
10 /// @author Artur Szostak <artursz@iafrica.com>
12 /// @brief Declaration of the AliHLTGlobalTriggerDecision class storing the global HLT decision.
14 #include "AliHLTTriggerDecision.h"
15 #include "TArrayL64.h"
16 #include "TObjArray.h"
18 class AliHLTGlobalTriggerDecision : public AliHLTTriggerDecision
23 * Default constructor.
25 AliHLTGlobalTriggerDecision();
28 * Constructor specifying multiple information fields.
29 * \param result The result of the global trigger decision.
30 * \param triggerDomain The trigger domain for the global trigger decision.
31 * \param description The description of (reason for) the global trigger decision.
33 AliHLTGlobalTriggerDecision(
34 bool result, const AliHLTTriggerDomain& triggerDomain,
35 const char* description = ""
41 virtual ~AliHLTGlobalTriggerDecision();
44 * Inherited from TObject, this prints the contents of the trigger decision.
45 * \param option Can be "short" which will print the short format or "counters"
46 * which will print only the counters or "compact" which will print only the
47 * global information but not the lists of input objects.
49 virtual void Print(Option_t* option = "") const;
52 * Returns the number of trigger inputs that contributed to this global trigger decision.
54 Int_t NumberOfTriggerInputs() const { return fContributingTriggers.GetEntriesFast(); }
57 * Returns the i'th trigger input object in fContributingTriggers.
59 const AliHLTTriggerDecision* TriggerInput(Int_t i) const
61 return static_cast<const AliHLTTriggerDecision*>( fContributingTriggers[i] );
65 * Returns the list of trigger inputs used when making the global HLT trigger decision.
67 const TClonesArray& TriggerInputs() const { return fContributingTriggers; }
70 * Adds a trigger input to the list of triggers that were considered when making
71 * this global trigger decision.
72 * \param decision The trigger decision object to add.
74 void AddTriggerInput(const AliHLTTriggerDecision& decision)
76 new (fContributingTriggers[fContributingTriggers.GetEntriesFast()]) AliHLTTriggerDecision(decision);
80 * Returns the number of other input objects that contributed to this global trigger decision.
82 Int_t NumberOfInputObjects() const { return fInputObjects.GetEntriesFast(); }
85 * Returns the i'th input object in fInputObjects.
87 const TObject* InputObject(Int_t i) const { return fInputObjects[i]; }
90 * Returns the list of other input objects used when making the global HLT trigger decision.
92 const TObjArray& InputObjects() const { return fInputObjects; }
95 * Adds a input object to the list of input objects that were considered when
96 * making this global trigger decision.
97 * \param object The input object to add.
98 * \note A copy of the object is made with TObject::Clone() and added.
100 void AddInputObject(const TObject* object)
102 fInputObjects.Add(object->Clone());
106 * Sets the counter array.
108 void SetCounters(const TArrayL64& counters) { fCounters = counters; }
111 * Returns the event trigger counters associated with the global trigger classes.
113 const TArrayL64& Counters() const { return fCounters; }
117 TClonesArray fContributingTriggers; /// The list of contributing trigger decisions from all AliHLTTrigger components that were considered.
118 TObjArray fInputObjects; /// The list of other input objects.
119 TArrayL64 fCounters; /// Event trigger counters. One counter for each trigger class in the global trigger.
121 ClassDef(AliHLTGlobalTriggerDecision, 1) // Contains the HLT global trigger decision and information contributing to the decision.
124 #endif // ALIHLTGLOBALTRIGGERDECISION_H