ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
InDetDD::ServiceVolumeMakerMgr Class Reference

#include <ServiceVolumeMaker.h>

Collaboration diagram for InDetDD::ServiceVolumeMakerMgr:

Public Member Functions

 ServiceVolumeMakerMgr (IRDBRecordset_ptr table, const ServiceVolumeSchema &schema, InDetDD::AthenaComps *athenaComps)
 
double rmin (int index) const
 
double rmax (int index) const
 
double rmin2 (int index) const
 
double rmax2 (int index) const
 
double zmin (int index) const
 
double zmax (int index) const
 
double width (int index) const
 
double phiStart (int index) const
 
double phiDelta (int index) const
 
double phiStep (int index) const
 
bool zsymm (int index) const
 
int repeat (int index) const
 
int radialDiv (int index) const
 
int volId (int index) const
 
int shiftFlag (int index) const
 
std::string shapeType (int index) const
 
std::string volName (int index) const
 
std::string materialName (int index) const
 
std::vector< double > readLayerShift ()
 
unsigned int numElements () const
 
const IGeometryDBSvcdb () const
 
const ServiceVolumeSchemaschema () const
 

Private Attributes

IRDBRecordset_ptr m_table
 
IRDBRecordset_ptr m_layer
 
ServiceVolumeSchema m_schema
 
InDetDD::AthenaCompsm_athenaComps
 

Detailed Description

Definition at line 99 of file ServiceVolumeMaker.h.

Constructor & Destructor Documentation

◆ ServiceVolumeMakerMgr()

InDetDD::ServiceVolumeMakerMgr::ServiceVolumeMakerMgr ( IRDBRecordset_ptr  table,
const ServiceVolumeSchema schema,
InDetDD::AthenaComps athenaComps 
)

Definition at line 90 of file ServiceVolumeMaker.cxx.

92  : m_table(std::move(table)),
94  m_athenaComps(athenaComps)
95  {}

Member Function Documentation

◆ db()

const IGeometryDBSvc * InDetDD::ServiceVolumeMakerMgr::db ( ) const

Definition at line 98 of file ServiceVolumeMaker.cxx.

98  {
99  return std::as_const(*m_athenaComps).geomDB();
100  }

◆ materialName()

std::string InDetDD::ServiceVolumeMakerMgr::materialName ( int  index) const

Definition at line 198 of file ServiceVolumeMaker.cxx.

198  {
200  }

◆ numElements()

unsigned int InDetDD::ServiceVolumeMakerMgr::numElements ( ) const

Definition at line 203 of file ServiceVolumeMaker.cxx.

203  {
204  return db()->getTableSize(m_table);
205  }

◆ phiDelta()

double InDetDD::ServiceVolumeMakerMgr::phiDelta ( int  index) const

Definition at line 133 of file ServiceVolumeMaker.cxx.

133  {
135  }

◆ phiStart()

double InDetDD::ServiceVolumeMakerMgr::phiStart ( int  index) const

Definition at line 146 of file ServiceVolumeMaker.cxx.

146  {
148  }

◆ phiStep()

double InDetDD::ServiceVolumeMakerMgr::phiStep ( int  index) const

Definition at line 151 of file ServiceVolumeMaker.cxx.

151  {
152  if (m_schema.has_phiStep()) {
154  }
155  return 0;
156  }

◆ radialDiv()

int InDetDD::ServiceVolumeMakerMgr::radialDiv ( int  index) const

Definition at line 169 of file ServiceVolumeMaker.cxx.

169  {
170  if (m_schema.has_radial()) {
171  return db()->getInt(m_table, m_schema.radialDiv(), index);
172  } else {
173  return 0;
174  }
175  }

◆ readLayerShift()

std::vector< double > InDetDD::ServiceVolumeMakerMgr::readLayerShift ( )

Definition at line 225 of file ServiceVolumeMaker.cxx.

225  {
226  std::vector<double> layerShift;
227 
229  const IGeoDbTagSvc* geoDbTag = m_athenaComps->geoDbTagSvc();
230 
231  DecodeVersionKey versionKey(geoDbTag, "Pixel");
232  const std::string& detectorKey = versionKey.tag();
233  const std::string& detectorNode = versionKey.node();
234 
235  IRDBRecordset_ptr PixelBarrelGeneral = rdbSvc->getRecordsetPtr("PixelBarrelGeneral", detectorKey, detectorNode);
236  IRDBRecordset_ptr PixelLayer = rdbSvc->getRecordsetPtr("PixelLayer", detectorKey, detectorNode);
237 
238  int numLayers = db()->getInt(PixelBarrelGeneral, "NLAYER");
239  layerShift.reserve(numLayers);
240  for (int iLayer = 0; iLayer < numLayers; iLayer++) {
241  double shift = 0;
242  if (db()->testField(PixelLayer, "GBLSHIFT", iLayer)) shift = db()->getDouble(PixelLayer, "GBLSHIFT", iLayer);
243  layerShift.push_back(shift);
244  }
245 
246  return layerShift;
247  }

