ATLAS Offline Software
Loading...
Searching...
No Matches
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 {}
const ServiceVolumeSchema & schema() const
InDetDD::AthenaComps * m_athenaComps

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 {
199 return db()->getString(m_table, m_schema.materialName(), index);
200 }
virtual std::string getString(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0
const IGeometryDBSvc * db() const

◆ numElements()

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

Definition at line 203 of file ServiceVolumeMaker.cxx.

203 {
204 return db()->getTableSize(m_table);
205 }
virtual unsigned int getTableSize(IRDBRecordset_ptr recordSet) const =0

◆ phiDelta()

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

Definition at line 133 of file ServiceVolumeMaker.cxx.

133 {
134 return db()->getDouble(m_table, m_schema.phiDelta(), index) * Gaudi::Units::deg;
135 }
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.

◆ phiStart()

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

Definition at line 146 of file ServiceVolumeMaker.cxx.

146 {
147 return db()->getDouble(m_table, m_schema.phiStart(), index) * Gaudi::Units::deg;
148 }

◆ phiStep()

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

Definition at line 151 of file ServiceVolumeMaker.cxx.

151 {
152 if (m_schema.has_phiStep()) {
153 return db()->getDouble(m_table, m_schema.phiStep(), index) * Gaudi::Units::deg;
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 }
virtual int getInt(IRDBRecordset_ptr recordSet, const std::string &name, int index=0) const =0

◆ readLayerShift()

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

Definition at line 225 of file ServiceVolumeMaker.cxx.

225 {
226 std::vector<double> layerShift;
227
228 IRDBAccessSvc* rdbSvc = m_athenaComps->rdbAccessSvc();
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(std::move(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 }
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
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.
constexpr unsigned int numLayers()
Definition HIEventDefs.h:23

◆ 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 {
109 return db()->getDouble(m_table, m_schema.rmax(), index) * Gaudi::Units::mm;
110 }

◆ rmax2()

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

Definition at line 118 of file ServiceVolumeMaker.cxx.

118 {
119 return db()->getDouble(m_table, m_schema.rmax2(), index) * Gaudi::Units::mm;
120 }

◆ rmin()

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

Definition at line 103 of file ServiceVolumeMaker.cxx.

103 {
104 return db()->getDouble(m_table, m_schema.rmin(), index) * Gaudi::Units::mm;
105 }

◆ rmin2()

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

Definition at line 113 of file ServiceVolumeMaker.cxx.

113 {
114 return db()->getDouble(m_table, m_schema.rmin2(), index) * Gaudi::Units::mm;
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,
219 m_schema.shiftFlag(), index);
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()) {
140 return db()->getDouble(m_table, m_schema.width(), index) * Gaudi::Units::mm;
141 }
142 return 0;
143 }

◆ zmax()

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

Definition at line 128 of file ServiceVolumeMaker.cxx.

128 {
129 return db()->getDouble(m_table, m_schema.zmax(), index) * Gaudi::Units::mm;
130 }

◆ zmin()

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

Definition at line 123 of file ServiceVolumeMaker.cxx.

123 {
124 return db()->getDouble(m_table, m_schema.zmin(), index) * Gaudi::Units::mm;
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: