Skip to content
Snippets Groups Projects
Commit 99b1828d authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'record-deserialised-EDM' into 'master'

Record deserialised edm in SG

See merge request atlas/athena!15831
parents a20f9bbe daa69974
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
#include "SGTools/DataProxy.h"
#include "TrigSerializeResult/StringSerializer.h"
#include "TriggerEDMDeserialiserAlg.h"
#include "BareDataBucket.h"
......@@ -75,11 +76,14 @@ StatusCode TriggerEDMDeserialiserAlg::execute_r(const EventContext& context) con
// for the moment I do not know what do with the raw prt
if ( obj ) {
// TODO, here will be recording of that object, for now just destroy it
classDesc.Destruct( obj );
BareDataBucket* dataBucket = new BareDataBucket( obj, usedBytes, clid, classDesc);
const std::string outputName = m_prefix + name;
auto proxyPtr = evtStore()->recordObject( SG::DataObjectSharedPtr<BareDataBucket>( dataBucket ), outputName, false, false );
if ( proxyPtr == nullptr ) {
ATH_MSG_WARNING( "Recording of object of CLID " << clid << " and name " << name << " failed" );
}
} else {
ATH_MSG_WARNING( "Deserialisation of obejcts of CLID " << clid << " and name " << name << " failed" );
ATH_MSG_WARNING( "Deserialisation of object of CLID " << clid << " and name " << name << " failed" );
}
start = toNextFragment( start );
......
......@@ -41,7 +41,7 @@ private:
SG::ReadHandleKey<HLT::HLTResultMT> m_resultKey { this, "ResultKey", "HLTResultMT", "Key of object that is read" };
Gaudi::Property<std::string > m_prefix{ this, "Prefix", "", "Set for testing to avoid clash with the input collections" };
Gaudi::Property<int > m_moduleID{ this, "ModuleID", 0, "Module ID of HLT result ROB, default 0 is the main HLT result, others are for TLA, calibration etc." };
Gaudi::Property<int> m_initialSerialisationBufferSize{ this, "InitialSerialisationBufferSize", 1024*1024, "Initial serialisation buffer size (1MB), can be set large to avoid reallocations" };
Gaudi::Property<int> m_initialSerialisationBufferSize{ this, "InitialSerialisationBufferSize", 1024*1024, "Initial serialisation buffer size in bytes, can be set large to avoid reallocations in every event" };
ServiceHandle<IClassIDSvc> m_clidSvc{ this, "ClassIDSvc", "ClassIDSvc", "Service to translate CLID to class namex" };
......
#
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
#
......@@ -347,9 +348,9 @@ print summMaker
serialiser = TriggerEDMSerialiserTool(OutputLevel=VERBOSE)
serialiser.CollectionsToSerialize = [ "xAOD::TrigCompositeContainer_v1#EgammaCaloDecisions",
serialiser.CollectionsToSerialize = [ "xAOD::TrigCompositeContainer_v1#EgammaCaloDecisions_remap",
"xAOD::TrigCompositeAuxContainer_v1#EgammaCaloDecisionsAux.",
"xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex",
"xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex_remap",
"xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux." ]
stmaker = StreamTagMakerTool()
......@@ -388,6 +389,10 @@ deserialiser = TriggerEDMDeserialiserAlg()
deserialiser.Prefix="SERIALISED_"
deserialiser.OutputLevel=DEBUG
# add prefix + remove version to class name
l = [ c.split("#")[0].split("_")[0] + "#" + deserialiser.Prefix + c.split("#")[1] for c in serialiser.CollectionsToSerialize ]
#StreamESD.ItemList += l
################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment