GENIEGenerator
Loading...
Searching...
No Matches
GHepRecordHistory.h
Go to the documentation of this file.
1//____________________________________________________________________________
2/*!
3
4\class genie::GHepRecordHistory
5
6\brief Holds the history of the GHEP event record as it being modified by
7 the processing steps of an event generation thread.
8 The event record history can be used to step back in the generation
9 sequence if a processing step is to be re-run (this the GENIE event
10 generation framework equivalent of an 'Undo')
11
12\author Costas Andreopoulos <c.andreopoulos \at cern.ch>
13 University of Liverpool
14
15\created September 23, 2005
16
17\cpright Copyright (c) 2003-2025, The GENIE Collaboration
18 For the full text of the license visit http://copyright.genie-mc.org
19*/
20//____________________________________________________________________________
21
22#ifndef _GHEP_RECORD_HISTORY_H_
23#define _GHEP_RECORD_HISTORY_H_
24
25#include <map>
26#include <string>
27#include <ostream>
28
29using std::map;
30using std::string;
31using std::ostream;
32
33namespace genie {
34
36class GHepRecord;
37
38ostream & operator << (ostream & stream, const GHepRecordHistory & history);
39
40class GHepRecordHistory : public map<int, GHepRecord*> {
41
42public :
43
45 GHepRecordHistory(const GHepRecordHistory & history);
47
48 void AddSnapshot (int step, GHepRecord * r);
49 void PurgeHistory (void);
50 void PurgeRecentHistory (int start_step);
51 void ReadFlags (void);
52
53 void Copy (const GHepRecordHistory & history);
54 void Print (ostream & stream) const;
55
56 friend ostream & operator << (ostream & stream, const GHepRecordHistory & history);
57
58private:
59
60 bool fEnabledFull; ///< keep the full GHEP record history
61 bool fEnabledBootstrapStep; ///< keep only the record that bootsrapped the generation cycle
62};
63
64} // genie namespace
65
66#endif // _GHEP_RECORD_HISTORY_H_
Holds the history of the GHEP event record as it being modified by the processing steps of an event g...
void Print(ostream &stream) const
void AddSnapshot(int step, GHepRecord *r)
bool fEnabledFull
keep the full GHEP record history
void PurgeRecentHistory(int start_step)
bool fEnabledBootstrapStep
keep only the record that bootsrapped the generation cycle
void Copy(const GHepRecordHistory &history)
friend ostream & operator<<(ostream &stream, const GHepRecordHistory &history)
GENIE's GHEP MC event record.
Definition GHepRecord.h:45
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)