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 85 of file LUCID_DetectorTool.cxx.

85  {
86 
88 
89  if(proxy) {
90  proxy->reset();
91  m_manager = nullptr;
92  }
93 
94  proxy = detStore()->proxy(ClassID_traits<GeoBorderSurfaceContainer>::ID(), "LUCID", false);
95 
96  if(proxy) {
97  proxy->reset();
98  }
99 
100  return StatusCode::SUCCESS;
101 }

◆ create()

StatusCode LUCID_DetectorTool::create ( )
finaloverridevirtual

Definition at line 32 of file LUCID_DetectorTool.cxx.

32  {
33 
34  MsgStream log(msgSvc(), name());
35 
36  log << MSG::INFO << "Building LUCID geometry" << endmsg;
37 
38  IGeoDbTagSvc* geoDbTag{nullptr};
39  StatusCode sc = service("GeoDbTagSvc",geoDbTag);
40  if (sc.isFailure()) { log << MSG::FATAL << "Could not locate GeoDbTagSvc" << endmsg; return StatusCode::FAILURE; }
41 
42  IRDBAccessSvc* raccess = nullptr;
43 
44  sc = service("RDBAccessSvc",raccess);
45 
46  if(sc.isFailure()) { log << MSG::FATAL << "Could not locate RDBAccessSvc" << endmsg; return StatusCode::FAILURE; }
47 
48  std::string AtlasVersion = geoDbTag->atlasVersion();
49  std::string LucidVersion = raccess->getChildTag("LUCID",AtlasVersion,"ATLAS");
50 
51  if(LucidVersion.empty()) {
52  log << MSG::DEBUG << "LUCID is not part of the selected ATLAS geometry. Skipping" << endmsg;
53  return StatusCode::SUCCESS;
54  }
55 
56  GeoModelExperiment* theExpt;
57 
58  if (StatusCode::SUCCESS != detStore()->retrieve(theExpt, "ATLAS")) {
59 
60  log << MSG::ERROR << "Could not find GeoModelExperiment ATLAS" << endmsg;
61  return StatusCode::FAILURE;
62  }
63 
64  if(nullptr == m_detector) {
65 
66  GeoPhysVol* world = &*theExpt->getPhysVol();
67 
68  LUCID_DetectorFactory theLUCID_Factory(detStore().operator->(),raccess);
69 
70  theLUCID_Factory.create(world);
71  m_manager = theLUCID_Factory.getDetectorManager();
72  theExpt->addManager(m_manager);
73 
74  sc = detStore()->record(m_manager,
75  m_manager->getName());
76 
77  if (sc.isFailure()) { log << MSG::ERROR << "Could not register LUCID detector manager" << endmsg; return StatusCode::FAILURE; }
78 
79  return StatusCode::SUCCESS;
80  }
81 
82  return StatusCode::FAILURE;
83 }

◆ 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
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
GeoModelExperiment
Definition: GeoModelExperiment.h:32
LUCID_DetectorFactory::create
virtual void create(GeoPhysVol *)
Definition: LUCID_DetectorFactory.cxx:54
GeoModelTool::GeoModelTool
GeoModelTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor(s)
Definition: GeoModelTool.cxx:12
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
EventInfoWrite.AtlasVersion
AtlasVersion
Definition: EventInfoWrite.py:17
IRDBAccessSvc::getChildTag
virtual std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName="ATLASDD")=0
Gets the tag name for the node by giving its parent node tag.
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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
IGeoDbTagSvc
Definition: IGeoDbTagSvc.h:26
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:192
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SG::DataProxy
Definition: DataProxy.h:44
LUCID_DetectorFactory
Definition: LUCID_DetectorFactory.h:23