GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2024, 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 
29 using std::map;
30 using std::string;
31 using std::ostream;
32 
33 namespace genie {
34 
35 class GHepRecordHistory;
36 class GHepRecord;
37 
38 ostream & operator << (ostream & stream, const GHepRecordHistory & history);
39 
40 class GHepRecordHistory : public map<int, GHepRecord*> {
41 
42 public :
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 
58 private:
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_
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...
friend ostream & operator<<(ostream &stream, const GHepRecordHistory &history)
void Print(ostream &stream) const
void PurgeRecentHistory(int start_step)
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
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45