diff --git a/HLT/Event/TrigByteStreamCnvSvc/src/TrigByteStreamCnvSvc.cxx b/HLT/Event/TrigByteStreamCnvSvc/src/TrigByteStreamCnvSvc.cxx index f400a2ba6f252fd78ccb2c79c82475e987fb1672..cc847ae24ba86fd734b2318f125e06bb1151c0df 100644 --- a/HLT/Event/TrigByteStreamCnvSvc/src/TrigByteStreamCnvSvc.cxx +++ b/HLT/Event/TrigByteStreamCnvSvc/src/TrigByteStreamCnvSvc.cxx @@ -53,7 +53,7 @@ namespace { // Standard constructor // ============================================================================= TrigByteStreamCnvSvc::TrigByteStreamCnvSvc(const std::string& name, ISvcLocator* svcLoc) -: ByteStreamCnvSvcBase(name, svcLoc), +: ByteStreamCnvSvc(name, svcLoc), m_evtStore("StoreGateSvc", name), m_robDataProviderSvc("ROBDataProviderSvc", name) {} @@ -67,6 +67,7 @@ TrigByteStreamCnvSvc::~TrigByteStreamCnvSvc() {} // ============================================================================= StatusCode TrigByteStreamCnvSvc::initialize() { ATH_MSG_VERBOSE("start of " << __FUNCTION__); + ATH_CHECK(ByteStreamCnvSvc::initialize()); ATH_CHECK(m_evtStore.retrieve()); ATH_CHECK(m_robDataProviderSvc.retrieve()); ATH_MSG_VERBOSE("end of " << __FUNCTION__); @@ -83,6 +84,7 @@ StatusCode TrigByteStreamCnvSvc::finalize() { if (m_evtStore.release().isFailure()) ATH_MSG_WARNING("Failed to release service " << m_evtStore.typeAndName()); ATH_MSG_VERBOSE("end of " << __FUNCTION__); + ATH_CHECK(ByteStreamCnvSvc::finalize()); return StatusCode::SUCCESS; } @@ -134,7 +136,7 @@ StatusCode TrigByteStreamCnvSvc::connectOutput(const std::string& outputFile, co StatusCode TrigByteStreamCnvSvc::commitOutput(const std::string& /*outputFile*/, bool /*do_commit*/) { ATH_MSG_VERBOSE("start of " << __FUNCTION__); - printRawEvent(); + if (msgLvl(MSG::DEBUG)) printRawEvent(); // Serialise the output FullEventFragment std::unique_ptr<uint32_t[]> rawEventPtr; diff --git a/HLT/Event/TrigByteStreamCnvSvc/src/TrigByteStreamCnvSvc.h b/HLT/Event/TrigByteStreamCnvSvc/src/TrigByteStreamCnvSvc.h index 4190112031485c5b66b59e4859e02c8069e137d2..9ad63b849a947cb9cad4ae620f3e95ea4a6c9011 100644 --- a/HLT/Event/TrigByteStreamCnvSvc/src/TrigByteStreamCnvSvc.h +++ b/HLT/Event/TrigByteStreamCnvSvc/src/TrigByteStreamCnvSvc.h @@ -5,7 +5,7 @@ #ifndef TRIGBYTESTREAMCNVSVC_H #define TRIGBYTESTREAMCNVSVC_H -#include "ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h" +#include "ByteStreamCnvSvc/ByteStreamCnvSvc.h" // Forward declarations class StoreGateSvc; @@ -13,8 +13,14 @@ class IROBDataProviderSvc; /** @class TrigByteStreamCnvSvc * @brief A ByteStreamCnvSvc implementation for online use + * + * It overrides the connectOutput and commitOutput methods of the base class. In this implementation, they create + * the specific online HLT output and send it out directly to the TDAQ infrastructure without using an output service. + * + * It needs to inherit from ByteStreamCnvSvc rather than ByteStreamCnvSvcBase, because some elements of the athena + * framework (particularly converters) rely on the properties or functionality of the offline ByteStreamCnvSvc. **/ -class TrigByteStreamCnvSvc : public ByteStreamCnvSvcBase { +class TrigByteStreamCnvSvc : public ByteStreamCnvSvc { public: /// Standard constructor TrigByteStreamCnvSvc(const std::string& name, ISvcLocator* svcLoc); diff --git a/HLT/Trigger/TrigControl/TrigServices/python/TriggerUnixStandardSetup.py b/HLT/Trigger/TrigControl/TrigServices/python/TriggerUnixStandardSetup.py index 1fa2dd419a77b2cc5ae3a616d7ec0a06d2fb0027..6b48f061cccec9f6f283ce12dee5049306be2e6b 100644 --- a/HLT/Trigger/TrigControl/TrigServices/python/TriggerUnixStandardSetup.py +++ b/HLT/Trigger/TrigControl/TrigServices/python/TriggerUnixStandardSetup.py @@ -84,28 +84,20 @@ def setupCommonServices(): theApp.CreateSvc += [ svcMgr.DetDescrCnvSvc.getFullName() ] svcMgr.EventPersistencySvc.CnvServices += [ "DetDescrCnvSvc" ] - # ByteStreamCnvSvc configuration - from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamCnvSvc - svcMgr += ByteStreamCnvSvc("ByteStreamCnvSvc") + # Online services for ByteStream input/output + from TrigByteStreamCnvSvc.TrigByteStreamCnvSvcConf import TrigByteStreamCnvSvc, TrigByteStreamInputSvc, TrigEventSelectorByteStream + svcMgr += TrigByteStreamCnvSvc("ByteStreamCnvSvc") # this name is hard-coded in some converters svcMgr.EventPersistencySvc.CnvServices += [ "ByteStreamCnvSvc" ] - - from TrigByteStreamCnvSvc.TrigByteStreamCnvSvcConf import TrigByteStreamInputSvc svcMgr += TrigByteStreamInputSvc("ByteStreamInputSvc") - - from TrigByteStreamCnvSvc.TrigByteStreamCnvSvcConf import TrigEventSelectorByteStream - svcMgr += TrigEventSelectorByteStream("EventSelector", - ByteStreamInputSvc = svcMgr.ByteStreamInputSvc) + svcMgr += TrigEventSelectorByteStream("EventSelector", ByteStreamInputSvc = svcMgr.ByteStreamInputSvc) theApp.EvtSel = "EventSelector" - from TrigByteStreamCnvSvc.TrigByteStreamCnvSvcConf import TrigByteStreamCnvSvc - svcMgr += TrigByteStreamCnvSvc("ByteStreamCnvSvc") - # make the HltEventLoopMgr service available svcMgr.HltEventLoopMgr = theApp.service( "HltEventLoopMgr" ) # already instantiated svcMgr.HltEventLoopMgr.WhiteboardSvc = "EventDataSvc" svcMgr.HltEventLoopMgr.SchedulerSvc = AlgScheduler.getScheduler().getName() svcMgr.HltEventLoopMgr.EvtSel = svcMgr.EventSelector - svcMgr.HltEventLoopMgr.OutputCnvSvc = svcMgr.TrigByteStreamCnvSvc + svcMgr.HltEventLoopMgr.OutputCnvSvc = svcMgr.ByteStreamCnvSvc from TrigOutputHandling.TrigOutputHandlingConfig import HLTResultMTMakerCfg svcMgr.HltEventLoopMgr.ResultMaker = HLTResultMTMakerCfg()