ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | List of all members
MuonGMR4::MuonDetectorTool Class Referencefinal

#include <MuonDetectorTool.h>

Inheritance diagram for MuonGMR4::MuonDetectorTool:
Collaboration diagram for MuonGMR4::MuonDetectorTool:

Public Member Functions

 MuonDetectorTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~MuonDetectorTool () override final
 
virtual StatusCode create () override final
 Create the Detector Node corresponding to this tool. More...
 
virtual StatusCode clear () override final
 
virtual GeoVDetectorManager * manager ()
 The Detector Node corresponding to this tool. More...
 
virtual const GeoVDetectorManager * manager () const
 
virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override
 
virtual StatusCode align (IOVSVC_CALLBACK_ARGS) override
 

Protected Attributes

GeoVDetectorManager * m_detector
 

Private Attributes

Gaudi::Property< std::vector< std::string > > m_treeTopNodes
 List of GeoGraphnodes in the tree, that belong to the Muon system. More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
ToolHandleArray< IMuonReadoutGeomToolm_detTechTools
 
ServiceHandle< IGeoDbTagSvcm_geoDbTagSvc
 
MuonDetectorManagerm_manager {nullptr}
 

Detailed Description

Definition at line 18 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h.

Constructor & Destructor Documentation

◆ MuonDetectorTool()

MuonDetectorTool::MuonDetectorTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 16 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.cxx.

20  declareInterface<IGeoModelTool>(this);
21 }

◆ ~MuonDetectorTool()

MuonDetectorTool::~MuonDetectorTool ( )
finaloverridevirtualdefault

Member Function Documentation

◆ align()

StatusCode GeoModelTool::align ( IOVSVC_CALLBACK_ARGS  )
overridevirtualinherited

Reimplemented in ALFA_DetectorTool, HGTD_DetectorTool, TRT_DetectorTool, LArDetectorToolNV, PixelDetectorTool, and SCT_DetectorTool.

Definition at line 33 of file GeoModelTool.cxx.

34 {
35  return StatusCode::SUCCESS;
36 }

◆ ATLAS_NOT_THREAD_SAFE()

virtual StatusCode registerCallback GeoModelTool::ATLAS_NOT_THREAD_SAFE ( )
overridevirtualinherited

◆ clear()

StatusCode MuonDetectorTool::clear ( )
finaloverridevirtual

Reimplemented from GeoModelTool.

Definition at line 62 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.cxx.

