Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix service retrieval after deprecations in Gaudi v39r1 #42

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion k4Gen/src/components/ConstPtParticleGun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ StatusCode ConstPtParticleGun::initialize() {
StatusCode sc = AlgTool::initialize();
if (!sc.isSuccess()) return sc;
// initialize random number generator
IRndmGenSvc* randSvc = service<IRndmGenSvc>("RndmGenSvc", true);
auto randSvc = service<IRndmGenSvc>("RndmGenSvc", true);
sc = m_flatGenerator.initialize(randSvc, Rndm::Flat(0., 1.));
if (!sc.isSuccess()) {
error() << "Cannot initialize flat generator";
Expand Down
2 changes: 1 addition & 1 deletion k4Gen/src/components/FlatSmearVertex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ StatusCode FlatSmearVertex::initialize() {
StatusCode sc = AlgTool::initialize();
if (sc.isFailure()) return sc;

IRndmGenSvc* randSvc = service<IRndmGenSvc>("RndmGenSvc", true);
auto randSvc = service<IRndmGenSvc>("RndmGenSvc", true);
if (m_xmin > m_xmax) {
error() << "xMin > xMax !";
return StatusCode::FAILURE;
Expand Down
4 changes: 1 addition & 3 deletions k4Gen/src/components/GaussSmearVertex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ StatusCode GaussSmearVertex::initialize() {
StatusCode sc = AlgTool::initialize();
if (sc.isFailure()) return sc;

IRndmGenSvc* randSvc = service<IRndmGenSvc>("RndmGenSvc", true);


auto randSvc = service<IRndmGenSvc>("RndmGenSvc", true);

sc = m_gaussDist.initialize(randSvc, Rndm::Gauss(0., 1));
if (sc.isFailure()) return sc;
Expand Down
2 changes: 1 addition & 1 deletion k4Gen/src/components/MomentumRangeParticleGun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ StatusCode MomentumRangeParticleGun::initialize() {
StatusCode sc = AlgTool::initialize();
if (!sc.isSuccess()) return sc;

IRndmGenSvc* randSvc = service<IRndmGenSvc>("RndmGenSvc", true);
auto randSvc = service<IRndmGenSvc>("RndmGenSvc", true);
sc = m_flatGenerator.initialize(randSvc, Rndm::Flat(0., 1.));
if (!sc.isSuccess()) {
error() << "Cannot initialize flat generator";
Expand Down
2 changes: 1 addition & 1 deletion k4Gen/src/components/PoissonPileUp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PoissonPileUp::~PoissonPileUp() { ; }
StatusCode PoissonPileUp::initialize() {
StatusCode sc = AlgTool::initialize();
if (sc.isFailure()) return sc;
IRndmGenSvc* randSvc = service<IRndmGenSvc>("RndmGenSvc", true);
auto randSvc = service<IRndmGenSvc>("RndmGenSvc", true);
if (m_meanPileUpEvents < 0) {
error() << "Number of Pileup events cannot be negative!";
return StatusCode::FAILURE;
Expand Down