19#include "GaudiKernel/ServiceHandle.h"
22#include "GeoModelRead/ReadGeoModel.h"
50 return StatusCode::SUCCESS;
69 ATH_CHECK(detStore()->retrieve(theExpt,
"ATLAS"));
72 GeoModelIO::ReadGeoModel* sqliteReader = geoDbTagSvc->getSqliteReader();
74 std::string detectorKey{
""};
75 std::string detectorNode{
""};
78 detectorKey = decodeVersion.
tag();
79 detectorNode = decodeVersion.
node();
80 if(decodeVersion.
custom()) {
81 ATH_MSG_WARNING(
"PixelDetectorTool: Detector Information coming from a custom configuration!!" );
85 IRDBRecordset_ptr switchSet = rdbAccessSvc->getRecordsetPtr(
"PixelSwitches", detectorKey, detectorNode);
86 const IRDBRecord *switchTable = (*switchSet)[0];
88 std::string versionName;
89 std::string descrName=
"noDescr";
94 versionName = switchTable->
getString(
"VERSIONNAME");
97 descrName = switchTable->
getString(
"DESCRIPTION");
115 const PixelID * idHelper =
nullptr;
116 ATH_CHECK(detStore()->retrieve(idHelper,
"PixelID"));
152 if (versionName ==
"SLHC") {
153 ATH_MSG_ERROR(
"Service builder tool not specified. Some services will not be built" );
162 ATH_MSG_INFO(
"Building the geometry from the SQLite file");
172 if (versionName ==
"IBL") switches.
setIBL();
175 thePixelFactory.
create(world);
180 ATH_MSG_INFO(
"Building Pixel Detector with Version Tag: " << detectorKey
181 <<
" at Node: " << detectorNode);
183 ATH_MSG_INFO(
"Building the geometry in the standard way");
186 std::string pixelVersionTag = rdbAccessSvc->getChildTag(
"Pixel", detectorKey, detectorNode);
191 if (pixelVersionTag.empty()) {
192 ATH_MSG_INFO(
"No Pixel Version. Pixel Detector will not be built." );
193 return StatusCode::SUCCESS;
199 ATH_MSG_DEBUG(
"PixelDetectorTool: Detector Information coming from the database and job options IGNORED." );
200 ATH_MSG_DEBUG(
"Keys for Pixel Switches are " << detectorKey <<
" " << detectorNode );
202 if (versionName.empty()) {
213 ATH_MSG_INFO(
"Overriding version name: " << versionName );
231 if (versionName ==
"IBL") switches.
setIBL();
235 if(versionName ==
"DC1" || versionName ==
"DC2") {
241 else if (versionName ==
"SR1") {
250 if(descrName.compare(
"TrackingGeometry")!=0) {
254 ATH_MSG_INFO(
"Pixel - TrackingGeometry tag - no geometry built" );
273 return StatusCode::SUCCESS;
283 return StatusCode::SUCCESS;
292 return StatusCode::FAILURE;
298 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
Define macros for attributes used to control the static checker.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
bool custom() const
Return true if CUSTOM is selected.
const std::string & tag() const
Return version tag.
const std::string & node() const
Return the version node.
GeoPhysVol * getPhysVol()
Destructor.
void addManager(const GeoVDetectorManager *)
IRDBRecord is one record in the IRDBRecordset object.
virtual bool isFieldNull(std::string_view fieldName) const =0
Check if the field value is NULL.
virtual int getInt(std::string_view fieldName) const =0
Get int field value.
virtual const std::string & getString(std::string_view fieldName) const =0
Get string field value.
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Base class for Pixel and SCT Detector managers.
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const
virtual void create(GeoPhysVol *world)
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const override
virtual void create(GeoPhysVol *world) override
virtual void create(GeoPhysVol *world)
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const
virtual void create(GeoPhysVol *world)
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const
Class to hold various Athena components.
This is an Identifier helper class for the Pixel subdetector.
void setInitialLayout(bool flag)
void setIBL(bool flag=true)
void setServices(bool flag)
void setServicesOnLadder(bool flag)
void setDC1Geometry(bool flag)
void setDBM(bool flag=false)
void setDynamicAlignFolders(const bool useDynAlignFolders)
void setAlignable(bool flag)
static constexpr CLID ID()