+
+
+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);
+}