28{
30
31
32 SmartIF<IGeoDbTagSvc> geoDbTag{Gaudi::svcLocator()->service("GeoDbTagSvc")};
34
36 std::string LArVersion = geoDbTag->LAr_VersionOverride();
37
38 SmartIF<IRDBAccessSvc> accessSvc{Gaudi::svcLocator()->service("RDBAccessSvc")};
40
41 std::string detectorKey = LArVersion.empty() ?
AtlasVersion : LArVersion;
42 std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
43 log << MSG::INFO <<
"Keys for LAr are " << detectorKey <<
" " << detectorNode <<
endmsg;
44
45
46 log << MSG::INFO <<
"Creating the LAr " <<
endmsg;
47 log << MSG::INFO <<
"LAr Geometry Options:" <<
endmsg;
48
49
50 GeoModelExperiment* theExpt = nullptr;
52 {
53 log << MSG::ERROR <<
"Could not find GeoModelExperiment ATLAS" <<
endmsg;
54 return (StatusCode::FAILURE);
55 }
56
57
58 std::string geometryLayout = "Atlas";
59 std::string LArTag = accessSvc->getChildTag("LAr",detectorKey,detectorNode);
60
61 LArGeo::LArDetectorFactoryTBEC theLArFactory;
62
64
65
67 {
68 GeoIntrusivePtr<GeoPhysVol>world=&*theExpt->
getPhysVol();
69 theLArFactory.
create(world);
70
72 {
73 log << MSG::ERROR <<
"Could not record" <<
endmsg;
74 return (StatusCode::FAILURE);
75 }
76
78
79
80 return StatusCode::SUCCESS;
81 }
82
83
84 return StatusCode::FAILURE;
85}
#define ATH_CHECK
Evaluate an expression and check for errors.
GeoPhysVol * getPhysVol()
Destructor.
void addManager(const GeoVDetectorManager *)
virtual const LArDetectorManager * getDetectorManager() const override
void setECVisLimit(int maxCell)
virtual void create(GeoPhysVol *world) override
msgSvc
Provide convenience handles for various services.
retrieve(aClass, aKey=None)