|
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "GaudiKernel/ServiceHandle.h"
22 #include "GeoModelRead/ReadGeoModel.h"
64 return StatusCode::SUCCESS;
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;
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;
326 if (m_useDynamicAlignFolders) {
333 if (ibltmp.isFailure()) {
336 sc = StatusCode::SUCCESS;
349 if (ibltmp.isFailure()) {
352 sc = StatusCode::SUCCESS;
364 if(sctmp.isFailure()) {
367 sc = StatusCode::SUCCESS;
383 if(sctmp.isFailure()) {
386 sc = StatusCode::SUCCESS;
390 ATH_MSG_WARNING(
"Unable to register callback on AlignableTransformContainer with folder "
391 <<
folderName <<
", Alignment disabled (only if no Run2 scheme is loaded)!" );
396 if (m_tweakIBLDist) {
398 std::string ibl_folderName =
"/Indet/IBLDist";
399 if (
detStore()->contains<CondAttrListCollection>(ibl_folderName)) {
400 ATH_MSG_DEBUG(
"Registering callback on IBLDist with folder " << ibl_folderName );
404 if (ibltmp.isFailure()) {
405 ATH_MSG_ERROR(
"Problem when register callback on IBLDist with folder " << ibl_folderName);
407 sc = StatusCode::SUCCESS;
412 ATH_MSG_WARNING(
"Unable to register callback on IBLDist with folder " << ibl_folderName);
413 ATH_MSG_WARNING(
"This should not happen that no LB-IOV IBL-bowing DB is provided for this run ");
418 ATH_MSG_INFO(
"Alignment disabled. No callback registered" );
424 return StatusCode::SUCCESS;
432 return StatusCode::FAILURE;
438 return StatusCode::SUCCESS;
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
def retrieve(aClass, aKey=None)
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const
virtual void create(GeoPhysVol *world) override
GeoPhysVol * getPhysVol()
Destructor.
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const
#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,...
void setIdHelper(const PixelID *idHelper)
void setGeoDbTagSvc(IGeoDbTagSvc *)
void setDetStore(StoreGateSvc *)
virtual void create(GeoPhysVol *world)
void setDBM(bool flag=false)
Definition of the abstract IRDBAccessSvc interface.
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
::StatusCode StatusCode
StatusCode definition for legacy code.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Default, invalid implementation of ClassID_traits.
const std::string & tag() const
Return version tag.
void setRDBAccessSvc(IRDBAccessSvc *)
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
void setInitialLayout(bool flag)
void setServices(bool flag)
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const
void setIBL(bool flag=true)
void setServicesOnLadder(bool flag)
StatusCode align(IOVSVC_CALLBACK_ARGS) const
void setBCM(IGeoSubDetTool *bcmTool)
void setServiceBuilderTool(IInDetServMatBuilderTool *serviceBuilderTool)
virtual void create(GeoPhysVol *world)
void addManager(const GeoVDetectorManager *)
void setDynamicAlignFolders(const bool useDynAlignFolders)
Class to hold various Athena components.
Definition of the abstract IRDBRecord interface.
#define ATH_MSG_WARNING(x)
virtual bool isFieldNull(const std::string &fieldName) const =0
Check if the field value is NULL.
IRDBRecord is one record in the IRDBRecordset object.
void setGeometryDBSvc(IGeometryDBSvc *)
void setBLM(IGeoSubDetTool *blmTool)
Definition of the abstract IRDBRecordset interface.
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const override
virtual void create(GeoPhysVol *world)
Define macros for attributes used to control the static checker.
void setAlignable(bool flag)
void setDC1Geometry(bool flag)