fIncludePaths(TObjString::Class()),
fIncludeFiles(TObjString::Class()),
fLibStateAtLoad(),
- fBits(0)
+ fBits(0),
+ fDataEventsOnly(true)
{
// Default constructor.
fIncludePaths.Clear();
fIncludeFiles.Clear();
SetBit(kIncludeInput);
+ fDataEventsOnly = true;
for (int i = 0; i < argc; i++)
{
}
continue;
}
-
+
+ if (strcmp(argv[i], "-process-all-events") == 0)
+ {
+ fDataEventsOnly = false;
+ continue;
+ }
+
HLTError("Unknown option '%s'.", argv[i]);
return -EINVAL;
} // for loop
AliHLTUInt32_t eventType=0;
if (!IsDataEvent(&eventType)) {
if (eventType==gkAliEventTypeEndOfRun) PrintStatistics(fTrigger, kHLTLogImportant, 0);
- return 0;
+ if (fDataEventsOnly)
+ {
+ IgnoreEvent();
+ return 0;
+ }
}
// Copy the trigger counters in case we need to set them back to their original
* Steer adding of input objects to the global HLT trigger decision.
* Options: none - include nothing, short - include a short TNames array,
* objects - include objects, by default on
+ * \li -process-all-events <br>
+ * Indicates that all events should be processed with the global trigger logic and
+ * not just the data events. The default is not to process just the data events.
*
* <h2>Configuration:</h2>
* Configured from CDB but can be overridden with the -config argument.
TClonesArray fIncludeFiles; //! Files specified by the -include command line option.
TString fLibStateAtLoad; //! This stores the loaded libraries just before we tell CINT to load the interpreted file.
AliHLTUInt32_t fBits; //! Status bits
+ bool fDataEventsOnly; //! Flag indicating if only data events are processed with trigger logic.
static const char* fgkTriggerMenuCDBPath; //! The path string to read the trigger menu from the CDB.
{
gSystem->Load("libAliHLTUtil.so");
gSystem->Load("libAliHLTTRD.so");
+ gSystem->Load("libAliHLTMUON.so");
gSystem->Load("libAliHLTTrigger.so");
loadedLibs = true;
}
if (loadedLibs)
{
gSystem->Unload("libAliHLTTrigger.so");
+ gSystem->Unload("libAliHLTMUON.so");
gSystem->Unload("libAliHLTTRD.so");
gSystem->Unload("libAliHLTUtil.so");
}
*/
void RunTrigger(int config = 0, bool usecint = false, bool debug = false, int numOfEvents = 8, const char* customClass = NULL)
{
- AliHLTSystem gHLTSystem;
- gHLTSystem.LoadComponentLibraries("libAliHLTUtil.so");
- gHLTSystem.LoadComponentLibraries("libAliHLTTRD.so");
- gHLTSystem.LoadComponentLibraries("libAliHLTTrigger.so");
+ AliHLTSystem sys;
+ sys.ScanOptions("ECS=CTP_TRIGGER_CLASS=00:TRIGGER-ALL:00-01-02-03-04-05-06-07-08-09-10-11-12-13-14-15-16-17");
+ sys.LoadComponentLibraries("libAliHLTUtil.so");
+ sys.LoadComponentLibraries("libAliHLTTRD.so");
+ sys.LoadComponentLibraries("libAliHLTMUON.so");
+ sys.LoadComponentLibraries("libAliHLTTrigger.so");
if (debug)
{
AliLog::SetGlobalLogLevel(AliLog::kMaxType);
- gHLTSystem.SetGlobalLoggingLevel(kHLTLogAll);
+ sys.SetGlobalLoggingLevel(kHLTLogAll);
}
TString cmdline = "-datatype ROOTTOBJ 'HLT ' ";
}
AliHLTConfiguration pub("pub", "ROOTFilePublisher", NULL, cmdline.Data());
- cmdline = Form("-config TriggerConfig.C(%d) -includepath $ALICE_ROOT/include -includepath $ALICE_ROOT/HLT/BASE"
+ cmdline = Form("-config $ALICE_ROOT/HLT/trigger/test/TriggerConfig.C(%d)"
+ " -includepath $ALICE_ROOT/include -includepath $ALICE_ROOT/HLT/BASE"
" -includepath $ALICE_ROOT/HLT/trigger -include AliHLTEventSummary.h",
config
);
AliHLTConfiguration sink("sink", "ROOTFileWriter", "proc", "-datafile testOutputFile.root -concatenate-events");
- gHLTSystem.BuildTaskList("sink");
- gHLTSystem.Run(numOfEvents);
+ sys.BuildTaskList("sink");
+ sys.Run(
+ numOfEvents,
+ 1, // Stop chain at end of run.
+ 0x1 // Active CTP trigger mask.
+ );
}
/**
"aliroot %s <<EOF\n"
"gSystem->Load(\"libAliHLTUtil.so\");\n"
"gSystem->Load(\"libAliHLTTRD.so\");\n"
+ "gSystem->Load(\"libAliHLTMUON.so\");\n"
"gSystem->Load(\"libAliHLTTrigger.so\");\n"
"gSystem->SetIncludePath(\"-I${ALICE_ROOT}/include"
" -I${ALICE_ROOT}/HLT/BASE -I${ALICE_ROOT}/HLT/trigger\");\n"
- ".L testGlobalTriggerComponent.C+\n"
+ ".L $ALICE_ROOT/HLT/trigger/test/testGlobalTriggerComponent.C+\n"
"RunTrigger(%d,%d,%d,%d,%s);\n"
"EOF\n",
redirection,
<< "): The domain does not match the expected value for event "
<< eventNum << ". Got:" << endl;
decision->TriggerDomain().Print();
- cout << "but expected:" << endl;
+ cerr << "but expected:" << endl;
expectedDomain.Print();
return false;
}
int main(int /*argc*/, const char** /*argv*/)
{
- const char* cpCmd1 = "if test ! -f TriggerConfig.C ; then cp $ALICE_ROOT/HLT/trigger/test/TriggerConfig.C ./; exit 1; fi";
- const char* cpCmd2 = "if test ! -f testGlobalTriggerComponent.C ; then cp $ALICE_ROOT/HLT/trigger/test/testGlobalTriggerComponent.C ./; exit 1; fi";
- bool copiedFile1 = gSystem->Exec(cpCmd1) != 0;
- bool copiedFile2 = gSystem->Exec(cpCmd2) != 0;
bool resultOk = testGlobalTriggerComponent();
if (not resultOk) return 1;
- if (copiedFile1) gSystem->Exec("rm TriggerConfig.C");
- if (copiedFile2) gSystem->Exec("rm testGlobalTriggerComponent.C");
return 0;
}