7 #include "GaudiKernel/EventContext.h"
13 ISvcLocator* pSvcLocator)
23 ATH_CHECK(m_trackingGeometryWriteKey.initialize());
25 ATH_CHECK(m_trackingGeometryBuilder.retrieve());
26 if (m_geometryProcessors.retrieve().isFailure()){
27 ATH_MSG_FATAL(
"Could not retrieve " << m_geometryProcessors );
28 return StatusCode::FAILURE;
30 return StatusCode::SUCCESS;
35 const EventContext& ctx = Gaudi::Hive::currentContext();
37 if (writeHandle.isValid()) {
39 return StatusCode::SUCCESS;
45 std::unique_ptr<Trk::TrackingGeometry> trackingGeometry =
46 m_trackingGeometryBuilder->trackingGeometry(ctx,
nullptr, writeHandle);
49 auto gpIter = m_geometryProcessors.begin();
50 auto gpIterE = m_geometryProcessors.end();
51 for (; gpIter != gpIterE; ++gpIter) {
52 if ((*gpIter)->process(*trackingGeometry).isFailure()) {
53 ATH_MSG_FATAL(
"Processing of TrackingGeometry did not succeed. Abort.");
54 return StatusCode::FAILURE;
60 if (m_dumpGeo) trackingGeometry->
dump(msgStream(),
"TrackingGeometryCondAlg");
61 ATH_CHECK(writeHandle.record(std::move(trackingGeometry)));
63 return StatusCode::SUCCESS;