File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ class StepLogger
214214
215215 std::vector<StepInfo> container;
216216 bool mTTreeIO = false ;
217+ bool mVolMapInitialized = false ;
217218
218219 public:
219220 StepLogger ()
@@ -223,15 +224,20 @@ class StepLogger
223224 if (std::getenv (" MCSTEPLOG_TTREE" )) {
224225 mTTreeIO = true ;
225226 }
226- // try to load the volumename -> modulename mapping
227- initVolumeMap ();
227+
228228
229229 // init the sensitive volume stuff
230230 StepInfo::lookupstructures.initSensitiveVolLookup (getSensitiveVolFile ());
231231 }
232232
233233 void addStep (TVirtualMC* mc)
234234 {
235+ if (!mVolMapInitialized ) {
236+ // try to load the volumename -> modulename mapping
237+ initVolumeMap ();
238+ mVolMapInitialized = true ;
239+ }
240+
235241 if (mTTreeIO ) {
236242 container.emplace_back (mc);
237243 } else {
You can’t perform that action at this time.
0 commit comments