ATLAS Offline Software
Loading...
Searching...
No Matches
PrdTesterModule.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7namespace MuonPRDTest {
9 const std::string& grp_name,
10 MSG::Level msglvl) :
11 MuonTesterBranch(tree, " prd module " + grp_name) {
12 setLevel(msglvl);
13 m_idHelperSvc.retrieve().ignore();
14 }
16 const MuonGM::MuonDetectorManager* PrdTesterModule::getDetMgr(const EventContext& ctx) const {
18 if (!handle.isValid()) {
19 ATH_MSG_ERROR("Failed to retrieve MuonDetectorManager " << m_detMgrKey.fullKey());
20 return nullptr;
21 }
22 return handle.cptr();
23 }
26 m_idHelperSvc.retrieve().isSuccess() && declare_keys();
27 }
28 bool PrdTesterModule::declare_keys() { return true; }
29} // namespace MuonPRDTest
#define ATH_MSG_ERROR(x)
void setLevel(MSG::Level lvl)
Change the current logging level.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const MuonGM::MuonDetectorManager * getDetMgr(const EventContext &ctx) const
const Muon::IMuonIdHelperSvc * idHelperSvc() const
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl)
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detMgrKey
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
TTree * tree() override final
Returns the underlying TTree object.
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
const_pointer_type cptr()