]> 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 8c03ba7866fae368b6cd91e547f6bcba563ab48c..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        *
@@ -19,6 +21,15 @@ 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
 {
@@ -176,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
@@ -231,6 +284,27 @@ class AliHLTGlobalTriggerConfig
    */
   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.