20 using namespace genie;
21 using namespace genie::utils;
27 history.
Print(stream);
59 <<
"Input GHEP record snapshot is null. Is not added at history record";
63 if( this->count(step) == 0 ) {
66 <<
"Adding GHEP snapshot for processing step: " << step;
69 this->insert( map<int, GHepRecord*>::value_type(step,snapshot));
76 <<
"GHEP snapshot for processing step: " << step <<
" already exists!";
82 LOG(
"GHEP",
pNOTICE) <<
"Purging GHEP history buffer";
84 GHepRecordHistory::iterator history_iter;
85 for(history_iter = this->begin();
86 history_iter != this->end(); ++history_iter) {
88 int step = history_iter->first;
90 <<
"Deleting GHEP snapshot for processing step: " << step;
109 <<
"Purging recent GHEP history buffer (processing step >= "
110 << start_step <<
")";
112 if(start_step < -1) {
114 <<
"Invalid starting step: " << start_step <<
" - Ignoring";
118 if(start_step == -1) {
124 GHepRecordHistory::iterator history_iter;
125 for(history_iter = this->begin();
126 history_iter != this->end(); ++history_iter) {
128 if(history_iter->first >= start_step) {
129 int step = history_iter->first;
131 <<
"Deleting GHEP snapshot for processing step: " << step;
132 this->erase(history_iter);
141 GHepRecordHistory::const_iterator history_iter;
142 for(history_iter = history.begin();
143 history_iter != history.end(); ++history_iter) {
145 unsigned int step = history_iter->first;
154 stream <<
"\n ****** Printing GHEP record history"
155 <<
" [depth: " << this->size() <<
"]" << endl;
157 GHepRecordHistory::const_iterator history_iter;
158 for(history_iter = this->begin();
159 history_iter != this->end(); ++history_iter) {
161 unsigned int step = history_iter->first;
164 stream <<
"\n[After processing step = " << step <<
"] :";
168 <<
"** ERR: No history record available for this processing step!";
177 if (gSystem->Getenv(
"GHEPHISTENABLE")) {
179 string envvar = string(gSystem->Getenv(
"GHEPHISTENABLE"));
190 LOG(
"GHEP",
pINFO) <<
"GHEP History Flags: ";
191 LOG(
"GHEP",
pINFO) <<
" - Keep Full History: "
193 LOG(
"GHEP",
pINFO) <<
" - Keep Bootstrap Record Only: "
bool fEnabledBootstrapStep
keep only the record that bootsrapped the generation cycle
Holds the history of the GHEP event record as it being modified by the processing steps of an event g...
string BoolAsYNString(bool b)
void Print(ostream &stream) const
void PurgeRecentHistory(int start_step)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void AddSnapshot(int step, GHepRecord *r)
void Copy(const GHepRecordHistory &history)
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
bool fEnabledFull
keep the full GHEP record history
vector< vector< double > > clear
GENIE's GHEP MC event record.