ATLAS Offline Software
Loading...
Searching...
No Matches
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 ()
virtual const GeoVDetectorManager * manager () const
virtual StatusCode align () override

Protected Attributes

GeoVDetectorManager * m_detector {nullptr}

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 :
25 GeoModelTool(type, name, parent),
26 m_manager(nullptr)
27{
28}
const LUCID_DetectorManager * m_manager

◆ ~LUCID_DetectorTool()

LUCID_DetectorTool::~LUCID_DetectorTool ( )
finaloverridevirtual

Definition at line 30 of file LUCID_DetectorTool.cxx.

30{}

Member Function Documentation

◆ align()

virtual StatusCode GeoModelTool::align ( )
inlineoverridevirtualinherited

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

Definition at line 25 of file GeoModelTool.h.

25{return StatusCode::SUCCESS;}

◆ clear()

StatusCode LUCID_DetectorTool::clear ( )
finaloverridevirtual

Reimplemented from GeoModelTool.

Definition at line 72 of file LUCID_DetectorTool.cxx.

72 {
73
74 SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<LUCID_DetectorManager>::ID(),m_manager->getName());
75
76 if(proxy) {
77 proxy->reset();
78 m_manager = nullptr;
79 }
80
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}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
GeoPhysVol * getPhysVol()
Destructor.
void addManager(const GeoVDetectorManager *)
GeoVDetectorManager * m_detector
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ manager() [1/2]

virtual GeoVDetectorManager * GeoModelTool::manager ( )
inlinevirtualinherited

Definition at line 21 of file GeoModelTool.h.

21{return m_detector;}

◆ manager() [2/2]

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

Definition at line 22 of file GeoModelTool.h.

22{return m_detector;}

Member Data Documentation

◆ m_detector

GeoVDetectorManager* GeoModelTool::m_detector {nullptr}
protectedinherited

Definition at line 28 of file GeoModelTool.h.

28{nullptr};

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