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 and the status. 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 #include "DataFormats/Provenance/interface/ProductStatus.h" 00017 00018 /* 00019 EventEntryInfo 00020 */ 00021 00022 namespace edm { 00023 class EventEntryDescription; 00024 class EventEntryInfo { 00025 public: 00026 EventEntryInfo(); 00027 ~EventEntryInfo(); 00028 00029 void write(std::ostream& os) const; 00030 00031 BranchID const& branchID() const {return branchID_;} 00032 ProductID const& productID() const {return productID_;} 00033 ProductStatus const& productStatus() const {return productStatus_;} 00034 EntryDescriptionID const& entryDescriptionID() const {return entryDescriptionID_;} 00035 00036 private: 00037 00038 BranchID branchID_; 00039 ProductID productID_; 00040 ProductStatus productStatus_; 00041 EntryDescriptionID entryDescriptionID_; 00042 }; 00043 00044 inline 00045 bool 00046 operator < (EventEntryInfo const& a, EventEntryInfo const& b) { 00047 return a.branchID() < b.branchID(); 00048 } 00049 00050 inline 00051 std::ostream& 00052 operator<<(std::ostream& os, EventEntryInfo const& p) { 00053 p.write(os); 00054 return os; 00055 } 00056 00057 // Only the 'salient attributes' are testing in equality comparison. 00058 bool operator==(EventEntryInfo const& a, EventEntryInfo const& b); 00059 inline bool operator!=(EventEntryInfo const& a, EventEntryInfo const& b) { return !(a==b); } 00060 typedef std::vector<EventEntryInfo> EventEntryInfoVector; 00061 } 00062 #endif