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

#include <LArDetectorToolH62004.h>

Inheritance diagram for LArDetectorToolH62004:
Collaboration diagram for LArDetectorToolH62004:

Public Member Functions

 LArDetectorToolH62004 (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor(s) More...
 
virtual ~LArDetectorToolH62004 () override final
 Destructor. More...
 
virtual StatusCode create () override final
 Create the Detector Node corresponding to this tool. More...
 
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

float m_xcryo
 
float m_ytable
 
bool m_isrun1
 
bool m_emec
 
bool m_hec
 
bool m_fcal
 
bool m_coldnose
 
bool m_printstep
 
bool m_checkprim
 
bool m_checkother
 

Detailed Description

Definition at line 10 of file LArDetectorToolH62004.h.

Constructor & Destructor Documentation

◆ LArDetectorToolH62004()

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

Constructor(s)

Definition at line 26 of file LArDetectorToolH62004.cxx.

28 {
29  declareProperty("XCryoPos",m_xcryo=0.);
30  declareProperty("YTablePos",m_ytable=0.);
31  declareProperty("isRun1",m_isrun1=false);
32  declareProperty("isEmec",m_emec=true);
33  declareProperty("isHec",m_hec=true);
34  declareProperty("isFcal",m_fcal=true);
35  declareProperty("isColdnose",m_coldnose=true);
36  declareProperty("PrintStep",m_printstep=false);
37  declareProperty("CheckPrim",m_checkprim=false);
38  declareProperty("CheckOther",m_checkother=false);
39 }

◆ ~LArDetectorToolH62004()

LArDetectorToolH62004::~LArDetectorToolH62004 ( )
finaloverridevirtual

Destructor.

Definition at line 44 of file LArDetectorToolH62004.cxx.

45 {
46  // This will need to be modified once we register the Toy DetectorNode in
47  // the Transient Detector Store
48  if ( nullptr != m_detector ) {
49  delete m_detector;
50  m_detector = nullptr;
51  }
52 }

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 LArDetectorToolH62004::create ( )
finaloverridevirtual

Create the Detector Node corresponding to this tool.

Definition at line 58 of file LArDetectorToolH62004.cxx.

59 {
60  MsgStream log(msgSvc(), name());
61 
62  LArGeoTB2004Options *geotbopt = new LArGeoTB2004Options();
63  geotbopt->CryoXPosition(m_xcryo);
64  geotbopt->TableYPosition(m_ytable);
65  geotbopt->Run1(m_isrun1);
66  geotbopt->Emec(m_emec);
67  geotbopt->Hec(m_hec);
68  geotbopt->Fcal(m_fcal);
69  geotbopt->Coldnose(m_coldnose);
70  geotbopt->Printstep(m_printstep);
71  geotbopt->Checkprim(m_checkprim);
72  geotbopt->Checkother(m_checkother);
73  geotbopt->saveMe();
74 
75 
76 
77  // Get the detector configuration.
78  IGeoDbTagSvc *geoDbTag;
79  StatusCode sc = service ("GeoDbTagSvc",geoDbTag);
80  if (StatusCode::SUCCESS != sc) {
81  log << MSG::ERROR << "Could not find GeoDbTagSvc" << endmsg;
82  delete geotbopt;
83  return (StatusCode::FAILURE);
84  }
85 
86  std::string AtlasVersion = geoDbTag->atlasVersion();
87  std::string LArVersion = geoDbTag->LAr_VersionOverride();
88 
89  IRDBAccessSvc *accessSvc;
90  sc=service("RDBAccessSvc",accessSvc);
91  if (StatusCode::SUCCESS != sc) {
92  log << MSG::ERROR
93  << "Could not find RDBAccessSvc"
94  << endmsg;
95  delete geotbopt;
96  return (StatusCode::FAILURE);
97  }
98 
99  std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
100  std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
101  log << MSG::INFO << "Keys for LAr are " << detectorKey << " " << detectorNode << endmsg;
102 
103 
104  log << MSG::INFO << "Creating the LAr " << endmsg;
105  log << MSG::INFO << "LAr Geometry Options:" << endmsg;
106 
107 
108 
109 
110  //
111  // Locate the top level experiment node
112  //
113  GeoModelExperiment* theExpt = nullptr;
114  sc=detStore()->retrieve( theExpt, "ATLAS" );
115  if (StatusCode::SUCCESS != sc) {
116  log << MSG::ERROR
117  << "Could not find GeoModelExperiment ATLAS"
118  << endmsg;
119  delete geotbopt;
120  return (StatusCode::FAILURE);
121  }
122 
123 
124  // determine the geometry layout - Atlas/Testbeam
125  std::string geometryLayout = "Atlas";
126  std::string LArTag = accessSvc->getChildTag("LAr",detectorKey,detectorNode);
127 
128 
129 
130 
131  LArGeo::LArDetectorFactoryH62004 theLArFactory(detStore().operator->());
132 
133 
134 
135 
136 
137  if ( nullptr == m_detector ) {
138  // Create the H62004Node instance
139  try {
140  //
141  // This strange way of casting is to avoid an
142  // utterly brain damaged compiler warning.
143  //
144  GeoIntrusivePtr<GeoPhysVol>world=&*theExpt->getPhysVol();
145  theLArFactory.create(world);
146  } catch (const std::bad_alloc&) {
147  log << MSG::FATAL << "Could not create new H62004Node!" << endmsg;
148  delete geotbopt;
149  return StatusCode::FAILURE;
150  }
151  // Register the H62004Node instance with the Transient Detector Store
152  theExpt->addManager(theLArFactory.getDetectorManager());
153  sc=detStore()->record(theLArFactory.getDetectorManager(),theLArFactory.getDetectorManager()->getName());
154  if (StatusCode::SUCCESS != sc) {
155  log << MSG::ERROR
156  << "Could not record LArFactory to DetStore"
157  << endmsg;
158  delete geotbopt;
159  return (StatusCode::FAILURE);
160  }
161 
162 
163  return StatusCode::SUCCESS;
164 
165 
166  }
167 
168 
169  return StatusCode::FAILURE;
170 }

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

bool LArDetectorToolH62004::m_checkother
private

Definition at line 32 of file LArDetectorToolH62004.h.

◆ m_checkprim

bool LArDetectorToolH62004::m_checkprim
private

Definition at line 31 of file LArDetectorToolH62004.h.

◆ m_coldnose

bool LArDetectorToolH62004::m_coldnose
private

Definition at line 29 of file LArDetectorToolH62004.h.

◆ m_detector

GeoVDetectorManager* GeoModelTool::m_detector
protectedinherited

Definition at line 36 of file GeoModelTool.h.

◆ m_emec

bool LArDetectorToolH62004::m_emec
private

Definition at line 26 of file LArDetectorToolH62004.h.

◆ m_fcal

bool LArDetectorToolH62004::m_fcal
private

Definition at line 28 of file LArDetectorToolH62004.h.

◆ m_hec

bool LArDetectorToolH62004::m_hec
private

Definition at line 27 of file LArDetectorToolH62004.h.

◆ m_isrun1

bool LArDetectorToolH62004::m_isrun1
private

Definition at line 25 of file LArDetectorToolH62004.h.

◆ m_printstep

bool LArDetectorToolH62004::m_printstep
private

Definition at line 30 of file LArDetectorToolH62004.h.

◆ m_xcryo

float LArDetectorToolH62004::m_xcryo
private

Definition at line 23 of file LArDetectorToolH62004.h.

◆ m_ytable

float LArDetectorToolH62004::m_ytable
private

Definition at line 24 of file LArDetectorToolH62004.h.


The documentation for this class was generated from the following files:
GeoModelExperiment::getPhysVol
GeoPhysVol * getPhysVol()
Destructor.
Definition: GeoModelExperiment.cxx:21
LArGeoTB2004Options::Run1
void Run1(bool value)
Definition: LArGeoTB2004Options.h:33
LArDetectorToolH62004::m_hec
bool m_hec
Definition: LArDetectorToolH62004.h:27
LArDetectorToolH62004::m_checkprim
bool m_checkprim
Definition: LArDetectorToolH62004.h:31
LArGeoTB2004Options::Coldnose
void Coldnose(bool value)
Definition: LArGeoTB2004Options.h:37
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
LArDetectorToolH62004::m_fcal
bool m_fcal
Definition: LArDetectorToolH62004.h:28
LArGeoTB2004Options::Emec
void Emec(bool value)
Definition: LArGeoTB2004Options.h:34
LArGeoTB2004Options::TableYPosition
void TableYPosition(double value)
Definition: LArGeoTB2004Options.h:32
LArDetectorToolH62004::m_ytable
float m_ytable
Definition: LArDetectorToolH62004.h:24
GeoModelExperiment
Definition: GeoModelExperiment.h:32
LArGeoTB2004Options::Printstep
void Printstep(bool value)
Definition: LArGeoTB2004Options.h:38
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
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArGeoTB2004Options::Fcal
void Fcal(bool value)
Definition: LArGeoTB2004Options.h:36
LArGeoTB2004Options::CryoXPosition
void CryoXPosition(double value)
Definition: LArGeoTB2004Options.h:31
LArDetectorToolH62004::m_checkother
bool m_checkother
Definition: LArDetectorToolH62004.h:32
LArDetectorToolH62004::m_printstep
bool m_printstep
Definition: LArDetectorToolH62004.h:30
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.
LArGeoTB2004Options::Hec
void Hec(bool value)
Definition: LArGeoTB2004Options.h:35
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
LArGeoTB2004Options
Definition: LArGeoTB2004Options.h:15
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
LArGeoTB2004Options::Checkother
void Checkother(bool value)
Definition: LArGeoTB2004Options.h:40
LArGeo::LArDetectorFactoryH62004
Definition: LArDetectorFactoryH62004.h:17
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IGeoDbTagSvc
Definition: IGeoDbTagSvc.h:26
LArDetectorToolH62004::m_xcryo
float m_xcryo
Definition: LArDetectorToolH62004.h:23
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
GeoModelTool::m_detector
GeoVDetectorManager * m_detector
Definition: GeoModelTool.h:36
LArGeoTB2004Options::Checkprim
void Checkprim(bool value)
Definition: LArGeoTB2004Options.h:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
LArGeoTB2004Options::saveMe
void saveMe()
Definition: LArGeoTB2004Options.cxx:11
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IGeoDbTagSvc::atlasVersion
virtual const std::string & atlasVersion() const =0
LArDetectorToolH62004::m_isrun1
bool m_isrun1
Definition: LArDetectorToolH62004.h:25
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArDetectorToolH62004::m_coldnose
bool m_coldnose
Definition: LArDetectorToolH62004.h:29
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LArDetectorToolH62004::m_emec
bool m_emec
Definition: LArDetectorToolH62004.h:26