14 #include "GaudiKernel/Bootstrap.h"
15 #include "GaudiKernel/ISvcLocator.h"
18 #include "CLHEP/Units/PhysicalConstants.h"
47 ISvcLocator* svcLocator = Gaudi::svcLocator();
49 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service(
"GeoDbTagSvc")};
50 if(!geoDbTagSvc.isValid()) {
51 throw std::runtime_error (
"Cannot locate GeoDBTagSvc");
54 SmartIF<IRDBAccessSvc> pAccessSvc{svcLocator->service(geoDbTagSvc->getParamSvcName())};
55 if(!pAccessSvc.isValid()) {
56 throw std::runtime_error (
"Cannot locate " + geoDbTagSvc->getParamSvcName());
61 if(geoDbTagSvc->getSqliteReader()==
nullptr) {
63 SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
64 if(!geoModel.isValid()) {
65 throw std::runtime_error (
"Cannot locate GeoModelSvc");
89 if ( a_name ==
"LArExpHallOutOfTimeCut" )
return 2.5*
CLHEP::ns;
90 if ( a_name ==
"LArExpHallInnerRadius" )
return (*m_c->atlasMother)[1]->getDouble(
"RMIN")*
CLHEP::cm;
91 if ( a_name ==
"LArExpHallOuterRadius" )
return (*m_c->atlasMother)[1]->getDouble(
"RMAX")*
CLHEP::cm;
92 if ( a_name ==
"LArExpHallZmax" )
return (*m_c->atlasMother)[1]->getDouble(
"ZMAX")*
CLHEP::cm;
95 std::string errMessage =
"RALExperimentalHall::GetValue: could not find a match for the key '" + a_name;
96 std::cerr << errMessage << std::endl;
97 throw std::runtime_error (errMessage.c_str());