+// $Id$
/**************************************************************************
* This file is property of and copyright by the ALICE HLT Project *
* ALICE Experiment at CERN, All rights reserved. *
}
+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
entry.BlockType(blockType, origin, spec);
fgMenu->AddSymbol(entry);
}
+
+
+void AliHLTGlobalTriggerConfig::AddItem(
+ UInt_t priority, const char* conditionExpr, const char* domainExpr,
+ UInt_t prescalar, const char* description, bool defaultResult
+ )
+{
+ // Adds a new entry to the trigger menu with a particular priority.
+
+ if (fgMenu == NULL) NewMenu("");
+
+ AliHLTTriggerMenuItem entry;
+ entry.TriggerCondition(conditionExpr);
+ entry.MergeExpression(domainExpr);
+ entry.PreScalar(prescalar);
+ entry.Priority(priority);
+ entry.DefaultResult(defaultResult);
+ if (description != NULL) entry.Description(description);
+ fgMenu->AddItem(entry);
+}
+
+
+void AliHLTGlobalTriggerConfig::AddItem(
+ UInt_t priority, const char* conditionExpr, const char* domainExpr,
+ const char* description, Double_t scaledown, bool defaultResult
+ )
+{
+ // Adds a new entry to the trigger menu with a particular priority.
+
+ if (scaledown < 0)
+ {
+ cerr << "ERROR: Cannot have a scale-down value smaller than 0. But a value of "
+ << scaledown << " was specified. The valid range is [0..100]." << endl;
+ return;
+ }
+ if (scaledown < 0)
+ {
+ cerr << "ERROR: Cannot have a scale-down value larger than 100. But a value of "
+ << scaledown << " was specified. The valid range is [0..100]." << endl;
+ return;
+ }
+
+ if (fgMenu == NULL) NewMenu("");
+
+ AliHLTTriggerMenuItem entry;
+ entry.TriggerCondition(conditionExpr);
+ entry.MergeExpression(domainExpr);
+ entry.Priority(priority);
+ entry.ScaleDown(scaledown / 100.);
+ entry.DefaultResult(defaultResult);
+ if (description != NULL) entry.Description(description);
+ fgMenu->AddItem(entry);
+}
void AliHLTGlobalTriggerConfig::AddItem(
if (fgMenu == NULL) NewMenu("");
AliHLTTriggerMenuItem entry;
- entry.TriggerCondision(conditionExpr);
+ entry.TriggerCondition(conditionExpr);
entry.MergeExpression(domainExpr);
entry.PreScalar(prescalar);
if (description != NULL) entry.Description(description);
if (fgMenu == NULL) NewMenu("");
AliHLTTriggerMenuItem entry;
- entry.TriggerCondision(conditionExpr);
+ entry.TriggerCondition(conditionExpr);
entry.MergeExpression(domainExpr);
if (description != NULL) entry.Description(description);
fgMenu->AddItem(entry);
}
+void AliHLTGlobalTriggerConfig::SetDefaultTriggerDescription(const char* description)
+{
+ // Sets the default trigger decription.
+
+ if (fgMenu == NULL) NewMenu("");
+ fgMenu->DefaultDescription(description);
+}
+
+
+void AliHLTGlobalTriggerConfig::SetDefaultTriggerDomain(const AliHLTTriggerDomain& domain)
+{
+ // Sets the default trigger domain.
+
+ if (fgMenu == NULL) NewMenu("");
+ fgMenu->DefaultTriggerDomain(domain);
+}
+
+
+AliHLTTriggerDomain& AliHLTGlobalTriggerConfig::DefaultTriggerDomain()
+{
+ // Returns the default trigger domain for the current trigger menu.
+
+ if (fgMenu == NULL) NewMenu("");
+ return fgMenu->DefaultTriggerDomain();
+}
+
+
+void AliHLTGlobalTriggerConfig::SetDefaultConditionOperator(const char* op)
+{
+ // Sets the default operator for trigger condition merging.
+
+ if (fgMenu == NULL) NewMenu("");
+ fgMenu->DefaultConditionOperator(op);
+}
+
+
+void AliHLTGlobalTriggerConfig::SetDefaultDomainOperator(const char* op)
+{
+ // Sets the default operator for trigger domain merging.
+
+ if (fgMenu == NULL) NewMenu("");
+ fgMenu->DefaultDomainOperator(op);
+}
+
+
+void AliHLTGlobalTriggerConfig::SetDefaultResult(bool value)
+{
+ // Sets the default result when no item is matched.
+
+ if (fgMenu == NULL) NewMenu("");
+ fgMenu->DefaultResult(value);
+}
+
+
void AliHLTGlobalTriggerConfig::Print(Option_t* option) const
{
// Prints the contents of the current trigger menu being manipulated.