]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
applying a temporary solution for a new processing scheme of trigger menu items
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Oct 2009 10:19:06 +0000 (10:19 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Oct 2009 10:19:06 +0000 (10:19 +0000)
all items are evaluated, both decision and domain is or'ed
This implementation fits teh current requirements, there will be a proper implementation in the future.

HLT/trigger/AliHLTGlobalTriggerComponent.cxx

index 4e770456481ba7609a4589762a8c0a83f0d7795f..0cade4ac626099989227238b4ce4ab6f97c91296 100644 (file)
@@ -629,6 +629,7 @@ int AliHLTGlobalTriggerComponent::GenerateTrigger(
   {
     code << "    HLTDebug(\"Calculating global HLT trigger result with trigger object at %p.\", this);" << endl;
   }
+  code << "    bool result=false;" << endl;
   for (UInt_t i = 0; i < menu->NumberOfItems(); i++)
   {
     const AliHLTTriggerMenuItem* item = menu->Item(i);
@@ -657,21 +658,22 @@ int AliHLTGlobalTriggerComponent::GenerateTrigger(
       indentation = "  ";
       code << "      if ((GetCounter(" << i << ") % " << item->PreScalar() << ") == 1) {" << endl;
     }
-    code << indentation << "      _domain_ = " << mergeExpr.Data() << ";" << endl;
-    code << indentation << "      _description_ = fMenuItemDescription" << i << ";" << endl;
+    code << indentation << "      _domain_ |= " << mergeExpr.Data() << ";" << endl;
+    code << indentation << "      if (!_description_.IsNull()) _description_+= \",\";" << endl;
+    code << indentation << "      _description_ += fMenuItemDescription" << i << ";" << endl;
     if (fDebugMode)
     {
       code << indentation << "      HLTDebug(\"Matched trigger condition " << i
            << " (Description = '%s').\", fMenuItemDescription" << i << ".Data());" << endl;
     }
-    code << indentation << "      return true;" << endl;
+    code << indentation << "      result=true;" << endl;
     if (item->PreScalar() != 0)
     {
       code << "      }" << endl;
     }
     code << "    }" << endl;
   }
-  code << "    return false;" << endl;
+  code << "    return result;" << endl;
   code << "  }" << endl;
   
   // Generate the custom Factory class.