diff --git a/DDG4/edm4hep/Geant4Output2EDM4hep.cpp b/DDG4/edm4hep/Geant4Output2EDM4hep.cpp index ef0235b86..450550546 100644 --- a/DDG4/edm4hep/Geant4Output2EDM4hep.cpp +++ b/DDG4/edm4hep/Geant4Output2EDM4hep.cpp @@ -444,7 +444,11 @@ void Geant4Output2EDM4hep::saveEvent(OutputContext& ctxt) { parameters->extractParameters(m_frame); #if PODIO_BUILD_VERSION > PODIO_VERSION(0, 16, 2) // This functionality is only present in podio > 0.16.2 +#if PODIO_BUILD_VERSION > PODIO_VERSION(0, 99, 0) + eventWeight = m_frame.getParameter("EventWeights").value_or(0.0); +#else eventWeight = m_frame.getParameter("EventWeights"); +#endif #endif } else { // ... or from DD4hep framework runNumber = m_runNo + runNumberOffset;