]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/trigger/test/testGlobalTriggerComponent.C
Finished code for global HLT trigger and the trigger menu implementation.
[u/mrichter/AliRoot.git] / HLT / trigger / test / testGlobalTriggerComponent.C
index 3295eca01362fc7f71f88bb6cd90bb4c05311b4e..be2ed85a6113e66f359d1bbb664efe60fe3eaf18 100644 (file)
@@ -22,7 +22,7 @@
  * This macro is used to test the AliHLTGlobalTriggerComponent class.
  */
  
-void testGlobalTriggerComponent()
+void testGlobalTriggerComponent(bool debug = false)
 {
        gSystem->Load("libAliHLTTrigger.so");
 
@@ -30,12 +30,15 @@ void testGlobalTriggerComponent()
        
        AliHLTReadoutList readoutList1("TPC");
        AliHLTTriggerDomain triggerDomain1;
-       AliHLTTriggerDecision decision1(true, "Trigger1", readoutList1, triggerDomain1);
+       triggerDomain1.Add("CLUSTERS", "TPC ");
+       triggerDomain1.Add(readoutList1);
+       AliHLTTriggerDecision decision1(true, "Trigger1", triggerDomain1, "Example trigger 1");
        
-       AliHLTReadoutList readoutList2;
+       AliHLTReadoutList readoutList2("MUONTRK");
        AliHLTTriggerDomain triggerDomain2;
-       triggerDomain2.Add("aaaa", "bbbb");
-       AliHLTTriggerDecision decision2(true, "Trigger2", readoutList2, triggerDomain2);
+       triggerDomain2.Add("aaaaaaaa", "bbbb");
+       triggerDomain2.Add(readoutList2);
+       AliHLTTriggerDecision decision2(true, "Trigger2", triggerDomain2, "Another example trigger 2");
        
        decision1.Write("Trigger1");
        decision2.Write("Trigger2");
@@ -44,12 +47,19 @@ void testGlobalTriggerComponent()
        AliHLTSystem sys;
        sys.LoadComponentLibraries("libAliHLTUtil.so");
        sys.LoadComponentLibraries("libAliHLTTrigger.so");
+       if (debug)
+       {
+               AliLog::SetGlobalLogLevel(AliLog::kMaxType);
+               sys.SetGlobalLoggingLevel(0x7F);
+       }
        
        AliHLTConfiguration pub("pub", "ROOTFilePublisher", NULL, " -datatype ROOTTOBJ 'HLT ' -datafile testInputFile.root");
-       AliHLTConfiguration proc("proc", "HLTGlobalTrigger", "pub", "");
-       AliHLTConfiguration sink("sink", "ROOTFileWriter", "proc", "-datafile testOutput.root");
+       TString cmdline = "-config TriggerConfig.C -include AliHLTRunSummary.h";
+       if (debug) cmdline += " -debug";
+       AliHLTConfiguration proc("proc", "HLTGlobalTrigger", "pub", cmdline.Data());
+       AliHLTConfiguration sink("sink", "ROOTFileWriter", "proc", "-datafile testOutput.root -concatenate-events");
        
        sys.BuildTaskList("sink");
-       sys.Run(1);
+       sys.Run(10);
 }