Skip to content

Commit

Permalink
WriteEDM4hep: version guards around getWeights
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed Jan 17, 2025
1 parent d12873a commit 315c214
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DDG4/edm4hep/Geant4Output2EDM4hep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,11 @@ void Geant4Output2EDM4hep::saveEvent(OutputContext<G4Event>& ctxt) {
auto* meh = context()->event().extension<edm4hep::MutableEventHeader>(false);
if(meh) {
header.setTimeStamp(meh->getTimeStamp());
#if EDM4HEP_BUILD_VERSION >= EDM4HEP_VERSION(0, 99, 0)
for (auto const& weight: meh->getWeights()) {
header.addToWeights(weight);
}
#endif
}

m_frame.put(std::move(header_collection), "EventHeader");
Expand Down

0 comments on commit 315c214

Please sign in to comment.