ATLAS Offline Software
Loading...
Searching...
No Matches
CavernInfraDetectorTool Class Referencefinal

#include <CavernInfraDetectorTool.h>

Inheritance diagram for CavernInfraDetectorTool:
Collaboration diagram for CavernInfraDetectorTool:

Public Member Functions

 CavernInfraDetectorTool (const std::string &type, const std::string &name, const IInterface *parent)
 ~CavernInfraDetectorTool ()=default
virtual StatusCode create () override
virtual StatusCode clear () override
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

const CavernInfraDetectorManagerm_manager {nullptr}

Detailed Description

Definition at line 11 of file CavernInfraDetectorTool.h.

Constructor & Destructor Documentation

◆ CavernInfraDetectorTool()

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

Definition at line 14 of file CavernInfraDetectorTool.cxx.

17 : GeoModelTool( type, name, parent )
18{
19}

◆ ~CavernInfraDetectorTool()

CavernInfraDetectorTool::~CavernInfraDetectorTool ( )
default

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 CavernInfraDetectorTool::clear ( )
overridevirtual

Reimplemented from GeoModelTool.

Definition at line 63 of file CavernInfraDetectorTool.cxx.

64{
65 SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<CavernInfraDetectorManager>::ID(),m_manager->getName());
66 if(proxy) {
67 proxy->reset();
68 m_manager = nullptr;
69 }
70 return StatusCode::SUCCESS;
71}
const CavernInfraDetectorManager * m_manager

◆ create()

StatusCode CavernInfraDetectorTool::create ( )
overridevirtual

Definition at line 21 of file CavernInfraDetectorTool.cxx.

22{
23 ServiceHandle<IGeoDbTagSvc> geoDbTag("GeoDbTagSvc", name());
24 ATH_CHECK(geoDbTag.retrieve());
25
26 std::string cavernInfraVersion = geoDbTag->cavernInfraVersion();
27 if(cavernInfraVersion.empty()) {
28 ATH_MSG_INFO("No Cavern Infra version for the given configuration. Skip building CavernInfraGeoModel");
29 return StatusCode::SUCCESS;
30 }
31 else {
32 ATH_MSG_INFO("Building Cavern geometry version " << cavernInfraVersion);
33 }
34
35 std::string versionNode = "CavernInfra";
36
37 GeoModelExperiment* theExpt = nullptr;
38 ATH_CHECK(detStore()->retrieve(theExpt,"ATLAS"));
39
40 GeoPhysVol *world=theExpt->getPhysVol();
41 ServiceHandle<IRDBAccessSvc> raccess("RDBAccessSvc",name());
42 ATH_CHECK(raccess.retrieve());
43
44 if(!m_manager) {
45 CavernInfraDetectorFactory theCavernInfraFactory(detStore(),raccess);
46 theCavernInfraFactory.setTagNode(cavernInfraVersion,versionNode);
47 theCavernInfraFactory.create(world);
48 m_manager = theCavernInfraFactory.getDetectorManager();
49 }
50
51 if(m_manager) {
52 theExpt->addManager(m_manager);
53 ATH_CHECK(detStore()->record(m_manager,m_manager->getName()));
54 }
55 else {
56 ATH_MSG_ERROR("ERROR. Failed to build Cavern Version " << cavernInfraVersion);
57 return StatusCode::FAILURE;
58 }
59
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
GeoPhysVol * getPhysVol()
Destructor.
void addManager(const GeoVDetectorManager *)
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_detector

GeoVDetectorManager* GeoModelTool::m_detector {nullptr}
protectedinherited

Definition at line 30 of file GeoModelTool.h.

30{nullptr};

◆ m_manager

const CavernInfraDetectorManager* CavernInfraDetectorTool::m_manager {nullptr}
private

Definition at line 21 of file CavernInfraDetectorTool.h.

21{nullptr};

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