19#include "GaudiKernel/ServiceHandle.h"
22#include "GeoModelRead/ReadGeoModel.h"
64 return StatusCode::SUCCESS;
83 ATH_CHECK(detStore()->retrieve(theExpt,
"ATLAS"));
86 GeoModelIO::ReadGeoModel* sqliteReader = geoDbTagSvc->getSqliteReader();
88 std::string detectorKey{
""};
89 std::string detectorNode{
""};
92 detectorKey = decodeVersion.
tag();
93 detectorNode = decodeVersion.
node();
94 if(decodeVersion.
custom()) {
95 ATH_MSG_WARNING(
"PixelDetectorTool: Detector Information coming from a custom configuration!!" );
99 IRDBRecordset_ptr switchSet = rdbAccessSvc->getRecordsetPtr(
"PixelSwitches", detectorKey, detectorNode);
100 const IRDBRecord *switchTable = (*switchSet)[0];
102 std::string versionName;
103 std::string descrName=
"noDescr";
108 versionName = switchTable->
getString(
"VERSIONNAME");
111 descrName = switchTable->
getString(
"DESCRIPTION");
129 const PixelID * idHelper =
nullptr;
130 ATH_CHECK(detStore()->retrieve(idHelper,
"PixelID"));
181 if (versionName ==
"SLHC") {
182 ATH_MSG_ERROR(
"Service builder tool not specified. Some services will not be built" );
191 ATH_MSG_INFO(
"Building the geometry from the SQLite file");
201 if (versionName ==
"IBL") switches.
setIBL();
204 thePixelFactory.
create(world);
209 ATH_MSG_INFO(
"Building Pixel Detector with Version Tag: " << detectorKey
210 <<
" at Node: " << detectorNode);
212 ATH_MSG_INFO(
"Building the geometry in the standard way");
215 std::string pixelVersionTag = rdbAccessSvc->getChildTag(
"Pixel", detectorKey, detectorNode);
220 if (pixelVersionTag.empty()) {
221 ATH_MSG_INFO(
"No Pixel Version. Pixel Detector will not be built." );
222 return StatusCode::SUCCESS;
228 ATH_MSG_DEBUG(
"PixelDetectorTool: Detector Information coming from the database and job options IGNORED." );
229 ATH_MSG_DEBUG(
"Keys for Pixel Switches are " << detectorKey <<
" " << detectorNode );
231 if (versionName.empty()) {
242 ATH_MSG_INFO(
"Overriding version name: " << versionName );
260 if (versionName ==
"IBL") switches.
setIBL();
264 if(versionName ==
"DC1" || versionName ==
"DC2") {
270 else if (versionName ==
"SR1") {
279 if(descrName.compare(
"TrackingGeometry")!=0) {
283 ATH_MSG_INFO(
"Pixel - TrackingGeometry tag - no geometry built" );
306 return StatusCode::SUCCESS;
316 return StatusCode::SUCCESS;
325 return StatusCode::FAILURE;
331 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
#define IOVSVC_CALLBACK_ARGS_P(I, K)
short hand for IOVSvc call back argument list, to be used when access to formal arguments is needed,...
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.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
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 const std::string & getString(const std::string &fieldName) const =0
Get string field value.
virtual bool isFieldNull(const std::string &fieldName) const =0
Check if the field value is NULL.
virtual int getInt(const std::string &fieldName) const =0
Get int 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)