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 domain The resultant trigger domain for the global HLT result.
65 * \param description The resultant description for the global HLT result.
66 * \returns The global HLT trigger decision result.
68 virtual bool CalculateTriggerDecision(AliHLTTriggerDomain& domain, TString& description) = 0;
71 * Returns the array of internal trigger counters.
73 virtual const TArrayL64& GetCounters() const = 0;
76 * Sets the internal trigger counter values.
77 * \param counters The array of trigger counters to use.
79 virtual void SetCounters(const TArrayL64& counters) = 0;
82 * Method for checking if the last call to one of the AliHLTGlobalTrigger
83 * methods failed. This is used by the AliHLTGlobalTriggerWrapper to indicate
84 * if the CINT interpreter had problems with the interpreted class.
85 * \returns true if there was a problem with the method call.
87 virtual bool CallFailed() const { return false; }
90 * Creates a new instance of a particular global trigger class.
91 * \param name The name of the class to create.
92 * \returns the new trigger class instance which needs to be deleted by the
93 * caller with the delete operator.
95 static AliHLTGlobalTrigger* CreateNew(const char* name);
97 ClassDef(AliHLTGlobalTrigger, 0) // Global HLT trigger base class which implements logic for a particular trigger menu.
100 #endif // ALIHLTGLOBALTRIGGER_H