5 #include "GaudiKernel/MsgStream.h"
6 #include "GaudiKernel/Bootstrap.h"
7 #include "GaudiKernel/ISvcLocator.h"
8 #include "GaudiKernel/SystemOfUnits.h"
23 ISvcLocator *svcLocator = Gaudi::svcLocator();
25 SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
26 if(!geoModel.isValid())
27 throw std::runtime_error(
"Error in HECDetectorManager, cannot access GeoModelSvc");
29 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service(
"GeoDbTagSvc")};
30 if(!geoDbTagSvc.isValid())
31 throw std::runtime_error(
"Error in HECDetectorManager, cannot access GeoDbTagSvc");
33 SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service(geoDbTagSvc->getParamSvcName())};
34 if(!rdbAccess.isValid())
35 throw std::runtime_error(
"Error in HECDetectorManager, cannot access RDBAccessSvc");
37 std::string larKey, larNode;
38 if(geoDbTagSvc->getSqliteReader()==
nullptr) {
40 larKey = larVersionKey.
tag();
41 larNode = larVersionKey.
node();
44 IRDBRecordset_ptr barrelLongDiv = rdbAccess->getRecordsetPtr(
"BarrelLongDiv", larKey, larNode);
45 if (barrelLongDiv->size()==0)
throw std::runtime_error(
"Error getting BarrelLongDiv table");
47 IRDBRecordset_ptr barrelGeometry = rdbAccess->getRecordsetPtr(
"BarrelGeometry", larKey, larNode);
48 if (barrelGeometry->size()==0)
throw std::runtime_error(
"Error getting BarrelGeometry table");
50 IRDBRecordset_ptr presamplerGeometry = rdbAccess->getRecordsetPtr(
"PresamplerGeometry", larKey, larNode);
51 if (presamplerGeometry->size()==0)
throw std::runtime_error(
"Error getting PresamplerGeometry table");
53 IRDBRecordset_ptr embSampSep = rdbAccess->getRecordsetPtr(
"EMBSampSep", larKey, larNode);
54 if (embSampSep->size()==0) {
55 embSampSep = rdbAccess->getRecordsetPtr(
"EMBSampSep",
"EMBSampSep-00");
56 if (embSampSep->size()==0) {
57 throw std::runtime_error(
"Error getting EMBSampSep table");
64 for (
int i=0;
i<8;
i++)
m_EE.push_back((*barrelLongDiv)[0]->getDouble(
"EE",
i));
68 int sampSepSize = embSampSep->size();
70 for (
int i{0};
i<sampSepSize; ++
i) {