3 #ifndef ALIHLTGLOBALTRIGGERCONFIG_H
4 #define ALIHLTGLOBALTRIGGERCONFIG_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 AliHLTGlobalTriggerConfig.h
10 /// @author Artur Szostak <artursz@iafrica.com>
12 /// @brief Declaration of the AliHLTGlobalTriggerConfig class.
16 class AliHLTComponentDataType;
17 class AliHLTTriggerMenu;
18 class AliHLTTriggerDomain;
21 * \class AliHLTGlobalTriggerConfig
22 * This class is a user interface class used to make it easy to create HLT global
23 * trigger configurations (trigger menus).
25 class AliHLTGlobalTriggerConfig
30 * Default constructor.
32 AliHLTGlobalTriggerConfig(const char* name = NULL);
37 virtual ~AliHLTGlobalTriggerConfig();
40 * Inherited from TObject, this prints the contents of the current trigger menu
41 * being manipulated. Specifically fgMenu.
42 * \param option This is passed on to the printing routine of the trigger menu.
44 virtual void Print(Option_t* option = "") const;
47 * Creates a new trigger menu. If a trigger menu is already active then the existing
48 * one is replaced with the new menu.
49 * \param name The name of the new trigger menu.
51 static void NewMenu(const char* name);
54 * Deletes the current trigger menu.
59 * Returns the current trigger menu.
61 static const AliHLTTriggerMenu* Menu() { return fgMenu; }
64 * Adds a new constant symbol to the current trigger menu.
65 * This is useful to add symbols that are used as constants in the trigger
66 * menu condition or merging expressions.
67 * \param name The name of the symbol. It must be a valid C++ variable name.
68 * \param type The data type of the symbol. It must be a valid C++ data type.
69 * \param defaultExpr The default value to use for the symbol. It must be a
70 * valid C++ expression.
72 static void AddSymbol(
73 const char* name, const char* type, const char* defaultExpr
77 * Adds a new symbol to the current trigger menu.
78 * \param name The name of the symbol. It must be a valid C++ variable name.
79 * \param type The data type of the symbol. It must be a valid C++ data type.
80 * \param assignExpr The assignment expression for the symbol. It must be a
81 * valid C++ expression. The 'this' keyword is used as a place holder for
82 * the object found in the data block.
83 * \param defaultExpr The default value to use for the symbol. It must be a
84 * valid C++ expression.
85 * \param className The class name of the object found in the data block from
86 * which to fetch the symbol's value.
88 static void AddSymbol(
89 const char* name, const char* type, const char* assignExpr,
90 const char* defaultExpr, const char* className = "TObject"
94 * Adds a new symbol to the current trigger menu.
95 * \param name The name of the symbol. It must be a valid C++ variable name.
96 * \param type The data type of the symbol. It must be a valid C++ data type.
97 * \param assignExpr The assignment expression for the symbol. It must be a
98 * valid C++ expression. The 'this' keyword is used as a place holder for
99 * the object found in the data block.
100 * \param defaultExpr The default value to use for the symbol. It must be a
101 * valid C++ expression.
102 * \param className The class name of the object found in the data block from
103 * which to fetch the symbol's value.
104 * \param blockType The data block type and origin from which to fetch the
107 static void AddSymbol(
108 const char* name, const char* type, const char* assignExpr,
109 const char* defaultExpr, const char* className,
110 const AliHLTComponentDataType& blockType
114 * Adds a new symbol to the current trigger menu.
115 * \param name The name of the symbol. It must be a valid C++ variable name.
116 * \param type The data type of the symbol. It must be a valid C++ data type.
117 * \param assignExpr The assignment expression for the symbol. It must be a
118 * valid C++ expression. The 'this' keyword is used as a place holder for
119 * the object found in the data block.
120 * \param defaultExpr The default value to use for the symbol. It must be a
121 * valid C++ expression.
122 * \param className The class name of the object found in the data block from
123 * which to fetch the symbol's value.
124 * \param blockType The data block type and origin from which to fetch the
126 * \param spec The data block specification to use.
128 static void AddSymbol(
129 const char* name, const char* type, const char* assignExpr,
130 const char* defaultExpr, const char* className,
131 const AliHLTComponentDataType& blockType, UInt_t spec
135 * Adds a new symbol to the current trigger menu.
136 * \param name The name of the symbol. It must be a valid C++ variable name.
137 * \param type The data type of the symbol. It must be a valid C++ data type.
138 * \param assignExpr The assignment expression for the symbol. It must be a
139 * valid C++ expression. The 'this' keyword is used as a place holder for
140 * the object found in the data block.
141 * \param defaultExpr The default value to use for the symbol. It must be a
142 * valid C++ expression.
143 * \param className The class name of the object found in the data block from
144 * which to fetch the symbol's value.
145 * \param blockType The data block type string of the data block. The value
146 * kAliHLTAnyDataTypeID can be used to specify the any type wild card value.
147 * \param origin The origin of the data block, such as the detector name.
148 * The value kAliHLTDataOriginAny can be used to specify the any origin
151 static void AddSymbol(
152 const char* name, const char* type, const char* assignExpr,
153 const char* defaultExpr, const char* className,
154 const char* blockType, const char* origin
158 * Adds a new symbol to the current trigger menu.
159 * \param name The name of the symbol. It must be a valid C++ variable name.
160 * \param type The data type of the symbol. It must be a valid C++ data type.
161 * \param assignExpr The assignment expression for the symbol. It must be a
162 * valid C++ expression. The 'this' keyword is used as a place holder for
163 * the object found in the data block.
164 * \param defaultExpr The default value to use for the symbol. It must be a
165 * valid C++ expression.
166 * \param className The class name of the object found in the data block from
167 * which to fetch the symbol's value.
168 * \param blockType The data block type string of the data block. The value
169 * kAliHLTAnyDataTypeID can be used to specify the any type wild card value.
170 * \param origin The origin of the data block, such as the detector name.
171 * The value kAliHLTDataOriginAny can be used to specify the any origin
173 * \param spec The data block specification to use.
175 static void AddSymbol(
176 const char* name, const char* type, const char* assignExpr,
177 const char* defaultExpr, const char* className,
178 const char* blockType, const char* origin, UInt_t spec
182 * Adds a new trigger menu item to the current trigger menu.
183 * \param conditionExpr The trigger condition expression. It must be a valid
184 * C++ expression, where the symbol names must be either defined in the
185 * menu or the names of AliHLTTrigger components.
186 * \param domainExpr The trigger domain merging expression. It must be a
187 * valid C++ expression, where the symbol names must be either defined in
188 * the menu or the names of AliHLTTrigger components.
189 * \param prescalar The prescalar value to use (Zero if not used).
190 * \param description Optional description string which will be used in the
194 const char* conditionExpr, const char* domainExpr, UInt_t prescalar,
195 const char* description = NULL
199 * Adds a new trigger menu item to the current trigger menu.
200 * \param conditionExpr The trigger condition expression. It must be a valid
201 * C++ expression, where the symbol names must be either defined in the
202 * menu or the names of AliHLTTrigger components.
203 * \param domainExpr The trigger domain merging expression. It must be a
204 * valid C++ expression, where the symbol names must be either defined in
205 * the menu or the names of AliHLTTrigger components.
206 * \param description Optional description string which will be used in the
210 const char* conditionExpr, const char* domainExpr,
211 const char* description = NULL
215 * Sets the default trigger description string that should be used by the global
216 * trigger component for trigger decisions that have a negative (false) trigger
218 * \param description The trigger description string to use.
220 static void SetDefaultTriggerDescription(const char* description);
223 * This method sets the default trigger domain to use by the global trigger
224 * component or trigger decisions that have a negative (false) trigger result.
225 * \param domain The new value of the default trigger domain.
227 static void SetDefaultTriggerDomain(const AliHLTTriggerDomain& domain);
230 * Fetches the default trigger domain that will be used by the global trigger
231 * component or trigger decisions that have a negative (false) trigger result.
232 * \returns The default trigger domain for the current trigger menu.
234 static AliHLTTriggerDomain& DefaultTriggerDomain();
238 /// Not implemented. Do not allow copying of this object.
239 AliHLTGlobalTriggerConfig(const AliHLTGlobalTriggerConfig& obj);
240 /// Not implemented. Do not allow copying of this object.
241 AliHLTGlobalTriggerConfig& operator = (const AliHLTGlobalTriggerConfig& obj);
243 static AliHLTTriggerMenu* fgMenu; /// Trigger menu which is created by this interface class.
245 ClassDef(AliHLTGlobalTriggerConfig, 0) // Interface class used to construct a global HLT trigger menu configuration.
248 #endif // ALIHLTGLOBALTRIGGERCONFIG_H