28 "If LayerMaterialMapKey is not set, then fall back to retrieving this from the detector store.");
39 return StatusCode::SUCCESS;
47 if (!m_layerMaterialMapKey.key().empty()) {
49 layerMaterialMap = *layerMaterialMapH;
54 dumpMaterialMap (*layerMaterialMap);
63 if (
process(*worldVolume, *layerMaterialMap, 0).isFailure() ) {
64 ATH_MSG_FATAL(
"Could not load material maps for provided TrackingGeometry, abort job.");
65 return StatusCode::FAILURE;
72 int layCount = bLayerIter.second;
79 ATH_MSG_DEBUG(
"---[B] Boundary layer with " << layCount <<
" references : successfully loaded material map for layer " << layIndex );
83 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on layer. Aborting.");
84 return StatusCode::FAILURE;
89 return StatusCode::SUCCESS;
92 ATH_MSG_FATAL(
"No highest level TrackingVolume found. Stopping recursive parsing, abort job.");
93 return StatusCode::FAILURE;
102 if (!m_layerMaterialMapKey.key().empty()) {
104 layerMaterialMap = *layerMaterialMapH;
109 dumpMaterialMap (*layerMaterialMap);
111 return StatusCode::SUCCESS;
119 std::stringstream displayBuffer;
120 for (
size_t il = 0;
il <
level; ++
il) displayBuffer <<
" ";
132 for (
const auto & layIter :
layers ){
134 ATH_MSG_WARNING(
"Zero-pointer found in LayerArray - indicates problem !");
137 int layIndex = layIter->layerIndex().value();
141 ATH_MSG_DEBUG(displayBuffer.str() <<
"---[M] Material layer: successfully loaded material map for layer " << layIndex );
142 else if (
sc.isRecoverable())
143 ATH_MSG_WARNING(
"Failed to call process(const Layer&) on layers - but recoverable.");
145 ATH_MSG_FATAL(
"Failed to call process(const Layer&) on layer. Aborting.");
146 return StatusCode::FAILURE;
149 ATH_MSG_DEBUG(displayBuffer.str() <<
"---[o] Navigation layer: skipping.");
157 if (confinedVolumes) {
160 for (; volumesIter != volumes.end(); ++volumesIter){
162 ATH_MSG_WARNING(
"Zero-pointer found in VolumeArray - indicates problem !");
163 if ((*volumesIter) &&
process(**volumesIter, layerMaterialMap, ++
level).isFailure() ){
164 ATH_MSG_FATAL(
"Failed to call process(const TrackingVolume&) on confined volumes. Aborting.");
165 return StatusCode::FAILURE;
171 return StatusCode::SUCCESS;
179 if (!m_layerMaterialMapKey.key().empty()) {
181 m_layerMaterialMapKey);
182 layerMaterialMap = *layerMaterialMapH;
186 dumpMaterialMap(*layerMaterialMap);
188 return StatusCode::SUCCESS;
198 return StatusCode::SUCCESS;
204 std::stringstream displayBuffer;
206 displayBuffer <<
" ";
209 auto lmIter = layerMaterialMap.find(lIndex);
210 if (lmIter != layerMaterialMap.end()) {
212 <<
"---[+] found material for Layer with Index: "
216 <<
"---[!] the Layer is not owned by the "
217 "TrackingGeometry, could indicate problem.");
220 <<
"---[+] the Layer is owned by the TrackingGeometry.");
225 <<
"---[!] could not find material for Layer with Index: "
227 return StatusCode::RECOVERABLE;
229 return StatusCode::SUCCESS;
234 return StatusCode::SUCCESS;
243 if (!
flag.test_and_set()) {
244 ATH_MSG_VERBOSE(
"Listing the layer indeces found in the loaded LayerMaterialMap");
245 for (
const auto & lmIter : layerMaterialMap ){
246 ATH_MSG_VERBOSE(
" -> Found map for layer with index " << lmIter.first);