Skip to content

Commit

Permalink
Make sure the service is retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Nov 1, 2024
1 parent 00a4974 commit c336d02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SimG4Fast/src/components/SimG4ParticleSmearSimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ SimG4ParticleSmearSimple::SimG4ParticleSmearSimple(const std::string& type, cons
SimG4ParticleSmearSimple::~SimG4ParticleSmearSimple() {}

StatusCode SimG4ParticleSmearSimple::initialize() {

m_randSvc = service("RndmGenSvc", false);
if (!m_randSvc) {
error() << "Couldn't get RndmGenSvc" << endmsg;
return StatusCode::FAILURE;
}

if (AlgTool::initialize().isFailure()) {
return StatusCode::FAILURE;
}
Expand Down

0 comments on commit c336d02

Please sign in to comment.