ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | List of all members
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 ()
 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

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.

18 {
19 }

◆ ~CavernInfraDetectorTool()

CavernInfraDetectorTool::~CavernInfraDetectorTool ( )
default

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

Reimplemented from GeoModelTool.

Definition at line 63 of file CavernInfraDetectorTool.cxx.

64 {
66  if(proxy) {
67  proxy->reset();
68  m_manager = nullptr;
69  }
70  return StatusCode::SUCCESS;
71 }

◆ 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 }

◆ 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_manager

const CavernInfraDetectorManager* CavernInfraDetectorTool::m_manager {nullptr}
private

Definition at line 21 of file CavernInfraDetectorTool.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
CavernInfraDetectorTool::m_manager
const CavernInfraDetectorManager * m_manager
Definition: CavernInfraDetectorTool.h:21
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CavernInfraDetectorFactory
Definition: CavernInfraDetectorFactory.h:16
GeoModelExperiment
Definition: GeoModelExperiment.h:32
GeoModelTool::GeoModelTool
GeoModelTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor(s)
Definition: GeoModelTool.cxx:12
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::DataProxy
Definition: DataProxy.h:45
ServiceHandle< IGeoDbTagSvc >