]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding an extra AddSymbol method for convenience.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Mar 2009 11:34:04 +0000 (11:34 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Mar 2009 11:34:04 +0000 (11:34 +0000)
HLT/trigger/AliHLTGlobalTriggerConfig.cxx
HLT/trigger/AliHLTGlobalTriggerConfig.h

index 7b812ea1ae13339d2accc612ba6cfacc1a38e83c..52b3dcb5cda1cee7a6e0b676ed9ea266aa5c5e69 100644 (file)
@@ -71,6 +71,24 @@ void AliHLTGlobalTriggerConfig::Clear()
 }
 
 
+void AliHLTGlobalTriggerConfig::AddSymbol(
+    const char* name, const char* type, const char* defaultExpr
+  )
+{
+  // Adds a new constant symbol to the trigger menu.
+  
+  if (fgMenu == NULL) NewMenu("");
+  
+  AliHLTTriggerMenuSymbol entry;
+  entry.Name(name);
+  entry.Type(type);
+  entry.ObjectClass("");
+  entry.AssignExpression("");
+  entry.DefaultValue(defaultExpr);
+  fgMenu->AddSymbol(entry);
+}
+
+
 void AliHLTGlobalTriggerConfig::AddSymbol(
     const char* name, const char* type, const char* assignExpr,
     const char* defaultExpr, const char* className
index f9d16f68e51027db3bed4b1341c6a4f211b0820b..8c03ba7866fae368b6cd91e547f6bcba563ab48c 100644 (file)
@@ -58,6 +58,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.