◆ repeat()

int InDetDD::ServiceVolumeMakerMgr::repeat ( int  index) const

Definition at line 164 of file ServiceVolumeMaker.cxx.

164  {
165  return db()->getInt(m_table, m_schema.repeat(), index);
166  }

◆ rmax()

double InDetDD::ServiceVolumeMakerMgr::rmax ( int  index) const

Definition at line 108 of file ServiceVolumeMaker.cxx.

108  {
110  }

◆ rmax2()

double InDetDD::ServiceVolumeMakerMgr::rmax2 ( int  index) const

Definition at line 118 of file ServiceVolumeMaker.cxx.

118  {
120  }

◆ rmin()

double InDetDD::ServiceVolumeMakerMgr::rmin ( int  index) const

Definition at line 103 of file ServiceVolumeMaker.cxx.

103  {
105  }

◆ rmin2()

double InDetDD::ServiceVolumeMakerMgr::rmin2 ( int  index) const

Definition at line 113 of file ServiceVolumeMaker.cxx.

113  {
115  }

◆ schema()

const ServiceVolumeSchema& InDetDD::ServiceVolumeMakerMgr::schema ( ) const
inline

Definition at line 127 of file ServiceVolumeMaker.h.

127 {return m_schema;}

◆ shapeType()

std::string InDetDD::ServiceVolumeMakerMgr::shapeType ( int  index) const

Definition at line 178 of file ServiceVolumeMaker.cxx.

178  {
179  if (m_schema.has_shapeType()) {
180  if (db()->testField(m_table, m_schema.shapeType(), index)) {
181  return db()->getString(m_table, m_schema.shapeType(), index);
182  } else {
183  return "TUBE";
184  }
185  }
186  return "UNKNOWN";
187  }

◆ shiftFlag()

int InDetDD::ServiceVolumeMakerMgr::shiftFlag ( int  index) const

Definition at line 216 of file ServiceVolumeMaker.cxx.

