18 #include <TObjString.h> 25 using std::ostringstream;
27 using namespace genie;
43 if (fEnv)
delete fEnv;
47 <<
"Taking environment snapshot and saving it in a TFolder";
49 fEnv = gROOT->GetRootFolder()->AddFolder(
"genv",
"GENIE user environment");
50 gROOT->GetListOfBrowsables()->Add(fEnv,
"genv");
54 vector<string> envvars;
58 envvars.push_back(
string(
kMCEnv[ivar]));
62 LOG(
"Ntp",
pINFO) <<
"** MC Job Environment:";
64 for(variter = envvars.begin(); variter != envvars.end(); ++variter) {
67 string var = *variter;
68 string value = (gSystem->Getenv(var.c_str()) ?
69 gSystem->Getenv(var.c_str()) :
"UNDEFINED");
73 entry <<
"envv:" << var <<
";value:" <<
value;
74 fEnv->Add(
new TObjString(entry.str().c_str()));
THE MAIN GENIE PROJECT NAMESPACE
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static const char * kMCEnv[]
Misc GENIE control constants.
TFolder * TakeSnapshot(void)