* This macro is used to test the AliHLTGlobalTriggerComponent class.
*/
-void testGlobalTriggerComponent()
+void testGlobalTriggerComponent(bool debug = false)
{
gSystem->Load("libAliHLTTrigger.so");
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");
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);
}