From: richterm Date: Tue, 17 Nov 2009 14:51:20 +0000 (+0000) Subject: adding more options to control the size of the GlobalTriggerDecision. X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=6598c82bf4f4610bbc1c63c5d547052f0d0862c8 adding more options to control the size of the GlobalTriggerDecision. Currently, the bottleneck seems to be the streaming of the output object, it is much slower if many input objects have been added. New options: -forward-input forwards the input object instead of adding them -include-input=none do not include anything in the decisionobject -include-input=short only include a short TNames array which describes the objects -include-input=objects include all the objects, this is the current behavior and remains the default --- diff --git a/HLT/trigger/AliHLTGlobalTriggerComponent.cxx b/HLT/trigger/AliHLTGlobalTriggerComponent.cxx index 7c577b64e55..f78003fe678 100644 --- a/HLT/trigger/AliHLTGlobalTriggerComponent.cxx +++ b/HLT/trigger/AliHLTGlobalTriggerComponent.cxx @@ -70,7 +70,6 @@ AliHLTGlobalTriggerComponent::AliHLTGlobalTriggerComponent() : fTrigger(NULL), fDebugMode(false), fRuntimeCompile(true), - fSkipCTPCounters(false), fDeleteCodeFile(false), fCodeFileName(), fClassName(), @@ -79,7 +78,8 @@ AliHLTGlobalTriggerComponent::AliHLTGlobalTriggerComponent() : fBufferSizeMultiplier(1.), fIncludePaths(TObjString::Class()), fIncludeFiles(TObjString::Class()), - fLibStateAtLoad() + fLibStateAtLoad(), + fBits(0) { // Default constructor. @@ -128,6 +128,7 @@ Int_t AliHLTGlobalTriggerComponent::DoInit(int argc, const char** argv) const char* codeFileName = NULL; fIncludePaths.Clear(); fIncludeFiles.Clear(); + SetBit(kIncludeInput); for (int i = 0; i < argc; i++) { @@ -216,7 +217,47 @@ Int_t AliHLTGlobalTriggerComponent::DoInit(int argc, const char** argv) if (strcmp(argv[i], "-skipctp") == 0) { HLTInfo("Skipping CTP counters in trigger decision"); - fSkipCTPCounters=true; + SetBit(kSkipCTP); + continue; + } + + if (strcmp(argv[i], "-forward-input") == 0) + { + HLTInfo("Forwarding input objects and trigger decisions"); + SetBit(kForwardInput); + SetBit(kIncludeShort); + SetBit(kIncludeInput, false); + continue; + } + + if (strcmp(argv[i], "-include-input") == 0) + { + SetBit(kForwardInput,false); + TString param=argv[i]; + param.ReplaceAll("-include-input", ""); + if (param.CompareTo("=none")==0) + { + HLTInfo("skipping objects and trigger decisions"); + SetBit(kIncludeShort, false); + SetBit(kIncludeInput, false); + } + else if (param.CompareTo("=short")==0) + { + HLTWarning("short info on objects and trigger decisions not yet implemented"); + //HLTInfo("including short info on objects and trigger decisions"); + SetBit(kIncludeShort); + SetBit(kIncludeInput, false); + } + else if (param.CompareTo("=objects")==0 || param.IsNull()) + { + HLTInfo("including input objects and trigger decisions"); + SetBit(kIncludeShort, false); + SetBit(kIncludeInput); + } + else + { + HLTError("unknown parameter '%s' for argument '-include-input'", param.Data()); + } continue; } @@ -393,9 +434,16 @@ int AliHLTGlobalTriggerComponent::DoTrigger() } // Add the input objects used to the global decision. + if (TestBit(kIncludeShort)) { + // short info to be implemented + } obj = GetFirstInputObject(); while (obj != NULL) { + if (TestBit(kForwardInput)) { + Forward(obj); + } + if (TestBit(kIncludeInput)) { if (obj->IsA() == AliHLTTriggerDecision::Class()) { decision.AddTriggerInput( *static_cast(obj) ); @@ -404,10 +452,11 @@ int AliHLTGlobalTriggerComponent::DoTrigger() { decision.AddInputObject(obj); } + } obj = GetNextInputObject(); } - if (!fSkipCTPCounters && CTPData()) decision.AddInputObject(CTPData()); + if (!TestBit(kSkipCTP) && CTPData()) decision.AddInputObject(CTPData()); CreateEventDoneReadoutFilter(decision.TriggerDomain(), 3); CreateEventDoneReadoutFilter(decision.TriggerDomain(), 4); diff --git a/HLT/trigger/AliHLTGlobalTriggerComponent.h b/HLT/trigger/AliHLTGlobalTriggerComponent.h index 3864b792b59..33421d47fbd 100644 --- a/HLT/trigger/AliHLTGlobalTriggerComponent.h +++ b/HLT/trigger/AliHLTGlobalTriggerComponent.h @@ -58,6 +58,15 @@ class AliHLTGlobalTrigger; * filename. * \li -skipctp
* Indicates that the CTP data should not be added to the global HLT trigger decision. + * \li -forward-input
+ * Forward the input objects instead of adding them to the global HLT trigger decision. + * This will also add a short info on the input objects and decisions, like + * -include-input=short, to switch off -include-input=none can be placed after the + * parameter + * \li -include-input[=none,short,objects]
+ * 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 * *

Configuration:

* Configured from CDB but can be overridden with the -config argument. @@ -136,6 +145,21 @@ class AliHLTGlobalTriggerComponent : public AliHLTTrigger */ virtual AliHLTComponent* Spawn(); + enum StatusBits { + kForwardInput = BIT(14), // forward input objects instead of adding them to the decision object + kIncludeInput = BIT(15), // include input objects in the decision object + kIncludeShort = BIT(16), // include short description of input objects: name, title, decision + kSkipCTP = BIT(17), // skip CTP data object in the decision object + }; + + void SetBit(AliHLTUInt32_t f, bool set) { + if (set) SetBit(f); + else ResetBit(f); + } + void SetBit(AliHLTUInt32_t f) { fBits |= f; } + void ResetBit(AliHLTUInt32_t f) { fBits &= ~f; } + bool TestBit(AliHLTUInt32_t f) const { return (bool) ((fBits & f) != 0); } + protected: /** @@ -258,7 +282,6 @@ class AliHLTGlobalTriggerComponent : public AliHLTTrigger AliHLTGlobalTrigger* fTrigger; //! Trigger object which implements the global trigger menu. bool fDebugMode; //! Indicates if the generated global trigger class should be in debug mode. bool fRuntimeCompile; //! Indicates if the generated global trigger class should be compiled - bool fSkipCTPCounters; //! Indicates whether to ship CTP info with the trigger decision bool fDeleteCodeFile; //! If true then the code file indicated by fCodeFileName should be deleted during DoDeinit. TString fCodeFileName; //! base file name of the generated code for the global trigger TString fClassName; //! The generated/loaded trigger class name. @@ -268,6 +291,7 @@ class AliHLTGlobalTriggerComponent : public AliHLTTrigger TClonesArray fIncludePaths; //! Paths specified by the -includepath command line option. 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 static const char* fgkTriggerMenuCDBPath; //! The path string to read the trigger menu from the CDB.