CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/DataFormats/Provenance/interface/EventEntryInfo.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_EventEntryInfo_h
00002 #define DataFormats_Provenance_EventEntryInfo_h
00003 
00004 /*----------------------------------------------------------------------
00005   
00006 EventEntryInfo: The event dependent portion of the description of a product
00007 and how it came into existence, plus the product identifier.
00008 
00009 ----------------------------------------------------------------------*/
00010 #include <iosfwd>
00011 #include <vector>
00012 
00013 #include "DataFormats/Provenance/interface/BranchID.h"
00014 #include "DataFormats/Provenance/interface/EntryDescriptionID.h"
00015 #include "DataFormats/Provenance/interface/ProductID.h"
00016 
00017 /*
00018   EventEntryInfo
00019 */
00020 
00021 namespace edm {
00022   class EventEntryDescription;
00023   class EventEntryInfo {
00024   public:
00025     EventEntryInfo();
00026     ~EventEntryInfo();
00027 
00028     void write(std::ostream& os) const;
00029 
00030     BranchID const& branchID() const {return branchID_;}
00031     ProductID const& productID() const {return productID_;}
00032     EntryDescriptionID const& entryDescriptionID() const {return entryDescriptionID_;}
00033 
00034   private:
00035 
00036     BranchID branchID_;
00037     ProductID productID_;
00038     EntryDescriptionID entryDescriptionID_;
00039   };
00040 
00041   inline
00042   bool
00043   operator < (EventEntryInfo const& a, EventEntryInfo const& b) {
00044     return a.branchID() < b.branchID();
00045   }
00046   
00047   inline
00048   std::ostream&
00049   operator<<(std::ostream& os, EventEntryInfo const& p) {
00050     p.write(os);
00051     return os;
00052   }
00053 
00054   // Only the 'salient attributes' are testing in equality comparison.
00055   bool operator==(EventEntryInfo const& a, EventEntryInfo const& b);
00056   inline bool operator!=(EventEntryInfo const& a, EventEntryInfo const& b) { return !(a==b); }
00057   typedef std::vector<EventEntryInfo> EventEntryInfoVector;
00058 }
00059 #endif