LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
History.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_History_h
2 #define canvas_Persistency_Provenance_History_h
3 
4 //----------------------------------------------------------------------
5 //
6 // Class History represents the processing history of a single Event.
7 // It includes ordered sequences of elements, each of which contains
8 // information about a specific 'process' through which the Event has
9 // passed, with earlier processes at the beginning of the sequence.
10 //
11 //
12 //----------------------------------------------------------------------
13 
17 
18 namespace art {
19  class History {
20  public:
21  typedef std::size_t size_type;
22 
23  // Compiler-generated default c'tor, copy c'tor, assignment and
24  // d'tor are all correct.
25 
26  // Return the number of 'processing steps' recorded in this
27  // History.
28  size_type size() const;
29 
30  // Add the given entry to this History. When a new data member is
31  // added to the History class, this function should be modified to
32  // take an instance of the type of the new data member.
33  void addEventSelectionEntry(EventSelectionID const& eventSelection);
34 
35  void addBranchListIndexEntry(BranchListIndex const& branchListIndex);
36 
37  EventSelectionID const& getEventSelectionID(size_type i) const;
38 
40 
41  ProcessHistoryID const&
43  {
44  return processHistoryID_;
45  }
46 
47  void
49  {
50  processHistoryID_ = phid;
51  }
52 
53  BranchListIndexes const&
55  {
56  return branchListIndexes_;
57  }
58 
61  {
62  return branchListIndexes_;
63  }
64 
65  private:
66  // Note: We could, instead, define a struct that contains the
67  // appropriate information for each history entry, and then contain
68  // only one data member: a vector of this struct. This might make
69  // iteration more convenient. But it would seem to complicate
70  // persistence. The current plan is to have parallel vectors, one
71  // for each type of item stored as data.
73 
75 
77  };
78 }
79 
80 #endif /* canvas_Persistency_Provenance_History_h */
81 
82 // Local Variables:
83 // mode: c++
84 // End:
BranchListIndexes const & branchListIndexes() const
Definition: History.h:54
EventSelectionIDVector eventSelections_
Definition: History.h:72
std::vector< BranchListIndex > BranchListIndexes
ProcessHistoryID const & processHistoryID() const
Definition: History.h:42
ProcessHistoryID processHistoryID_
Definition: History.h:76
std::vector< EventSelectionID > EventSelectionIDVector
void addEventSelectionEntry(EventSelectionID const &eventSelection)
Definition: History.cc:12
BranchListIndexes branchListIndexes_
Definition: History.h:74
EventSelectionID const & getEventSelectionID(size_type i) const
Definition: History.cc:24
EventSelectionIDVector const & eventSelectionIDs() const
Definition: History.cc:30
void setProcessHistoryID(ProcessHistoryID const &phid) const
Definition: History.h:48
BranchListIndexes & branchListIndexes()
Definition: History.h:60
unsigned short BranchListIndex
void addBranchListIndexEntry(BranchListIndex const &branchListIndex)
Definition: History.cc:18
HLT enums.
std::size_t size_type
Definition: History.h:21
size_type size() const
Definition: History.cc:6