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

#include <LArDetectorToolTBEC.h>

Inheritance diagram for LArDetectorToolTBEC:
Collaboration diagram for LArDetectorToolTBEC:

Public Member Functions

 LArDetectorToolTBEC (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~LArDetectorToolTBEC () override final
 
virtual StatusCode create () override final
 
virtual GeoVDetectorManager * manager ()
 The Detector Node corresponding to this tool. More...
 
virtual const GeoVDetectorManager * manager () const
 
virtual StatusCode clear () override
 
virtual StatusCode registerCallback ATLAS_NOT_THREAD_SAFE () override
 
virtual StatusCode align (IOVSVC_CALLBACK_ARGS) override
 

Protected Attributes

GeoVDetectorManager * m_detector
 

Private Attributes

int m_ecVisLimit
 

Detailed Description

Definition at line 10 of file LArDetectorToolTBEC.h.

Constructor & Destructor Documentation

◆ LArDetectorToolTBEC()

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

Definition at line 15 of file LArDetectorToolTBEC.cxx.

19  m_ecVisLimit(-1)
20 {
21  declareProperty("ECVisLimit", m_ecVisLimit);
22 }

◆ ~LArDetectorToolTBEC()

LArDetectorToolTBEC::~LArDetectorToolTBEC ( )
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 GeoModelTool::clear ( )
overridevirtualinherited

◆ create()

StatusCode LArDetectorToolTBEC::create ( )
finaloverridevirtual

Definition at line 27 of file LArDetectorToolTBEC.cxx.

28 {
29  MsgStream log(msgSvc(), name());
30 
31  // Get the detector configuration.
32  IGeoDbTagSvc *geoDbTag;
33  ATH_CHECK(service ("GeoDbTagSvc",geoDbTag));
34 
35  std::string AtlasVersion = geoDbTag->atlasVersion();
36  std::string LArVersion = geoDbTag->LAr_VersionOverride();
37 
38  IRDBAccessSvc *accessSvc;
39  ATH_CHECK(service("RDBAccessSvc",accessSvc));
40 
41  std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
42  std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
43  log << MSG::INFO << "Keys for LAr are " << detectorKey << " " << detectorNode << endmsg;
44 
45 
46  log << MSG::INFO << "Creating the LAr " << endmsg;
47  log << MSG::INFO << "LAr Geometry Options:" << endmsg;
48 
49  // Locate the top level experiment node
50  GeoModelExperiment* theExpt = nullptr;
51  if (StatusCode::SUCCESS != detStore()->retrieve( theExpt, "ATLAS" ))
52  {
53  log << MSG::ERROR << "Could not find GeoModelExperiment ATLAS" << endmsg;
54  return (StatusCode::FAILURE);
55  }
56 
57  // determine the geometry layout - Atlas/Testbeam
58  std::string geometryLayout = "Atlas";
59  std::string LArTag = accessSvc->getChildTag("LAr",detectorKey,detectorNode);
60 
61  LArGeo::LArDetectorFactoryTBEC theLArFactory;
62 
63  theLArFactory.setECVisLimit (m_ecVisLimit);
64 
65 
66  if (nullptr == m_detector)
67  {
68  GeoIntrusivePtr<GeoPhysVol>world=&*theExpt->getPhysVol();
69  theLArFactory.create(world);
70 
71  if (StatusCode::SUCCESS != detStore()->record(theLArFactory.getDetectorManager(),theLArFactory.getDetectorManager()->getName()))
72  {
73  log << MSG::ERROR << "Could not record" << endmsg;
74  return (StatusCode::FAILURE);
75  }
76 
77  theExpt->addManager(theLArFactory.getDetectorManager());
78 
79 
80  return StatusCode::SUCCESS;
81  }
82 
83 
84  return StatusCode::FAILURE;
85 }

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

int LArDetectorToolTBEC::m_ecVisLimit
private

Definition at line 25 of file LArDetectorToolTBEC.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
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
IGeoDbTagSvc::LAr_VersionOverride
virtual const std::string & LAr_VersionOverride() const =0
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
LArGeo::LArDetectorFactoryTBEC
Definition: LArDetectorFactoryTBEC.h:13
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
LArGeo::LArDetectorFactoryTBEC::getDetectorManager
virtual const LArDetectorManager * getDetectorManager() const
Definition: LArDetectorFactoryTBEC.cxx:202
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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:195
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IGeoDbTagSvc::atlasVersion
virtual const std::string & atlasVersion() const =0
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LArDetectorToolTBEC::m_ecVisLimit
int m_ecVisLimit
Definition: LArDetectorToolTBEC.h:25
LArGeo::LArDetectorFactoryTBEC::create
virtual void create(GeoPhysVol *world)
Definition: LArDetectorFactoryTBEC.cxx:48
LArGeo::LArDetectorFactoryTBEC::setECVisLimit
void setECVisLimit(int maxCell)
Definition: LArDetectorFactoryTBEC.h:32