We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 951505c commit 462fcebCopy full SHA for 462fceb
1 file changed
MCStepLogger/src/MCStepLoggerImpl.cxx
@@ -336,6 +336,7 @@ class StepLogger
336
// pointers to dissallow construction at each library load
337
StepLogger* logger;
338
FieldLogger* fieldlogger;
339
+bool doFieldLogging = std::getenv("MCSTEPLOG_NO_FIELD") ? false : true;
340
} // namespace o2
341
342
// a helper template kernel describing generically the redispatching prodecure
@@ -407,8 +408,10 @@ extern "C" void performLogging(TVirtualMCApplication* app)
407
408
409
extern "C" void logField(double const* p, double const* b)
410
{
- static TVirtualMC* mc = TVirtualMC::GetMC();
411
- o2::fieldlogger->addStep(mc, p, b);
+ if (o2::doFieldLogging) {
412
+ static TVirtualMC* mc = TVirtualMC::GetMC();
413
+ o2::fieldlogger->addStep(mc, p, b);
414
+ }
415
}
416
417
extern "C" void initLogger()
0 commit comments