20 using namespace genie;
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";
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) {
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);
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;
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: " end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
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...
THE MAIN GENIE PROJECT NAMESPACE
string BoolAsYNString(bool b)
void Print(ostream &stream) const
ostream & operator<<(ostream &stream, const T2KEvGenMetaData &md)
void PurgeRecentHistory(int start_step)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
#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)
bool fEnabledFull
keep the full GHEP record history
vector< vector< double > > clear
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
GENIE's GHEP MC event record.
Root of GENIE utility namespaces.
QTextStream & endl(QTextStream &s)