62  {
63  SG::DataProxy *proxy = detStore()->proxy(
65  if (proxy) {
66  proxy->reset();
67  m_manager = nullptr;
68  }
69  return StatusCode::SUCCESS;
70 }

◆ create()

StatusCode MuonDetectorTool::create ( )
finaloverridevirtual

Create the Detector Node corresponding to this tool.

Definition at line 27 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.cxx.

27  {
28 
29  ATH_CHECK(m_idHelperSvc.retrieve());
30  ATH_CHECK(m_detTechTools.retrieve());
31  ATH_CHECK(m_geoDbTagSvc.retrieve());
32 
33  m_manager = new MuonDetectorManager();
34 
35  GeoModelExperiment *theExpt = nullptr;
36  ATH_CHECK(detStore()->retrieve(theExpt, "ATLAS"));
37  GeoPhysVol *world = theExpt->getPhysVol();
38 
39  for (auto &readOutTool : m_detTechTools) {
40  const unsigned memBefore = GeoPerfUtils::getMem();
41  ATH_CHECK(readOutTool->buildReadOutElements(*m_manager));
42  const unsigned memAfter = GeoPerfUtils::getMem();
43  ATH_MSG_INFO("Building of "<<readOutTool->name()<<" consumed "<<(memAfter - memBefore) / 1024<<" MB memory");
44  }
45  GeoVolumeCursor cursor(world);
46  while (!cursor.atEnd()) {
47  std::string volName = cursor.getName();
48  ATH_MSG_VERBOSE("Check whether "<<volName<<" belongs to the muon world. ");
49  if (std::find(m_treeTopNodes.value().begin(),
50  m_treeTopNodes.value().end(),volName) != m_treeTopNodes.value().end()) {
51  m_manager->addTreeTop(cursor.getVolume());
52  }
53  cursor.next();
54  }
55  ATH_CHECK(detStore()->record(m_manager, m_manager->getName()));
56  ATH_CHECK(detStore()->retrieve(theExpt, "ATLAS"));
57  theExpt->addManager(m_manager);
58 
59  return StatusCode::SUCCESS;
60 }

◆ manager() [1/2]

GeoVDetectorManager * GeoModelTool::manager ( )
virtualinherited

The Detector Node corresponding to this tool.

Definition at line 21 of file GeoModelTool.cxx.

21  {
22  return m_detector;
23 }

◆ manager() [2/2]

const GeoVDetectorManager * GeoModelTool::manager ( ) const
virtualinherited

Definition at line 24 of file GeoModelTool.cxx.

24  {
25  return m_detector;
26 }

Member Data Documentation

◆ m_detector

GeoVDetectorManager* GeoModelTool::m_detector
protectedinherited

Definition at line 36 of file GeoModelTool.h.

◆ m_detTechTools

ToolHandleArray<IMuonReadoutGeomTool> MuonGMR4::MuonDetectorTool::m_detTechTools
private
Initial value:
{
this,
"ReadoutEleBuilders",
{},
"SubTools to build the readoutElements for each technology"}

Definition at line 41 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h.

◆ m_geoDbTagSvc

ServiceHandle<IGeoDbTagSvc> MuonGMR4::MuonDetectorTool::m_geoDbTagSvc
private
Initial value:
{this, "GeoDbTagSvc",
"GeoDbTagSvc"}

Definition at line 47 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonGMR4::MuonDetectorTool::m_idHelperSvc
private
Initial value:
{
this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}

Definition at line 38 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h.

◆ m_manager

MuonDetectorManager* MuonGMR4::MuonDetectorTool::m_manager {nullptr}
private

◆ m_treeTopNodes

Gaudi::Property<std::vector<std::string> > MuonGMR4::MuonDetectorTool::m_treeTopNodes
private
Initial value:
{this, "TreeTopNodes",
{"MuonBarrel", "NSW", "MuonEndcap_sideA", "MuonEndcap_sideC", "Muon"}}

List of GeoGraphnodes in the tree, that belong to the Muon system.

Definition at line 36 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
GeoModelExperiment::getPhysVol
GeoPhysVol * getPhysVol()
Destructor.
Definition: GeoModelExperiment.cxx:21
MuonGMR4::MuonDetectorTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h:38
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
MuonGMR4::MuonDetectorTool::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h:47
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
MuonGMR4::MuonDetectorTool::m_manager
MuonDetectorManager * m_manager
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h:49
MuonGMR4::MuonDetectorTool::m_detTechTools
ToolHandleArray< IMuonReadoutGeomTool > m_detTechTools
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h:41
GeoModelExperiment
Definition: GeoModelExperiment.h:32
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
GeoModelTool::GeoModelTool
GeoModelTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor(s)
Definition: GeoModelTool.cxx:12
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
GeoModelTool::m_detector
GeoVDetectorManager * m_detector
Definition: GeoModelTool.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonGMR4::MuonDetectorManager::addTreeTop
void addTreeTop(PVConstLink pv)
Adds a new GeoModelTree node indicating the entrance to a muon system description.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx:137
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
query_example.cursor
cursor
Definition: query_example.py:21
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonGMR4::MuonDetectorTool::m_treeTopNodes
Gaudi::Property< std::vector< std::string > > m_treeTopNodes
List of GeoGraphnodes in the tree, that belong to the Muon system.
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h:36
SG::DataProxy
Definition: DataProxy.h:45