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

#include <LUCID_DetectorTool.h>

Inheritance diagram for LUCID_DetectorTool:
Collaboration diagram for LUCID_DetectorTool:

Public Member Functions

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

const LUCID_DetectorManagerm_manager
 

Detailed Description

Definition at line 11 of file LUCID_DetectorTool.h.

Constructor & Destructor Documentation

◆ LUCID_DetectorTool()

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

Definition at line 22 of file LUCID_DetectorTool.cxx.

24  :
26  m_manager(nullptr)
27 {
28 }

◆ ~LUCID_DetectorTool()

LUCID_DetectorTool::~LUCID_DetectorTool ( )
finaloverridevirtual

Definition at line 30 of file LUCID_DetectorTool.cxx.

30 {}

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 LUCID_DetectorTool::clear ( )
finaloverridevirtual

Reimplemented from GeoModelTool.

Definition at line 72 of file LUCID_DetectorTool.cxx.

72  {
73 
75 
76  if(proxy) {
77  proxy->reset();
78  m_manager = nullptr;
79  }
80 
81  proxy = detStore()->proxy(ClassID_traits<GeoBorderSurfaceContainer>::ID(), "LUCID", false);
82 
83  if(proxy) {
84  proxy->reset();
85  }
86 
87  return StatusCode::SUCCESS;
88 }

◆ create()

StatusCode LUCID_DetectorTool::create ( )
finaloverridevirtual

Definition at line 32 of file LUCID_DetectorTool.cxx.

32  {
33 
34  MsgStream log(msgSvc(), name());
35 
36  ATH_MSG_INFO("Building LUCID geometry");
37 
38  ServiceHandle<IGeoDbTagSvc> geoDbTag("GeoDbTagSvc", name());
39  ATH_CHECK( geoDbTag.retrieve() );
40 
41  ServiceHandle<IRDBAccessSvc> raccess("RDBAccessSvc", name());
42  ATH_CHECK( raccess.retrieve() );
43 
44  const std::string AtlasVersion = geoDbTag->atlasVersion();
45  const std::string LucidVersion = raccess->getChildTag("LUCID",AtlasVersion,"ATLAS");
46 
47  if(LucidVersion.empty()) {
48  ATH_MSG_DEBUG("LUCID is not part of the selected ATLAS geometry. Skipping");
49  return StatusCode::SUCCESS;
50  }
51 
52  GeoModelExperiment* theExpt = nullptr;
53  ATH_CHECK( detStore()->retrieve(theExpt, "ATLAS") );
54 
55  if(nullptr == m_detector) {
56 
57  GeoPhysVol* world = &*theExpt->getPhysVol();
58 
59  LUCID_DetectorFactory theLUCID_Factory(detStore().get(),raccess.get());
60 
61  theLUCID_Factory.create(world);
62  m_manager = theLUCID_Factory.getDetectorManager();
63  theExpt->addManager(m_manager);
64 
65  ATH_CHECK( detStore()->record(m_manager, m_manager->getName()) );
66  return StatusCode::SUCCESS;
67  }
68 
69  return StatusCode::FAILURE;
70 }

◆ 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 LUCID_DetectorManager* LUCID_DetectorTool::m_manager
private

Definition at line 22 of file LUCID_DetectorTool.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
LUCID_DetectorTool::m_manager
const LUCID_DetectorManager * m_manager
Definition: LUCID_DetectorTool.h:22
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
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
EventInfoWrite.AtlasVersion
AtlasVersion
Definition: EventInfoWrite.py:17
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
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:221
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
SG::DataProxy
Definition: DataProxy.h:44
LUCID_DetectorFactory
Definition: LUCID_DetectorFactory.h:23
ServiceHandle< IGeoDbTagSvc >