diff --git a/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h b/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h index 3974be4d0ab..4635f8f9c7d 100644 --- a/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h +++ b/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h @@ -17765,6 +17765,22 @@ void ExitFunction(const char* functionName) //============================================================ +void printEnvironment() +{ + // Print the content of selected environment variables. + + LOGF(info, ""); + LOGF(info, "Environment variables:"); + LOGF(info, " O2_ROOT = %s", std::getenv("O2_ROOT")); + LOGF(info, " O2PHYSICS_ROOT = %s", std::getenv("O2PHYSICS_ROOT")); + LOGF(info, " ROOT_RELEASE = %s", std::getenv("ROOT_RELEASE")); + LOGF(info, " ROOTSYS = %s", std::getenv("ROOTSYS")); + LOGF(info, ""); + +} // void printEnvironment() + +//============================================================ + void BailOut(bool finalBailout = false) { // Use only locally - bail out if maximum number of events was reached, and dump all results by that point in a local ROOT file. @@ -19264,6 +19280,11 @@ void Steer(T1 const& collision, T2 const& bcs, T3 const& tracks) // memStatus: ~50K (without differential q-vectors and eta separations) + // *) Print environment: + if (tc.fVerbose) { + printEnvironment(); + } + // *) Dry run: if (tc.fDryRun) { EventCounterForDryRun(eFill); @@ -19401,6 +19422,11 @@ void Steer(T1 const& collision, T2 const& bcs, T3 const& tracks) tc.fTimer[eGlobal]->Continue(); // yes } + // *) Print environment: + if (tc.fVerbose) { + printEnvironment(); + } + if (tc.fVerbose) { ExitFunction(__FUNCTION__); } diff --git a/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ab.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ab.cxx index 7376fa31ba7..2149497f2fc 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ab.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ab.cxx @@ -145,6 +145,9 @@ struct MultiparticleCorrelationsAB // this name is used in lower-case format to bool oldHistAddStatus = TH1::AddDirectoryStatus(); TH1::AddDirectory(kFALSE); + // *) Print environment (here I always print it, in Steer(...) only if verbose is set to true): + printEnvironment(); + // *) Default configuration, booking, binning and cuts: insanityChecksOnDefinitionsOfConfigurables(); // values passed via configurables are insanitized here. Nothing is initialized yet via configurables in this method defaultConfiguration(); // here default values from configurables are taken into account