Create the geometry.
83{
84 ATH_MSG_INFO(
"Trk::TrackingGeometrySvc::trackingGeometryInit");
85
86 SmartIF<StoreGateSvc>
detStore{service(
"DetectorStore")};
88
89
90
93 return StatusCode::FAILURE;
96 << " not properly configured. No GeometryBuilder defined. Aborting.");
97 return StatusCode::FAILURE;
98 } else {
100 }
101
102
104 return StatusCode::SUCCESS;
105 }
106
107
108
109 if (needsInit) {
110 ATH_MSG_INFO(
"trackingGeometryInit - initialize on TagInfoMgr callback");
111
112
114
115#ifdef TRKDETDESCR_MEMUSAGE
116
117 ATH_MSG_INFO(
"[ memory usage ] Start to monitor memory usage of PID: " << getpid());
118
119 m_memoryLogger.refresh(getpid());
121
122 m_changeVsize = (-1.) * m_memoryLogger.vmSize();
123 m_changeRss = (-1.) * m_memoryLogger.vmRss();
124#endif
125
126
128
129#ifdef TRKDETDESCR_MEMUSAGE
130 ATH_MSG_INFO(
"[ memory usage ] TrackingGeometry retrieved: ");
131 m_memoryLogger.refresh(getpid());
133#endif
134
135
136 Trk::TrackingGeometry* atlasTrackingGeometry =
const_cast<Trk::TrackingGeometry*
>(
m_trackingGeometry);
137
138
141
142 const Trk::TrackingGeometry* oldTrackingGeometry = nullptr;
145 if (oldTrackingGeometry &&
detStore->remove<Trk::TrackingGeometry>(oldTrackingGeometry).isFailure())
147
148 delete oldTrackingGeometry;
149 }
150
151
154 for (; gpIter != gpIterE; ++gpIter) {
155 if ((*gpIter)->process(*atlasTrackingGeometry).isFailure()) {
156 ATH_MSG_FATAL(
"Processing of TrackingGeometry did not succeed. Abort.");
157 return StatusCode::FAILURE;
158 } else {
159 ATH_MSG_VERBOSE(
"Successfully processed the TrackingGeometry with " << (*gpIter));
160#ifdef TRKDETDESCR_MEMUSAGE
161 ATH_MSG_INFO(
"[ memory usage ] After processing with " << (*gpIter));
162 m_memoryLogger.refresh(getpid());
164#endif
165 }
166 }
167
170 } else {
172 << "' built and written to DetectorStore.");
173 }
174 }
175 return StatusCode::SUCCESS;
176}
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< bool > m_rerunOnCallback
< processors to help
ToolHandle< Trk::IGeometryBuilder > m_trackingGeometryBuilder
the actual building tool
Gaudi::Property< std::string > m_trackingGeometryName
the name of the TrackingGeometry