CMS 3D CMS Logo

History.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_History_h
00002 #define DataFormats_Provenance_History_h
00003 
00004 //----------------------------------------------------------------------
00005 //
00006 // Class History represents the processing history of a single Event.
00007 // It includes ordered sequences of elements, each of which contains
00008 // information about a specific 'process' through which the Event has
00009 // passed, with earlier processes at the beginning of the sequence.
00010 //
00011 //
00012 //----------------------------------------------------------------------
00013 
00014 #include <vector>
00015 #include "DataFormats/Provenance/interface/EventSelectionID.h"
00016 #include "DataFormats/Provenance/interface/ProcessHistoryID.h"
00017 
00018 namespace edm
00019 {
00020   class History
00021   {
00022   public:
00023     typedef std::size_t size_type;
00024     
00025     // Compiler-generated default c'tor, copy c'tor, assignment and
00026     // d'tor are all correct.
00027 
00028 
00029     // Return the number of 'processing steps' recorded in this
00030     // History.
00031     size_type size() const;
00032     
00033     // Add the given entry to this History. When a new data member is
00034     // added to the History class, this function should be modified to
00035     // take an instance of the type of the new data member.
00036     void addEntry(EventSelectionID const& eventSelection);
00037     
00038     // Set the process History ID.
00039     void setProcessHistoryID(ProcessHistoryID const& pid);
00040 
00041     EventSelectionID const& getEventSelectionID(size_type i) const;
00042 
00043     EventSelectionIDVector const& eventSelectionIDs() const;
00044     
00045     ProcessHistoryID const& processHistoryID() const;
00046   private:
00047     
00048     // Note: We could, instead, define a struct that contains the
00049     // appropriate information for each history entry, and then contain
00050     // only one data member: a vector of this struct. This might make
00051     // iteration more convenient. But it would seem to complicate
00052     // persistence. The current plan is to have parallel vectors, one
00053     // for each type of item stored as data.
00054     EventSelectionIDVector eventSelections_;
00055 
00056     ProcessHistoryID processHistoryID_;
00057   };
00058 
00059 }
00060 
00061 #endif

Generated on Tue Jun 9 17:31:33 2009 for CMSSW by  doxygen 1.5.4