Skip to content

Commit

Permalink
LCIOReader: protect against missing Gean4InputAction, like in test_ev…
Browse files Browse the repository at this point in the history
…entreader
  • Loading branch information
andresailer committed Dec 17, 2024
1 parent 188c272 commit eb947b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DDG4/lcio/LCIOEventReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ LCIOEventReader::readParticles(int event_number,
int genStatus = mcp->getGeneratorStatus();
// Copy raw generator status
p->genStatus = genStatus&G4PARTICLE_GEN_STATUS_MASK;
m_inputAction->setGeneratorStatus(genStatus, status);
if(m_inputAction) {
// in some events we do not set up the inputAction
m_inputAction->setGeneratorStatus(genStatus, status);
}

//fg: we simply add all particles without parents as with their own vertex.
// This might include the incoming beam particles, e.g. in
Expand Down

0 comments on commit eb947b5

Please sign in to comment.