Skip to content

Commit

Permalink
PodioInput: always read EventHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel committed Nov 15, 2023
1 parent 41284dc commit 5c52f66
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions k4FWCore/components/PodioInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "edm4hep/CaloHitContributionCollection.h"
#include "edm4hep/CalorimeterHitCollection.h"
#include "edm4hep/ClusterCollection.h"
#include "edm4hep/Constants.h"
#include "edm4hep/EventHeaderCollection.h"
#include "edm4hep/MCParticleCollection.h"
#include "edm4hep/MCRecoCaloAssociationCollection.h"
Expand Down Expand Up @@ -183,6 +184,11 @@ PodioInput::PodioInput(const std::string& name, ISvcLocator* svcLoc) : Consumer(
error() << "Could not get PodioDataSvc" << endmsg;
}
fillReaders();

auto key = edm4hep::EventHeaderName;
if (std::find(m_collectionNames.begin(), m_collectionNames.end(), key) == m_collectionNames.end()) {
m_collectionNames.value().push_back(key);
}
}

void PodioInput::operator()() const {
Expand Down

0 comments on commit 5c52f66

Please sign in to comment.