Destructor.
196 :
m_c(
new Clockwork())
198 ISvcLocator *svcLocator = Gaudi::svcLocator();
200 SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
201 if(!geoModel.isValid())
202 throw std::runtime_error(
"Error in HECDetectorManager, cannot access GeoModelSvc");
204 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service(
"GeoDbTagSvc")};
205 if(!geoDbTagSvc.isValid())
206 throw std::runtime_error(
"Error in HECDetectorManager, cannot access GeoDbTagSvc");
208 SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service(geoDbTagSvc->getParamSvcName())};
209 if(!rdbAccess.isValid())
210 throw std::runtime_error(
"Error in HECDetectorManager, cannot access RDBAccessSvc");
213 throw std::runtime_error(
"Error in HECDetectorManager, cannot access DetectorStore");
215 std::string detectorKey, detectorNode;
217 if(geoDbTagSvc->getSqliteReader()==
nullptr) {
219 std::string LArVersion = geoModel->LAr_VersionOverride();
221 detectorKey = LArVersion.empty() ?
AtlasVersion : LArVersion;
222 detectorNode = LArVersion.empty() ?
"ATLAS" :
"LAr";
225 IRDBRecordset_ptr barrelGeometry = rdbAccess->getRecordsetPtr(
"BarrelGeometry",detectorKey,detectorNode);
226 if (barrelGeometry->size()==0) {
227 throw std::runtime_error(
"Cannot find the BarrelGeometry Table");
230 IRDBRecordset_ptr barrelLongDiv = rdbAccess->getRecordsetPtr(
"BarrelLongDiv",detectorKey,detectorNode);
231 if (barrelLongDiv->size()==0) {
232 throw std::runtime_error(
"Cannot find the BarrelLongDiv Table");
236 m_c->
Nbrt = (*barrelGeometry)[0]->getInt(
"NBRT");
240 m_c->
gam0 = (*barrelGeometry)[0]->getDouble(
"PHIFIRST");
245 for (
int idat = 0; idat <
m_c->
Nbrt1 ; idat++)
261 m_c->
NCellTot = (*barrelGeometry)[0]->getInt(
"NCELMX");