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

#include <BeamPipeDetectorTool.h>

Inheritance diagram for BeamPipeDetectorTool:
Collaboration diagram for BeamPipeDetectorTool:

Public Member Functions

 BeamPipeDetectorTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~BeamPipeDetectorTool () 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 BeamPipeDetectorManagerm_manager {nullptr}
 
StringProperty m_mode
 

Detailed Description

Definition at line 11 of file BeamPipeDetectorTool.h.

Constructor & Destructor Documentation

◆ BeamPipeDetectorTool()

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

Definition at line 23 of file BeamPipeDetectorTool.cxx.

25  :
27 {
28 }

◆ ~BeamPipeDetectorTool()

BeamPipeDetectorTool::~BeamPipeDetectorTool ( )
finaloverridevirtualdefault

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

Reimplemented from GeoModelTool.

Definition at line 85 of file BeamPipeDetectorTool.cxx.

86 {
88  if(proxy) {
89  proxy->reset();
90  m_manager = nullptr;
91  }
92  return StatusCode::SUCCESS;
93 }

◆ create()

StatusCode BeamPipeDetectorTool::create ( )
finaloverridevirtual

Definition at line 33 of file BeamPipeDetectorTool.cxx.

34 {
35  ATH_MSG_INFO("Building Beam Pipe");
36 
37  SmartIF<IGeoDbTagSvc> geoDbTag{Gaudi::svcLocator()->service("GeoDbTagSvc")};
38  ATH_CHECK(geoDbTag.isValid());
39 
40  std::string atlasVersion = geoDbTag->atlasVersion();
41  std::string versionNode = "ATLAS";
42 
43  GeoModelExperiment* theExpt{nullptr};
44  ATH_CHECK(detStore()->retrieve(theExpt, "ATLAS"));
45 
46  GeoPhysVol* world=theExpt->getPhysVol();
47 
48  ServiceHandle<IRDBAccessSvc> accessSvc(geoDbTag->getParamSvcName(),name());
49  ATH_CHECK(accessSvc.retrieve());
50 
51  GeoModelIO::ReadGeoModel* sqliteReader = geoDbTag->getSqliteReader();
52  if (sqliteReader) {
53  BeamPipeDetectorFactory_Lite theBeamPipeFactory;
54  theBeamPipeFactory.create(world);
55  m_manager = theBeamPipeFactory.getDetectorManager();
56  }
57  else {
58  // Check we have the beampipe and print its version
59  // Print the version tag:
60  std::string beampipeVersionTag;
61  beampipeVersionTag = accessSvc->getChildTag("BeamPipe", atlasVersion,versionNode);
62  ATH_MSG_DEBUG("Beampipe Version: " << beampipeVersionTag);
63 
64  if (beampipeVersionTag.empty()) {
65  ATH_MSG_INFO("No BeamPipe Version. Beam pipe will not be built.");
66  }
67  else {
68  BeamPipeDetectorFactory theBeamPipeFactory(detStore().operator->(),accessSvc.operator->());
69  theBeamPipeFactory.setTagNode(atlasVersion,versionNode,m_mode);
70  theBeamPipeFactory.create(world);
71 
72  m_manager = theBeamPipeFactory.getDetectorManager();
73  }
74  }
75 
76  if (m_manager) {
77  theExpt->addManager(m_manager);
78  ATH_CHECK(detStore()->record(m_manager,m_manager->getName()));
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 BeamPipeDetectorManager* BeamPipeDetectorTool::m_manager {nullptr}
private

Definition at line 25 of file BeamPipeDetectorTool.h.

◆ m_mode

StringProperty BeamPipeDetectorTool::m_mode
private
Initial value:
{this
, "BeamPipeMode"
, "BeamPipe"
, "Two modes: 'BeamPipe' default, 'AssemblyBeamPipe' activates implementation based on assembly volume"}

Definition at line 26 of file BeamPipeDetectorTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
BeamPipeDetectorFactory_Lite::getDetectorManager
virtual const BeamPipeDetectorManager * getDetectorManager() const override
Definition: BeamPipeDetectorFactory_Lite.cxx:28
BeamPipeDetectorTool::m_mode
StringProperty m_mode
Definition: BeamPipeDetectorTool.h:26
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
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
BeamPipeDetectorFactory
Definition: BeamPipeDetectorFactory.h:19
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
BeamPipeDetectorFactory_Lite::create
virtual void create(GeoPhysVol *world) override
Definition: BeamPipeDetectorFactory_Lite.cxx:18
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
BeamPipeDetectorFactory_Lite
Definition: BeamPipeDetectorFactory_Lite.h:12
BeamPipeDetectorTool::m_manager
const BeamPipeDetectorManager * m_manager
Definition: BeamPipeDetectorTool.h:25
SG::DataProxy
Definition: DataProxy.h:44
ServiceHandle< IRDBAccessSvc >