diff --git a/include/CLUENtuplizer.h b/include/CLUENtuplizer.h index 1cd7aaa..a3dbcda 100644 --- a/include/CLUENtuplizer.h +++ b/include/CLUENtuplizer.h @@ -101,7 +101,7 @@ class CLUENtuplizer : public Gaudi::Algorithm { bool singleMCParticle = false; - ITHistSvc* m_ths{nullptr}; ///< THistogram service + SmartIF m_ths; ///< THistogram service mutable TTree* t_hits{nullptr}; mutable std::vector *m_hits_event = nullptr; diff --git a/src/CLUENtuplizer.cpp b/src/CLUENtuplizer.cpp index 63f41dd..4174c2c 100644 --- a/src/CLUENtuplizer.cpp +++ b/src/CLUENtuplizer.cpp @@ -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", false); + if (!m_ths) { error() << "Couldn't get THistSvc" << endmsg; return StatusCode::FAILURE; }