216  {
217  if (m_schema.has_shiftFlag()) {
218  if (db()->testField(m_table, m_schema.shiftFlag(), index)) return db()->getInt(m_table,
220  }
221  return 0;
222  }

◆ volId()

int InDetDD::ServiceVolumeMakerMgr::volId ( int  index) const

Definition at line 208 of file ServiceVolumeMaker.cxx.

208  {
209  if (m_schema.has_volId()) {
210  return db()->getInt(m_table, m_schema.volId(), index);
211  }
212  return 0;
213  }

◆ volName()

std::string InDetDD::ServiceVolumeMakerMgr::volName ( int  index) const

Definition at line 190 of file ServiceVolumeMaker.cxx.

190  {
191  if (db()->testField(m_table, m_schema.volName(), index)) {
192  return db()->getString(m_table, m_schema.volName(), index);
193  }
194  return "";
195  }

◆ width()

double InDetDD::ServiceVolumeMakerMgr::width ( int  index) const

Definition at line 138 of file ServiceVolumeMaker.cxx.

138  {
139  if (m_schema.has_width()) {
141  }
142  return 0;
143  }

◆ zmax()

double InDetDD::ServiceVolumeMakerMgr::zmax ( int  index) const

Definition at line 128 of file ServiceVolumeMaker.cxx.

128  {
130  }

◆ zmin()

double InDetDD::ServiceVolumeMakerMgr::zmin ( int  index) const

Definition at line 123 of file ServiceVolumeMaker.cxx.

123  {
125  }

◆ zsymm()

bool InDetDD::ServiceVolumeMakerMgr::zsymm ( int  index) const

Definition at line 159 of file ServiceVolumeMaker.cxx.

159  {
160  return db()->getInt(m_table, m_schema.zsymm(), index);
161  }

Member Data Documentation

◆ m_athenaComps

InDetDD::AthenaComps* InDetDD::ServiceVolumeMakerMgr::m_athenaComps
private

Definition at line 133 of file ServiceVolumeMaker.h.

◆ m_layer

IRDBRecordset_ptr InDetDD::ServiceVolumeMakerMgr::m_layer
private

Definition at line 131 of file ServiceVolumeMaker.h.

◆ m_schema

ServiceVolumeSchema InDetDD::ServiceVolumeMakerMgr::m_schema
private

Definition at line 132 of file ServiceVolumeMaker.h.

◆ m_table

IRDBRecordset_ptr InDetDD::ServiceVolumeMakerMgr::m_table
private

Definition at line 130 of file ServiceVolumeMaker.h.


The documentation for this class was generated from the following files:
InDetDD::ServiceVolumeMakerMgr::m_schema
ServiceVolumeSchema m_schema
Definition: ServiceVolumeMaker.h:132
InDetDD::ServiceVolumeSchema::rmax2
const std::string & rmax2() const
Definition: ServiceVolumeMaker.h:31
InDetDD::ServiceVolumeSchema::phiStep
const std::string & phiStep() const
Definition: ServiceVolumeMaker.h:43
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
InDetDD::ServiceVolumeMakerMgr::m_table
IRDBRecordset_ptr m_table
Definition: ServiceVolumeMaker.h:130
InDetDD::ServiceVolumeSchema::has_shapeType
bool has_shapeType() const
Definition: ServiceVolumeMaker.h:71
index
Definition: index.py:1
deg
#define deg
Definition: SbPolyhedron.cxx:17
IGeometryDBSvc::getTableSize
virtual unsigned int getTableSize(IRDBRecordset_ptr recordSet) const =0
InDetDD::ServiceVolumeSchema::zsymm
const std::string & zsymm() const
Definition: ServiceVolumeMaker.h:34
InDetDD::ServiceVolumeSchema::has_phiStep
bool has_phiStep() const
Definition: ServiceVolumeMaker.h:74
InDetDD::ServiceVolumeSchema::rmin2
const std::string & rmin2() const
Definition: ServiceVolumeMaker.h:30
InDetDD::ServiceVolumeSchema::zmax
const std::string & zmax() const
Definition: ServiceVolumeMaker.h:33
InDetDD::ServiceVolumeSchema::has_radial
bool has_radial() const
Definition: ServiceVolumeMaker.h:73
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
InDetDD::ServiceVolumeSchema::has_shiftFlag
bool has_shiftFlag() const
Definition: ServiceVolumeMaker.h:70
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition: DecodeVersionKey.h:18
InDetDD::ServiceVolumeMakerMgr::m_athenaComps
InDetDD::AthenaComps * m_athenaComps
Definition: ServiceVolumeMaker.h:133
InDetDD::ServiceVolumeSchema::has_width
bool has_width() const
Definition: ServiceVolumeMaker.h:72
InDetDD::ServiceVolumeSchema::width
const std::string & width() const
Definition: ServiceVolumeMaker.h:39
IGeoDbTagSvc
Definition: IGeoDbTagSvc.h:26
InDetDD::AthenaComps::geoDbTagSvc
const IGeoDbTagSvc * geoDbTagSvc() const
Definition: InDetDDAthenaComps.h:58
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
IGeometryDBSvc::getDouble
virtual double getDouble(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0
The following methods will first look in the text file if provided and then look in the database.
InDetDD::ServiceVolumeSchema::has_volId
bool has_volId() const
Definition: ServiceVolumeMaker.h:69
python.ext.table_printer.table
list table
Definition: table_printer.py:81
InDetDD::ServiceVolumeSchema::volId
const std::string & volId() const
Definition: ServiceVolumeMaker.h:45
HI::TowerBins::numLayers
constexpr unsigned int numLayers()
Definition: HIEventDefs.h:23
InDetDD::ServiceVolumeMakerMgr::db
const IGeometryDBSvc * db() const
Definition: ServiceVolumeMaker.cxx:98
InDetDD::ServiceVolumeSchema::repeat
const std::string & repeat() const
Definition: ServiceVolumeMaker.h:40
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
InDetDD::ServiceVolumeSchema::zmin
const std::string & zmin() const
Definition: ServiceVolumeMaker.h:32
InDetDD::ServiceVolumeSchema::rmax
const std::string & rmax() const
Definition: ServiceVolumeMaker.h:29
InDetDD::ServiceVolumeSchema::shapeType
const std::string & shapeType() const
Definition: ServiceVolumeMaker.h:35
InDetDD::ServiceVolumeSchema::materialName
const std::string & materialName() const
Definition: ServiceVolumeMaker.h:36
InDetDD::ServiceVolumeSchema::volName
const std::string & volName() const
Definition: ServiceVolumeMaker.h:37
InDetDD::ServiceVolumeSchema::rmin
const std::string & rmin() const
Definition: ServiceVolumeMaker.h:28
IGeometryDBSvc::getInt
virtual int getInt(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0
InDetDD::ServiceVolumeSchema::shiftFlag
const std::string & shiftFlag() const
Definition: ServiceVolumeMaker.h:46
InDetDD::ServiceVolumeMakerMgr::schema
const ServiceVolumeSchema & schema() const
Definition: ServiceVolumeMaker.h:127
IGeometryDBSvc::getString
virtual std::string getString(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0
InDetDD::ServiceVolumeSchema::radialDiv
const std::string & radialDiv() const
Definition: ServiceVolumeMaker.h:44
InDetDD::AthenaComps::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetDDAthenaComps.h:74
InDetDD::ServiceVolumeSchema::phiDelta
const std::string & phiDelta() const
Definition: ServiceVolumeMaker.h:42
InDetDD::ServiceVolumeSchema::phiStart
const std::string & phiStart() const
Definition: ServiceVolumeMaker.h:41