145 SmartIF<IGeoModelSvc> iGeoModel{pSvcLocator->service(
"GeoModelSvc")};
148 SmartIF<IRDBAccessSvc> iAccessSvc{pSvcLocator->service(
"RDBAccessSvc")};
151 auto warn = [&](
const std::string &
msg){
152 if (
log.level()<=MSG::WARNING){
156 auto debug = [&](
const std::string &
msg){
163 return (loadDefaults and pRecordset->size() == 0);
166 if (loadDefaults)
debug(
"Will load material defaults if not present");
170 m_elements = iAccessSvc->getRecordsetPtr(
"Elements",keyAtlas.tag(),keyAtlas.node());
172 warn(
"Getting Elements with default tag");
173 m_elements = iAccessSvc->getRecordsetPtr(
"Elements",
"Materials-00",
"Materials");
175 m_stdmatcomponents = iAccessSvc->getRecordsetPtr(
"StdMatComponents",keyAtlas.tag(),keyAtlas.node());
177 warn(
"Getting StdMatComponents with default tag");
178 m_stdmatcomponents = iAccessSvc->getRecordsetPtr(
"StdMatComponents",
"Materials-00",
"Materials");
180 m_stdmaterials = iAccessSvc->getRecordsetPtr(
"StdMaterials",keyAtlas.tag(),keyAtlas.node());
182 warn(
"Getting StdMaterials with default tag");
183 m_stdmaterials = iAccessSvc->getRecordsetPtr(
"StdMaterials",
"Materials-00",
"Materials");
188 m_pixmatcomponents = iAccessSvc->getRecordsetPtr(
"PixMatComponents",keyPixel.tag(),keyPixel.node());
190 warn(
"Getting PixMatComponents with default tag");
191 m_pixmatcomponents = iAccessSvc->getRecordsetPtr(
"PixMatComponents",
"PixMatComponents-00");
193 m_pixmaterials = iAccessSvc->getRecordsetPtr(
"PixMaterials",keyPixel.tag(),keyPixel.node());
195 warn(
"Getting PixMaterials with default tag");
196 m_pixmaterials = iAccessSvc->getRecordsetPtr(
"PixMaterials",
"PixMaterials-00");
201 m_pixtbmatcomponents = iAccessSvc->getRecordsetPtr(
"PixelTBMatComponents",keyPixel.tag(),keyPixel.node());
203 debug(
"Getting PixTBMatComponents with default tag" );
206 m_pixtbmaterials = iAccessSvc->getRecordsetPtr(
"PixelTBMaterials",keyPixel.tag(),keyPixel.node());
208 debug(
"Getting PixTBMaterials with default tag");
209 m_pixtbmaterials = iAccessSvc->getRecordsetPtr(
"PixMaterials",
"PixMaterials-00");
214 m_sctmatcomponents = iAccessSvc->getRecordsetPtr(
"SCTMatComponents",keySCT.tag(),keySCT.node());
216 warn(
"Getting SCTMatComponents with default tag");
217 m_sctmatcomponents = iAccessSvc->getRecordsetPtr(
"SCTMatComponents",
"SCTMatComponents-00");
220 m_sctmaterials = iAccessSvc->getRecordsetPtr(
"SCTMaterials",keySCT.tag(),keySCT.node());
222 warn(
"Getting SCTMaterials with default tag");
223 m_sctmaterials = iAccessSvc->getRecordsetPtr(
"SCTMaterials",
"SCTMaterials-00");
228 m_trtmatcomponents = iAccessSvc->getRecordsetPtr(
"TrtMatComponents",keyTRT.tag(),keyTRT.node());
230 warn(
"Getting TrtMatComponents with default tag");
231 m_trtmatcomponents = iAccessSvc->getRecordsetPtr(
"TrtMatComponents",
"TrtMatComponents-00");
233 m_trtmaterials = iAccessSvc->getRecordsetPtr(
"TrtMaterials",keyTRT.tag(),keyTRT.node());
235 warn(
"Getting TrtMaterials with default tag");
236 m_trtmaterials = iAccessSvc->getRecordsetPtr(
"TrtMaterials",
"TrtMaterials-00");
241 m_indetmatcomponents = iAccessSvc->getRecordsetPtr(
"InDetMatComponents",keyInDet.tag(),keyInDet.node());
243 debug(
"Getting InDetMatComponents with default tag");
244 m_indetmatcomponents = iAccessSvc->getRecordsetPtr(
"InDetMatComponents",
"InDetMatComponents-00");
247 m_indetmaterials = iAccessSvc->getRecordsetPtr(
"InDetMaterials",keyInDet.tag(),keyInDet.node());
249 debug(
"Getting InDetMaterials with default tag");
250 m_indetmaterials = iAccessSvc->getRecordsetPtr(
"InDetMaterials",
"InDetMaterials-00");
255 m_larmatcomponents = iAccessSvc->getRecordsetPtr(
"LArMatComponents",keyLAr.tag(),keyLAr.node());
257 warn(
"Getting LArMatComponents with default tag");
258 m_larmatcomponents = iAccessSvc->getRecordsetPtr(
"LArMatComponents",
"LArMatComponents-00");
260 m_larmaterials = iAccessSvc->getRecordsetPtr(
"LArMaterials",keyLAr.tag(),keyLAr.node());
262 warn(
"Getting LArMaterials with default tag");
263 m_larmaterials = iAccessSvc->getRecordsetPtr(
"LArMaterials",
"LArMaterials-00");
268 m_tilematcomponents = iAccessSvc->getRecordsetPtr(
"TileMatComponents",keyTile.tag(),keyTile.node());
270 warn(
"Getting TileMatComponents with default tag" );
271 m_tilematcomponents = iAccessSvc->getRecordsetPtr(
"TileMatComponents",
"TileMatComponents-00");
273 m_tilematerials = iAccessSvc->getRecordsetPtr(
"TileMaterials",keyTile.tag(),keyTile.node());
275 warn(
"Getting TileMaterials with default tag");
276 m_tilematerials = iAccessSvc->getRecordsetPtr(
"TileMaterials",
"TileMaterials-00");
281 m_muomatcomponents = iAccessSvc->getRecordsetPtr(
"MUOMatComponents",keyMuon.tag(),keyMuon.node());
283 warn(
"Getting MUOMatComponents with default tag");
284 m_muomatcomponents = iAccessSvc->getRecordsetPtr(
"MUOMatComponents",
"MUOMatComponents-00");
286 m_muomaterials = iAccessSvc->getRecordsetPtr(
"MUOMaterials",keyMuon.tag(),keyMuon.node());
288 warn(
"Getting MUOMaterials with default tag" );
289 m_muomaterials = iAccessSvc->getRecordsetPtr(
"MUOMaterials",
"MUOMaterials-00");
291 m_shieldmatcomponents = iAccessSvc->getRecordsetPtr(
"ShieldMatComponents",keyMuon.tag(),keyMuon.node());
293 warn(
"Getting ShieldMatComponents with default tag");
296 m_shieldmaterials = iAccessSvc->getRecordsetPtr(
"ShieldMaterials",keyMuon.tag(),keyMuon.node());
298 warn(
"Getting ShieldMaterials with default tag");
299 m_shieldmaterials = iAccessSvc->getRecordsetPtr(
"ShieldMaterials",
"ShieldMaterials-00");
301 m_toromatcomponents = iAccessSvc->getRecordsetPtr(
"ToroMatComponents",keyMuon.tag(),keyMuon.node());
303 warn(
"Getting ToroMatComponents with default tag");
304 m_toromatcomponents = iAccessSvc->getRecordsetPtr(
"ToroMatComponents",
"ToroMatComponents-00");
306 m_toromaterials = iAccessSvc->getRecordsetPtr(
"ToroMaterials",keyMuon.tag(),keyMuon.node());
308 warn(
"Getting ToroMaterials with default tag");
309 m_toromaterials = iAccessSvc->getRecordsetPtr(
"ToroMaterials",
"ToroMaterials-00");
311 return StatusCode::SUCCESS;