CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
History.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_History_h
2 #define DataFormats_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 // This class is needed for backward compatibility only.
11 // It is relevant if and only if fileFormatVersion.eventHistoryTree() is true.
12 //
13 //
14 //----------------------------------------------------------------------
15 
16 #include <vector>
20 
21 namespace edm {
22  class History {
23  public:
24  typedef std::size_t size_type;
25 
26  // Compiler-generated default c'tor, copy c'tor, assignment and
27  // d'tor are all correct.
28 
29  // Return the number of 'processing steps' recorded in this
30  // History.
31  size_type size() const;
32 
33  // Add the given entry to this History. When a new data member is
34  // added to the History class, this function should be modified to
35  // take an instance of the type of the new data member.
36  void addEventSelectionEntry(EventSelectionID const& eventSelection);
37 
38  void addBranchListIndexEntry(BranchListIndex const& branchListIndex);
39 
41 
43 
45 
47 
49 
51 
53  private:
54 
55  // Note: We could, instead, define a struct that contains the
56  // appropriate information for each history entry, and then contain
57  // only one data member: a vector of this struct. This might make
58  // iteration more convenient. But it would seem to complicate
59  // persistence. The current plan is to have parallel vectors, one
60  // for each type of item stored as data.
62 
64 
66  };
67 
68 }
69 
70 #endif
std::size_t size_type
Definition: History.h:24
int i
Definition: DBlmapReader.cc:9
unsigned short BranchListIndex
void addBranchListIndexEntry(BranchListIndex const &branchListIndex)
Definition: History.cc:16
EventSelectionID const & getEventSelectionID(size_type i) const
Definition: History.cc:21
void addEventSelectionEntry(EventSelectionID const &eventSelection)
Definition: History.cc:11
size_type size() const
Definition: History.cc:6
std::vector< EventSelectionID > EventSelectionIDVector
BranchListIndexes branchListIndexes_
Definition: History.h:63
std::vector< BranchListIndex > BranchListIndexes
EventSelectionIDVector const & eventSelectionIDs() const
Definition: History.h:42
ProcessHistoryID processHistoryID_
Definition: History.h:65
ProcessHistoryID const & processHistoryID() const
Definition: History.h:46
EventSelectionIDVector & eventSelectionIDs()
Definition: History.h:44
BranchListIndexes & branchListIndexes()
Definition: History.h:52
BranchListIndexes const & branchListIndexes() const
Definition: History.h:50
EventSelectionIDVector eventSelections_
Definition: History.h:61
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: History.h:48