3 #ifndef ALIHLTGLOBALTRIGGER_H
4 #define ALIHLTGLOBALTRIGGER_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 AliHLTGlobalTrigger.h
10 /// @author Artur Szostak <artursz@iafrica.com>
12 /// @brief Declaration of the AliHLTGlobalTrigger base class.
15 #include "AliHLTDataTypes.h"
17 class AliHLTTriggerDomain;
18 class AliHLTTriggerMenu;
23 * \class AliHLTGlobalTrigger
24 * This class is an abstract class. Classes which derive from this class should
25 * implement the logic for a particular trigger menu. The AliHLTGlobalTriggerComponent
26 * takes the AliHLTTriggerMenu class and creates a class deriving from AliHLTGlobalTrigger
27 * on the fly to implement the trigger logic for that particular trigger menu.
29 class AliHLTGlobalTrigger
33 /// Default destructor.
34 virtual ~AliHLTGlobalTrigger() {}
37 * Abstract method to fill values from a trigger menu. Specifically, the description
38 * strings and domain entry values will be copied over.
39 * \param menu The trigger menu to fill from.
41 virtual void FillFromMenu(const AliHLTTriggerMenu& menu) = 0;
44 * Abstract method to indicate that a new event is being processed and the
45 * internal buffers should be cleared or reset.
47 virtual void NewEvent() = 0;
50 * Abstract method which should fill in the internal attributes from the given
52 * \param object The object to fill from.
53 * \param type The data block type the object was found in.
54 * \param spec The data block specification the object was found in.
57 const TObject* object,
58 const AliHLTComponentDataType& type,
63 * Abstract method that calculates the trigger decision
64 * \param triggerResult The resultant decision bit of the global HLT trigger decision.
65 * \param domain The resultant trigger domain for the global HLT result.
66 * \param description The resultant description for the global HLT result.
67 * \returns true if any of the triggers in the trigger menu were matched.
69 virtual bool CalculateTriggerDecision(bool& triggerResult, AliHLTTriggerDomain& domain, TString& description) = 0;
72 * Returns the array of internal trigger counters.
74 virtual const TArrayL64& GetCounters() const = 0;
77 * Sets the internal trigger counter values.
78 * \param counters The array of trigger counters to use.
80 virtual void SetCounters(const TArrayL64& counters) = 0;
83 * Method for checking if the last call to one of the AliHLTGlobalTrigger
84 * methods failed. This is used by the AliHLTGlobalTriggerWrapper to indicate
85 * if the CINT interpreter had problems with the interpreted class.
86 * \returns true if there was a problem with the method call.
88 virtual bool CallFailed() const { return false; }
91 * Creates a new instance of a particular global trigger class.
92 * \param name The name of the class to create.
93 * \returns the new trigger class instance which needs to be deleted by the
94 * caller with the delete operator.
96 static AliHLTGlobalTrigger* CreateNew(const char* name);
98 ClassDef(AliHLTGlobalTrigger, 0) // Global HLT trigger base class which implements logic for a particular trigger menu.
101 #endif // ALIHLTGLOBALTRIGGER_H