diff --git a/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt b/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt index 2791775faf2cd1ec75521d844e511cf8bdd247cb..add2343bdbbdfb84c93facab918473a2efb8c673 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt +++ b/Trigger/TrigSteer/TrigOutputHandling/CMakeLists.txt @@ -28,12 +28,8 @@ atlas_depends_on_subdirs( PUBLIC atlas_add_library( TrigOutputHandlingLib src/*.cxx PUBLIC_HEADERS TrigOutputHandling - LINK_LIBRARIES GaudiKernel AthViews AthenaBaseComps TrigSteeringEvent -<<<<<<< HEAD - xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking TrigSerializeResult ) -======= - xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking xAODTrigMuon xAODMuon ) ->>>>>>> upstream/master + LINK_LIBRARIES GaudiKernel AthViews AthenaBaseComps TrigSteeringEvent TrigSerializeResult + xAODTrigCalo xAODTrigEgamma xAODTrigger xAODTracking xAODTrigMuon xAODMuon ) atlas_add_component( TrigOutputHandling src/components/*.cxx diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.cxx index 1fcfea11a5e10bc412426543db02496d5732c95d..2cf88f28e6a854a9e9d99fb98b78ed8fc75bbafe 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.cxx @@ -27,15 +27,6 @@ StatusCode HLTResultCreatorByteStream::initialize() { ATH_CHECK( m_hltResultKey.initialize() ); ATH_CHECK( m_serializerSvc.retrieve() ); - ATH_CHECK( m_dictLoaderSvc.retrieve() ); - - // System::ImageHandle handle = 0; - // if ( System::loadDynamicLib( "xAODTrigger", &handle) != 1 ) { - // ATH_MSG_WARNING("Can not load the lib"); - // } else { - // ATH_MSG_DEBUG("Could load the lib"); - // } - for ( std::string typeAndKey: m_collectionsToSerialize ) { @@ -62,7 +53,6 @@ StatusCode HLTResultCreatorByteStream::initialize() { ATH_MSG_DEBUG( "Type " << type << " key " << key << " serializable" ); m_toSerialize.push_back( Address{ type, clid, classDesc, key } ); } - return StatusCode::SUCCESS; } @@ -78,8 +68,6 @@ void HLTResultCreatorByteStream::makeHeader(const Address& address, std::vector< buffer.insert( buffer.end(), serializedLabel.begin(), serializedLabel.end() ); // plain SG key } - - void HLTResultCreatorByteStream::fillPayload( void* data, size_t sz, std::vector<uint32_t>& buffer ) const { buffer.push_back( sz ); // size in bytes const size_t neededSize = sz/sizeof(uint32_t) + (sz%sizeof(uint32_t) ? 1 : 0); @@ -117,15 +105,15 @@ StatusCode HLTResultCreatorByteStream::createOutput(const EventContext& context } ATH_MSG_DEBUG("Obtained raw pointer " << rawptr ); - // const RootType rt = m_dictLoaderSvc->load_type(address.type); + RootType classDesc = RootType::ByName( address.type ); size_t sz=0; void* mem = m_serializerSvc->serialize( rawptr, classDesc, sz ); ATH_MSG_DEBUG( "Streamed to buffer at address " << mem << " of " << sz << " bytes" ); - if ( mem == nullptr and sz == 0 ) { - ATH_MSG_WARNING( "Serialisation of " << address.type <<"#" << address.key << " unsuccessful" ); - continue; + if ( mem == nullptr or sz == 0 ) { + ATH_MSG_ERROR( "Serialisation of " << address.type <<"#" << address.key << " unsuccessful" ); + return StatusCode::FAILURE; } // prepare fragment @@ -140,9 +128,9 @@ StatusCode HLTResultCreatorByteStream::createOutput(const EventContext& context if ( mem ) delete [] static_cast<const char*>( mem ); ATH_MSG_DEBUG( "Navigation size after inserting " << address.type << "#" << address.key << " " << place.size()*sizeof(uint32_t) << " bytes" ); } - + auto resultHandle = SG::makeHandle( m_hltResultKey, context ); - ATH_CHECK( resultHandle.record( std::move(result) ) ); + ATH_CHECK( resultHandle.record( std::move( result ) ) ); return StatusCode::SUCCESS; } diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.h b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.h index 0cf201b6f7f88a5529a6fb27a8fded6cc712489b..088466183e7d147a3ebcce8db2f8c35be0e9c8bf 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.h +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultCreatorByteStream.h @@ -57,7 +57,7 @@ class HLTResultCreatorByteStream: public extends<AthAlgTool, IHLTOutputTool> ServiceHandle<IClassIDSvc> m_clidSvc{ this, "ClassIDSvc", "ClassIDSvc", "Service to translate class name to CLID" }; ServiceHandle<IAthenaSerializeSvc> m_serializerSvc{ this, "Serializer", "AthenaRootSerializeSvc", "Service that translates transient to persistent respresenation" }; - ServiceHandle<IDictLoaderSvc> m_dictLoaderSvc{ this, "DictLoaderSvc", "AthDictLoaderSvc", "Service managing ROOT dictionaries for EDM classes" }; + /** * Given the ID if the collection (in address arg) insert basic streaming info into the buffer. diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index b616d45773f26490920a876cd56830cef6643398..1807e9272a2057a04aa523a6f0e42d134e5f7b0a 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -230,12 +230,16 @@ egammaViewsMerger.OutputLevel = VERBOSE svcMgr.StoreGateSvc.OutputLevel = INFO -streamnigTool = HLTResultCreatorByteStream(OutputLevel=VERBOSE) +streamingTool = HLTResultCreatorByteStream(OutputLevel=VERBOSE) -streamnigTool.CollectionsToSerialize = [ "xAOD::TrigCompositeContainer_v1#EgammaCaloDecisions" ] #, "xAOD::TrigElectronContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFex", "xAOD::TrigElectronAuxContainer#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux." ] -summary.OutputTools = [ egammaViewsMerger, streamnigTool ] +streamingTool.CollectionsToSerialize = [ "xAOD::TrigCompositeContainer_v1#EgammaCaloDecisions", + "xAOD::TrigCompositeAuxContainer_v1#EgammaCaloDecisionsAux.", + "xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex", + "xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux." ] + +summary.OutputTools = [ egammaViewsMerger, streamingTool ] summary.OutputLevel = DEBUG