Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 ()
 
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 {nullptr}
 

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()

virtual StatusCode GeoModelTool::align ( IOVSVC_CALLBACK_ARGS  )
inlineoverridevirtualinherited

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

Definition at line 27 of file GeoModelTool.h.

27 {return StatusCode::SUCCESS;}

◆ ATLAS_NOT_THREAD_SAFE()

virtual StatusCode registerCallback GeoModelTool::ATLAS_NOT_THREAD_SAFE ( )
inlineoverridevirtualinherited

Reimplemented in HGTD_DetectorTool, TRT_DetectorTool, PLRDetectorTool, BCMPrimeDetectorTool, and HGTD_GMX_DetectorTool.

Definition at line 26 of file GeoModelTool.h.

26 {return StatusCode::FAILURE;}

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

virtual GeoVDetectorManager* GeoModelTool::manager ( )
inlinevirtualinherited

Definition at line 22 of file GeoModelTool.h.

22 {return m_detector;}

◆ manager() [2/2]

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

Definition at line 23 of file GeoModelTool.h.

23 {return m_detector;}

Member Data Documentation

◆ m_detector

GeoVDetectorManager* GeoModelTool::m_detector {nullptr}
protectedinherited

Definition at line 30 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:395
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
GeoModelExperiment
Definition: GeoModelExperiment.h:32
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
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:37
test_pyathena.parent
parent
Definition: test_pyathena.py:15
GeoModelTool
Definition: GeoModelTool.h:16
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:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
BeamPipeDetectorFactory_Lite::create
virtual void create(GeoPhysVol *world) override
Definition: BeamPipeDetectorFactory_Lite.cxx:18
BeamPipeDetectorFactory_Lite
Definition: BeamPipeDetectorFactory_Lite.h:12
BeamPipeDetectorTool::m_manager
const BeamPipeDetectorManager * m_manager
Definition: BeamPipeDetectorTool.h:25
SG::DataProxy
Definition: DataProxy.h:45
ServiceHandle< IRDBAccessSvc >