Skip to content
Snippets Groups Projects
Commit 8042e642 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'load_bs_streamerinfos' into 'master'

ATR-22167: Load previous TStreamerInfo objects when deserializing new HLT from BS

See merge request atlas/athena!37184
parents 0720d276 f75e49c8
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -13,7 +13,9 @@ atlas_add_library( TrigOutputHandlingLib
src/*.cxx
PUBLIC_HEADERS TrigOutputHandling
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} GaudiKernel AthViews AthenaBaseComps RootUtils TrigSteeringEvent TrigSerializeResultLib TrigConfData xAODTrigCalo xAODTrigRinger xAODTrigEgamma xAODEgamma xAODBTagging xAODTrigger xAODTracking xAODTrigMuon xAODMuon xAODTau xAODTrigBphys xAODTrigMissingET DecisionHandlingLib AthenaMonitoringKernelLib TrigPartialEventBuildingLib TrigSerializeTPLib AthContainersRoot TrigCompositeUtilsLib TrigCostMonitorMTLib )
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} GaudiKernel AthViews AthenaBaseComps RootUtils TrigSteeringEvent TrigSerializeResultLib TrigConfData xAODTrigCalo xAODTrigRinger xAODTrigEgamma xAODEgamma xAODBTagging xAODTrigger xAODTracking xAODTrigMuon xAODMuon xAODTau xAODTrigBphys xAODTrigMissingET DecisionHandlingLib AthenaMonitoringKernelLib TrigPartialEventBuildingLib TrigSerializeTPLib AthContainersRoot TrigCompositeUtilsLib TrigCostMonitorMTLib
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} PathResolver )
atlas_add_component( TrigOutputHandling
src/components/*.cxx
......
......@@ -21,6 +21,11 @@
#include "TriggerEDMDeserialiserAlg.h"
#include "TriggerEDMCLIDs.h"
#include "TFile.h"
#include "TStreamerInfo.h"
#include "PathResolver/PathResolver.h"
class TriggerEDMDeserialiserAlg::WritableAuxStore : public SG::AuxStoreInternal {
public:
WritableAuxStore() {}
......@@ -74,6 +79,7 @@ StatusCode TriggerEDMDeserialiserAlg::initialize() {
ATH_CHECK( m_clidSvc.retrieve() );
ATH_CHECK( m_serializerSvc.retrieve() );
ATH_CHECK( m_tpTool.retrieve() );
add_bs_streamerinfos();
return StatusCode::SUCCESS;
}
......@@ -290,3 +296,25 @@ void TriggerEDMDeserialiserAlg::toBuffer( TriggerEDMDeserialiserAlg::PayloadIter
// we rely on continuous memory layout of std::vector ...
std::memcpy( buffer, &(*dataStart), dataSize( start ) );
}
void TriggerEDMDeserialiserAlg::add_bs_streamerinfos(){
std::string extStreamerInfos = "bs-streamerinfos.root";
std::string extFilePath = PathResolver::find_file(extStreamerInfos, "DATAPATH");
ATH_MSG_DEBUG( "Using " << extFilePath );
TFile extFile(extFilePath.c_str());
m_streamerInfoList = std::unique_ptr<TList>(extFile.GetStreamerInfoList());
for(const auto&& infObj: *m_streamerInfoList) {
TString t_name=infObj->GetName();
if (t_name.BeginsWith("listOfRules")){
ATH_MSG_WARNING( "Could not re-load class " << t_name );
continue;
}
TStreamerInfo* inf = dynamic_cast<TStreamerInfo*>(infObj);
inf->BuildCheck();
TClass *cl = inf->GetClass();
if (cl)
ATH_MSG_DEBUG( "external TStreamerInfo for " << cl->GetName()
<< " checksum: " << std::hex << inf->GetCheckSum() );
}
}
......@@ -12,6 +12,7 @@
#include "AthenaKernel/IAthenaSerializeSvc.h"
#include "TrigSerializeTP/TrigSerTPTool.h"
#include "TList.h"
/**
......@@ -46,6 +47,8 @@ public:
private:
friend StatusCode tester( TriggerEDMDeserialiserAlg* );
void add_bs_streamerinfos();
SG::ReadHandleKey<HLT::HLTResultMT> m_resultKey { this, "ResultKey", "HLTResultMT", "Key of the HLT result object" };
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." };
......@@ -57,6 +60,8 @@ private:
ToolHandle<TrigSerTPTool> m_tpTool{ this, "TPTool", "TrigSerTPTool/TrigSerTPTool", "Tool to do Transient/Persistent conversion (Old EDM)"};
std::unique_ptr<TList> m_streamerInfoList;
typedef std::vector<uint32_t> Payload;
typedef std::vector<uint32_t>::const_iterator PayloadIterator;
......
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