ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGMR4::MuonDetectorTool Class Referencefinal

#include <MuonDetectorTool.h>

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

Public Member Functions

virtual ~MuonDetectorTool () override final
virtual StatusCode create () override final
 Create the Detector Node corresponding to this tool.
virtual StatusCode clear () override final
virtual GeoVDetectorManager * manager ()
virtual const GeoVDetectorManager * manager () const
virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override
virtual StatusCode align ATLAS_NOT_THREAD_SAFE (IOVSVC_CALLBACK_ARGS) override

Protected Attributes

GeoVDetectorManager * m_detector {nullptr}

Private Attributes

Gaudi::Property< std::vector< std::string > > m_treeTopNodes
 List of GeoGraphnodes in the tree, that belong to the Muon system.
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
ToolHandleArray< IMuonReadoutGeomToolm_detTechTools
ServiceHandle< IGeoDbTagSvcm_geoDbTagSvc {this, "GeoDbTagSvc", "GeoDbTagSvc"}
Gaudi::Property< bool > m_clearTopsOnly {this, "clearTreeTops", true}
 Flag if set to true, the invoke of clear only removes the tree tops from the detector manager instead of the entire object.
MuonDetectorManagerm_manager {nullptr}

Detailed Description

Constructor & Destructor Documentation

◆ ~MuonDetectorTool()

MuonDetectorTool::~MuonDetectorTool ( )
finaloverridevirtualdefault

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

virtual StatusCode registerCallback GeoModelTool::ATLAS_NOT_THREAD_SAFE ( )
inlineoverridevirtualinherited

Reimplemented in BCMPrimeDetectorTool, HGTD_DetectorTool, HGTD_GMX_DetectorTool, PLRDetectorTool, and TRT_DetectorTool.

Definition at line 26 of file GeoModelTool.h.

26{return StatusCode::FAILURE;}

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

virtual StatusCode align GeoModelTool::ATLAS_NOT_THREAD_SAFE ( IOVSVC_CALLBACK_ARGS )
inlineoverridevirtualinherited

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

Definition at line 27 of file GeoModelTool.h.

27{return StatusCode::SUCCESS;}

◆ clear()

StatusCode MuonDetectorTool::clear ( )
finaloverridevirtual

Reimplemented from GeoModelTool.

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

54 {
55 if (m_clearTopsOnly) {
56 m_manager->clearTreeTops();
57 return StatusCode::SUCCESS;
58 }
59 SG::DataProxy *proxy = detStore()->proxy(
61 if (proxy) {
62 proxy->reset();
63 m_manager = nullptr;
64 }
65 return StatusCode::SUCCESS;
66}
Gaudi::Property< bool > m_clearTopsOnly
Flag if set to true, the invoke of clear only removes the tree tops from the detector manager instead...

◆ create()

StatusCode MuonDetectorTool::create ( )
finaloverridevirtual

Create the Detector Node corresponding to this tool.

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

21 {
22
23 ATH_CHECK(m_idHelperSvc.retrieve());
24 ATH_CHECK(m_detTechTools.retrieve());
25 ATH_CHECK(m_geoDbTagSvc.retrieve());
26
27 m_manager = new MuonDetectorManager();
28
29 GeoModelExperiment *theExpt = nullptr;
30 ATH_CHECK(detStore()->retrieve(theExpt, "ATLAS"));
31 GeoPhysVol *world = theExpt->getPhysVol();
32
33 for (auto &readOutTool : m_detTechTools) {
34 const unsigned memBefore = GeoPerfUtils::getMem();
35 ATH_CHECK(readOutTool->buildReadOutElements(*m_manager));
36 const unsigned memAfter = GeoPerfUtils::getMem();
37 ATH_MSG_INFO("Building of "<<readOutTool->name()<<" consumed "<<(memAfter - memBefore) / 1024<<" MB memory");
38 }
39 GeoVolumeCursor cursor(world);
40 while (!cursor.atEnd()) {
41 std::string volName = cursor.getName();
42 ATH_MSG_VERBOSE("Check whether "<<volName<<" belongs to the muon world. ");
43 if (std::ranges::find(m_treeTopNodes.value(), volName) != m_treeTopNodes.value().end()) {
44 m_manager->addTreeTop(cursor.getVolume());
45 }
46 cursor.next();
47 }
48 ATH_CHECK(detStore()->record(m_manager, m_manager->getName()));
49 theExpt->addManager(m_manager);
50
51 return StatusCode::SUCCESS;
52}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
GeoPhysVol * getPhysVol()
Destructor.
void addManager(const GeoVDetectorManager *)
Gaudi::Property< std::vector< std::string > > m_treeTopNodes
List of GeoGraphnodes in the tree, that belong to the Muon system.
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ manager() [1/2]

virtual GeoVDetectorManager * GeoModelTool::manager ( )
inlinevirtualinherited

Definition at line 22 of file GeoModelTool.h.

22{return m_detector;}
GeoVDetectorManager * m_detector

◆ manager() [2/2]

virtual const GeoVDetectorManager * GeoModelTool::manager ( ) const
inlinevirtualinherited

Definition at line 23 of file GeoModelTool.h.

23{return m_detector;}

Member Data Documentation

◆ m_clearTopsOnly

Gaudi::Property<bool> MuonGMR4::MuonDetectorTool::m_clearTopsOnly {this, "clearTreeTops", true}
private

Flag if set to true, the invoke of clear only removes the tree tops from the detector manager instead of the entire object.

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

45{this, "clearTreeTops", true};

◆ m_detector

GeoVDetectorManager* GeoModelTool::m_detector {nullptr}
protectedinherited

Definition at line 30 of file GeoModelTool.h.

30{nullptr};

◆ m_detTechTools

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

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

39 {this, "ReadoutEleBuilders",
40 {}, "SubTools to build the readoutElements for each technology"};

◆ m_geoDbTagSvc

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

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

42{this, "GeoDbTagSvc", "GeoDbTagSvc"};

◆ m_idHelperSvc

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

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

36 {
37 this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_manager

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

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

46{nullptr};

◆ 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 34 of file MuonPhaseII/MuonDetDescr/MuonGeoModelR4/src/MuonDetectorTool.h.

34 {this, "TreeTopNodes",
35 {"MuonBarrel", "NSW", "MuonEndcap_sideA", "MuonEndcap_sideC", "Muon"}};

The documentation for this class was generated from the following files: