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

#include <AFP_GeoModelTool.h>

Inheritance diagram for AFP_GeoModelTool:
Collaboration diagram for AFP_GeoModelTool:

Public Member Functions

 AFP_GeoModelTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor(s) More...
 
virtual ~AFP_GeoModelTool () override final
 Destructor. More...
 
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 Member Functions

StatusCode checkPropertiesSettings ()
 

Private Attributes

AFP_CONFIGURATION m_CfgParams
 
AFP_Geometrym_pGeometry
 
std::unique_ptr< AFP_GeoModelFactorym_pAFPDetectorFactory
 
ServiceHandle< IIOVDbSvcm_iovSvc
 
AFP_SIDCONFIGURATION m_defsidcfg
 
std::vector< double > m_vecAFP00XStaggering
 
std::vector< double > m_vecAFP00YStaggering
 
std::vector< double > m_vecAFP01XStaggering
 
std::vector< double > m_vecAFP01YStaggering
 
std::vector< double > m_vecAFP02XStaggering
 
std::vector< double > m_vecAFP02YStaggering
 
std::vector< double > m_vecAFP03XStaggering
 
std::vector< double > m_vecAFP03YStaggering
 

Detailed Description

Definition at line 16 of file AFP_GeoModelTool.h.

Constructor & Destructor Documentation

◆ AFP_GeoModelTool()

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

Constructor(s)

Definition at line 21 of file AFP_GeoModelTool.cxx.

22  : GeoModelTool( type, name, parent ), m_iovSvc( "IOVDbSvc", name )
23 {
25  m_pGeometry=nullptr;
26 
28 
37 
38  //Properties of SID
39  declareProperty("SID_AddVacuumSensors",m_defsidcfg.bAddVacuumSensors=false);
40 
41 
42  //Properties of TD
43 
44 
45  //Properties of stations
50 
55 
60 
65 }

◆ ~AFP_GeoModelTool()

AFP_GeoModelTool::~AFP_GeoModelTool ( )
finaloverridevirtual

Destructor.

Definition at line 70 of file AFP_GeoModelTool.cxx.

71 {
72  // This will need to be modified once we register the DetectorNode in
73  // the Transient Detector Store
74  if(m_detector!=nullptr) {
75  delete m_detector;
76  m_detector=nullptr;
77  }
78 
79  if(m_pGeometry!=nullptr){
80  delete m_pGeometry;
81  m_pGeometry=nullptr;
82  }
83 }

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

◆ checkPropertiesSettings()

StatusCode AFP_GeoModelTool::checkPropertiesSettings ( )
private

Definition at line 85 of file AFP_GeoModelTool.cxx.

86 {
87  bool bRes=true;
88 
89  MsgStream LogStream(Athena::getMessageSvc(), "AFP_GeoModelTool::CheckPropertiesSettings");
90 
91  if(!m_vecAFP00XStaggering.empty()){
92  if(m_vecAFP00XStaggering.size()==m_CfgParams.sidcfg[EAS_AFP00].fLayerCount){
94  }
95  else{
96  LogStream<<MSG::ERROR<<"Mismatch between SID_AFP01XStaggering and number of plates (SID_NumberOfLayers)"<<endmsg;
97  bRes=false;
98  }
99  }
100  if(!m_vecAFP00YStaggering.empty()){
101  if(m_vecAFP00YStaggering.size()==m_CfgParams.sidcfg[EAS_AFP00].fLayerCount){
103  }
104  else{
105  LogStream<<MSG::ERROR<<"Mismatch between SID_AFP00YStaggering and number of plates (SID_NumberOfLayers)"<<endmsg;
106  bRes=false;
107  }
108  }
109 
110  if(!m_vecAFP01XStaggering.empty()){
111  if(m_vecAFP01XStaggering.size()==m_CfgParams.sidcfg[EAS_AFP01].fLayerCount){
113  }
114  else{
115  LogStream<<MSG::ERROR<<"Mismatch between SID_AFP01XStaggering and number of plates (SID_NumberOfLayers)"<<endmsg;
116  bRes=false;
117  }
118  }
119  if(!m_vecAFP01YStaggering.empty()){
120  if(m_vecAFP01YStaggering.size()==m_CfgParams.sidcfg[EAS_AFP01].fLayerCount){
122  }
123  else{
124  LogStream<<MSG::ERROR<<"Mismatch between SID_AFP01YStaggering and number of plates (SID_NumberOfLayers)"<<endmsg;
125  bRes=false;
126  }
127  }
128 
129  if(!m_vecAFP02XStaggering.empty()){
130  if(m_vecAFP02XStaggering.size()==m_CfgParams.sidcfg[EAS_AFP02].fLayerCount){
132  }
133  else{
134  LogStream<<MSG::ERROR<<"Mismatch between SID_AFP02XStaggering and number of plates (SID_NumberOfLayers)"<<endmsg;
135  bRes=false;
136  }
137  }
138  if(!m_vecAFP02YStaggering.empty()){
139  if(m_vecAFP02YStaggering.size()==m_CfgParams.sidcfg[EAS_AFP02].fLayerCount){
141  }
142  else{
143  LogStream<<MSG::ERROR<<"Mismatch between SID_AFP02YStaggering and number of plates (SID_NumberOfLayers)"<<endmsg;
144  bRes=false;
145  }
146  }
147 
148  if(!m_vecAFP03XStaggering.empty()){
149  if(m_vecAFP03XStaggering.size()==m_CfgParams.sidcfg[EAS_AFP03].fLayerCount){
151  }
152  else{
153  LogStream<<MSG::ERROR<<"Mismatch between SID_AFP03XStaggering and number of plates (SID_NumberOfLayers)"<<endmsg;
154  bRes=false;
155  }
156  }
157  if(!m_vecAFP03YStaggering.empty()){
158  if(m_vecAFP03YStaggering.size()==m_CfgParams.sidcfg[EAS_AFP03].fLayerCount){
160  }
161  else{
162  LogStream<<MSG::ERROR<<"Mismatch between SID_AFP03YStaggering and number of plates (SID_NumberOfLayers)"<<endmsg;
163  bRes=false;
164  }
165  }
166 
167  return bRes? StatusCode::SUCCESS:StatusCode::FAILURE;
168 }

◆ clear()

StatusCode GeoModelTool::clear ( )
overridevirtualinherited

◆ create()

StatusCode AFP_GeoModelTool::create ( )
finaloverridevirtual

Definition at line 170 of file AFP_GeoModelTool.cxx.

171 {
172  MsgStream log(msgSvc(), name());
173  //CHECK(m_iovSvc.retrieve()); //-- REMOVE THIS WHEN IOVSVC IS TO BE USED
174 
175  GeoModelExperiment * theExpt = nullptr;
176  StatusCode sc = detStore()->retrieve( theExpt, "ATLAS" );
177  if (StatusCode::SUCCESS != sc)
178  {
179  log << MSG::ERROR<< "Could not find GeoModelExperiment ATLAS"<< endmsg;
180  return (StatusCode::FAILURE);
181  }
182 
184 
186  m_pAFPDetectorFactory=std::make_unique<AFP_GeoModelFactory>(detStore().operator->(), m_pGeometry);
187 
188  if (m_detector==nullptr)
189  {
190  try
191  {
192  GeoPhysVol *world=&*theExpt->getPhysVol();
193  m_pAFPDetectorFactory->create(world);
194  }
195  catch (std::bad_alloc const&)
196  {
197  log << MSG::FATAL << "Could not create new DetectorNode!" << endmsg;
198  return StatusCode::FAILURE;
199  }
200 
201  // Register the DetectorNode instance with the Transient Detector Store
202  theExpt->addManager(m_pAFPDetectorFactory->getDetectorManager());
203  sc = detStore()->record(m_pAFPDetectorFactory->getDetectorManager(),m_pAFPDetectorFactory->getDetectorManager()->getName());
204 
205  if (StatusCode::SUCCESS != sc)
206  {
207  log << MSG::ERROR << "Could not register DetectorNode" << endmsg;
208  return (StatusCode::FAILURE);
209  }
210 
211  return StatusCode::SUCCESS;
212  }
213 
214  return StatusCode::FAILURE;
215 }

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

AFP_CONFIGURATION AFP_GeoModelTool::m_CfgParams
private

Definition at line 26 of file AFP_GeoModelTool.h.

◆ m_defsidcfg

AFP_SIDCONFIGURATION AFP_GeoModelTool::m_defsidcfg
private

Definition at line 30 of file AFP_GeoModelTool.h.

◆ m_detector

GeoVDetectorManager* GeoModelTool::m_detector
protectedinherited

Definition at line 36 of file GeoModelTool.h.

◆ m_iovSvc

ServiceHandle< IIOVDbSvc > AFP_GeoModelTool::m_iovSvc
private

Definition at line 29 of file AFP_GeoModelTool.h.

◆ m_pAFPDetectorFactory

std::unique_ptr<AFP_GeoModelFactory> AFP_GeoModelTool::m_pAFPDetectorFactory
private

Definition at line 28 of file AFP_GeoModelTool.h.

◆ m_pGeometry

AFP_Geometry* AFP_GeoModelTool::m_pGeometry
private

Definition at line 27 of file AFP_GeoModelTool.h.

◆ m_vecAFP00XStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP00XStaggering
private

Definition at line 31 of file AFP_GeoModelTool.h.

◆ m_vecAFP00YStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP00YStaggering
private

Definition at line 31 of file AFP_GeoModelTool.h.

◆ m_vecAFP01XStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP01XStaggering
private

Definition at line 32 of file AFP_GeoModelTool.h.

◆ m_vecAFP01YStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP01YStaggering
private

Definition at line 32 of file AFP_GeoModelTool.h.

◆ m_vecAFP02XStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP02XStaggering
private

Definition at line 33 of file AFP_GeoModelTool.h.

◆ m_vecAFP02YStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP02YStaggering
private

Definition at line 33 of file AFP_GeoModelTool.h.

◆ m_vecAFP03XStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP03XStaggering
private

Definition at line 34 of file AFP_GeoModelTool.h.

◆ m_vecAFP03YStaggering

std::vector<double> AFP_GeoModelTool::m_vecAFP03YStaggering
private

Definition at line 34 of file AFP_GeoModelTool.h.


The documentation for this class was generated from the following files:
EAS_AFP02
@ EAS_AFP02
Definition: AFP_ConfigParams.h:18
AFP_CONSTANTS::Stat_ShiftInYAxis
static constexpr double Stat_ShiftInYAxis
Definition: AFP_constants.h:88
AFP_CONSTANTS::Stat_InnerZDistance
static constexpr double Stat_InnerZDistance
Definition: AFP_constants.h:86
GeoModelExperiment::getPhysVol
GeoPhysVol * getPhysVol()
Destructor.
Definition: GeoModelExperiment.cxx:21
AFP_GeoModelTool::m_vecAFP02XStaggering
std::vector< double > m_vecAFP02XStaggering
Definition: AFP_GeoModelTool.h:33
AFP_GeoModelTool::m_defsidcfg
AFP_SIDCONFIGURATION m_defsidcfg
Definition: AFP_GeoModelTool.h:30
AFP_GeoModelTool::m_vecAFP03XStaggering
std::vector< double > m_vecAFP03XStaggering
Definition: AFP_GeoModelTool.h:34
AFP_CONSTANTS::SiT_NearDistanceToFloor
static constexpr double SiT_NearDistanceToFloor
Definition: AFP_constants.h:20
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
AFP_CONFIGURATION::sidcfg
std::map< eAFPStation, AFP_SIDCONFIGURATION > sidcfg
Definition: AFP_ConfigParams.h:136
AFP_CONSTANTS::SiT_FarDistanceToFloor
static constexpr double SiT_FarDistanceToFloor
Definition: AFP_constants.h:21
EAS_AFP00
@ EAS_AFP00
Definition: AFP_ConfigParams.h:18
EAS_AFP01
@ EAS_AFP01
Definition: AFP_ConfigParams.h:18
GeoModelExperiment
Definition: GeoModelExperiment.h:32
AFP_GeoModelTool::checkPropertiesSettings
StatusCode checkPropertiesSettings()
Definition: AFP_GeoModelTool.cxx:85
AFP_CONSTANTS::SiT_Plate_amount
static constexpr double SiT_Plate_amount
Definition: AFP_constants.h:18
AFP_CONFIGURATION::vecRPotFloorDistance
std::vector< double > vecRPotFloorDistance
Definition: AFP_ConfigParams.h:139
GeoModelTool::GeoModelTool
GeoModelTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor(s)
Definition: GeoModelTool.cxx:12
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
AFP_GeoModelTool::m_vecAFP02YStaggering
std::vector< double > m_vecAFP02YStaggering
Definition: AFP_GeoModelTool.h:33
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AFP_CONSTANTS::Stat_OuterZDistance
static constexpr double Stat_OuterZDistance
Definition: AFP_constants.h:87
AFP_GeoModelTool::m_pAFPDetectorFactory
std::unique_ptr< AFP_GeoModelFactory > m_pAFPDetectorFactory
Definition: AFP_GeoModelTool.h:28
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
AFP_SIDCONFIGURATION::bAddVacuumSensors
bool bAddVacuumSensors
Definition: AFP_ConfigParams.h:110
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
AFP_CONSTANTS::Stat_RPotFloorDistance
static constexpr double Stat_RPotFloorDistance
Definition: AFP_constants.h:89
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AFP_CONFIGURATION::vecStatNominalZPos
std::vector< double > vecStatNominalZPos
Definition: AFP_ConfigParams.h:141
EAS_AFP03
@ EAS_AFP03
Definition: AFP_ConfigParams.h:18
AFP_Geometry
Definition: AFP_Geometry.h:20
AFP_GeoModelTool::m_vecAFP03YStaggering
std::vector< double > m_vecAFP03YStaggering
Definition: AFP_GeoModelTool.h:34
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
AFP_GeoModelTool::m_vecAFP01XStaggering
std::vector< double > m_vecAFP01XStaggering
Definition: AFP_GeoModelTool.h:32
AFP_GeoModelTool::m_vecAFP01YStaggering
std::vector< double > m_vecAFP01YStaggering
Definition: AFP_GeoModelTool.h:32
GeoModelTool::m_detector
GeoVDetectorManager * m_detector
Definition: GeoModelTool.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AFP_GeoModelTool::m_vecAFP00XStaggering
std::vector< double > m_vecAFP00XStaggering
Definition: AFP_GeoModelTool.h:31
AFP_GeoModelTool::m_vecAFP00YStaggering
std::vector< double > m_vecAFP00YStaggering
Definition: AFP_GeoModelTool.h:31
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
AFP_CONFIGURATION::clear
void clear()
Definition: AFP_ConfigParams.cxx:9
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition: GeoModelExperiment.cxx:40
AFP_SIDCONFIGURATION::clear
void clear()
Definition: AFP_ConfigParams.cxx:45
AFP_GeoModelTool::m_CfgParams
AFP_CONFIGURATION m_CfgParams
Definition: AFP_GeoModelTool.h:26
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AFP_GeoModelTool::m_iovSvc
ServiceHandle< IIOVDbSvc > m_iovSvc
Definition: AFP_GeoModelTool.h:29
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AFP_GeoModelTool::m_pGeometry
AFP_Geometry * m_pGeometry
Definition: AFP_GeoModelTool.h:27
AFP_CONFIGURATION::vecRPotYPos
std::vector< double > vecRPotYPos
Definition: AFP_ConfigParams.h:140