]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/trigger/AliHLTGlobalTriggerConfig.h
Fixes for #84564: Change in AliESDpid.cxx
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTGlobalTriggerConfig.h
index 065fb6211121f45b5c630d58ccf4cd1030345f8f..e1872c09e6a1d0129a6a5c4ec6da7d5df9fd3264 100644 (file)
@@ -1,3 +1,5 @@
+//-*- Mode: C++ -*-
+// $Id$
 #ifndef ALIHLTGLOBALTRIGGERCONFIG_H
 #define ALIHLTGLOBALTRIGGERCONFIG_H
 /* This file is property of and copyright by the ALICE HLT Project        *
 
 class AliHLTComponentDataType;
 class AliHLTTriggerMenu;
+class AliHLTTriggerDomain;
 
 /**
  * \class AliHLTGlobalTriggerConfig
  * This class is a user interface class used to make it easy to create HLT global
  * trigger configurations (trigger menus).
+ *
+ * \note The following symbol names are reserved and should not be used in any
+ * of the trigger conditions, merging expressions or trigger menu symbols:
+ *   _domain_
+ *   _description_
+ *   _item_result_
+ *   _group_result_
+ *   _previous_match_
+ *   _trigger_matched_
  */
 class AliHLTGlobalTriggerConfig
 {
@@ -57,6 +69,19 @@ class AliHLTGlobalTriggerConfig
    */
   static const AliHLTTriggerMenu* Menu() { return fgMenu; }
   
+  /**
+   * Adds a new constant symbol to the current trigger menu.
+   * This is useful to add symbols that are used as constants in the trigger
+   * menu condition or merging expressions.
+   * \param  name  The name of the symbol. It must be a valid C++ variable name.
+   * \param  type  The data type of the symbol. It must be a valid C++ data type.
+   * \param  defaultExpr  The default value to use for the symbol. It must be a
+   *     valid C++ expression.
+   */
+  static void AddSymbol(
+      const char* name, const char* type, const char* defaultExpr
+    );
+  
   /**
    * Adds a new symbol to the current trigger menu.
    * \param  name  The name of the symbol. It must be a valid C++ variable name.
@@ -162,6 +187,48 @@ class AliHLTGlobalTriggerConfig
       const char* blockType, const char* origin, UInt_t spec
     );
   
+  /**
+   * Adds a new trigger menu item to the current trigger menu with a particular priority.
+   * \param  priority  The priority group this entry should be part of. Higher numbers
+   *     indicate higher priorities.
+   * \param  conditionExpr  The trigger condition expression. It must be a valid
+   *     C++ expression, where the symbol names must be either defined in the
+   *     menu or the names of AliHLTTrigger components.
+   * \param  domainExpr  The trigger domain merging expression. It must be a
+   *     valid C++ expression, where the symbol names must be either defined in
+   *     the menu or the names of AliHLTTrigger components.
+   * \param  prescalar  The prescalar value to use (Zero if not used).
+   * \param  description  Optional description string which will be used in the
+   *     global result.
+   * \param  defaultResult  The default result to use for the global trigger decision
+   *     if this item's trigger condition is matched.
+   */
+  static void AddItem(
+      UInt_t priority, const char* conditionExpr, const char* domainExpr,
+      UInt_t prescalar, const char* description = NULL, bool defaultResult = true
+    );
+  
+  /**
+   * Adds a new trigger menu item to the current trigger menu with a particular priority.
+   * \param  priority  The priority group this entry should be part of. Higher numbers
+   *     indicate higher priorities.
+   * \param  conditionExpr  The trigger condition expression. It must be a valid
+   *     C++ expression, where the symbol names must be either defined in the
+   *     menu or the names of AliHLTTrigger components.
+   * \param  domainExpr  The trigger domain merging expression. It must be a
+   *     valid C++ expression, where the symbol names must be either defined in
+   *     the menu or the names of AliHLTTrigger components.
+   * \param  description  Optional description string which will be used in the
+   *     global result.
+   * \param  scaledown  The scale-down factor to use as a percentage in the range [0..100].
+   * \param  defaultResult  The default result to use for the global trigger decision
+   *     if this item's trigger condition is matched.
+   */
+  static void AddItem(
+      UInt_t priority, const char* conditionExpr, const char* domainExpr,
+      const char* description = NULL, Double_t scaledown = 100, bool defaultResult = true
+    );
+  
   /**
    * Adds a new trigger menu item to the current trigger menu.
    * \param  conditionExpr  The trigger condition expression. It must be a valid
@@ -195,6 +262,49 @@ class AliHLTGlobalTriggerConfig
       const char* description = NULL
     );
   
+  /**
+   * Sets the default trigger description string that should be used by the global
+   * trigger component for trigger decisions that have a negative (false) trigger
+   * result.
+   * \param  description  The trigger description string to use.
+   */
+  static void SetDefaultTriggerDescription(const char* description);
+  
+  /**
+   * This method sets the default trigger domain to use by the global trigger
+   * component or trigger decisions that have a negative (false) trigger result.
+   * \param  domain  The new value of the default trigger domain.
+   */
+  static void SetDefaultTriggerDomain(const AliHLTTriggerDomain& domain);
+  
+  /**
+   * Fetches the default trigger domain that will be used by the global trigger
+   * component or trigger decisions that have a negative (false) trigger result.
+   * \returns The default trigger domain for the current trigger menu.
+   */
+  static AliHLTTriggerDomain& DefaultTriggerDomain();
+  
+  /**
+   * This method sets the default operator used to merge trigger conditions from
+   * the same trigger menu priority group.
+   * The trigger menu normally uses the 'or' operator.
+   * \param  op  The new default operator to use.
+   */
+  static void SetDefaultConditionOperator(const char* op);
+  
+  /**
+   * This method sets the default operator used to merge trigger domains from
+   * the same trigger menu priority group that get matched.
+   * The trigger menu normally uses the '|' operator.
+   * \param  op  The new default operator to use.
+   */
+  static void SetDefaultDomainOperator(const char* op);
+  
+  /**
+   * Set the default result for the global trigger if no item is matched.
+   */
+  static void SetDefaultResult(bool value);
+  
  private:
   
   /// Not implemented. Do not allow copying of this object.