Skip to content

Commit

Permalink
Fix service retrieval after deprecations in Gaudi v39r1 (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Nov 8, 2024
1 parent 20a96ed commit e54b8f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/CLUENtuplizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class CLUENtuplizer : public Gaudi::Algorithm {

bool singleMCParticle = false;

ITHistSvc* m_ths{nullptr}; ///< THistogram service
SmartIF<ITHistSvc> m_ths; ///< THistogram service

mutable TTree* t_hits{nullptr};
mutable std::vector<int> *m_hits_event = nullptr;
Expand Down
3 changes: 2 additions & 1 deletion src/CLUENtuplizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ CLUENtuplizer::CLUENtuplizer(const std::string& name, ISvcLocator* svcLoc) : Gau
StatusCode CLUENtuplizer::initialize() {
if (Gaudi::Algorithm::initialize().isFailure()) return StatusCode::FAILURE;

if (service("THistSvc", m_ths).isFailure()) {
m_ths = service("THistSvc", true);
if (!m_ths) {
error() << "Couldn't get THistSvc" << endmsg;
return StatusCode::FAILURE;
}
Expand Down

0 comments on commit e54b8f1

Please sign in to comment.