Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:01

0001 #ifndef DataFormats_Provenance_EventEntryInfo_h
0002 #define DataFormats_Provenance_EventEntryInfo_h
0003 
0004 /*----------------------------------------------------------------------
0005   
0006 EventEntryInfo: The event dependent portion of the description of a product
0007 and how it came into existence, plus the product identifier.
0008 
0009 ----------------------------------------------------------------------*/
0010 #include <iosfwd>
0011 #include <vector>
0012 
0013 #include "DataFormats/Provenance/interface/BranchID.h"
0014 #include "DataFormats/Provenance/interface/EntryDescriptionID.h"
0015 #include "DataFormats/Provenance/interface/ProductID.h"
0016 
0017 /*
0018   EventEntryInfo
0019 */
0020 
0021 namespace edm {
0022   class EventEntryDescription;
0023   class EventEntryInfo {
0024   public:
0025     EventEntryInfo();
0026     ~EventEntryInfo();
0027 
0028     void write(std::ostream& os) const;
0029 
0030     BranchID const& branchID() const { return branchID_; }
0031     ProductID const& productID() const { return productID_; }
0032     EntryDescriptionID const& entryDescriptionID() const { return entryDescriptionID_; }
0033 
0034   private:
0035     BranchID branchID_;
0036     ProductID productID_;
0037     EntryDescriptionID entryDescriptionID_;
0038   };
0039 
0040   inline bool operator<(EventEntryInfo const& a, EventEntryInfo const& b) { return a.branchID() < b.branchID(); }
0041 
0042   inline std::ostream& operator<<(std::ostream& os, EventEntryInfo const& p) {
0043     p.write(os);
0044     return os;
0045   }
0046 
0047   // Only the 'salient attributes' are testing in equality comparison.
0048   bool operator==(EventEntryInfo const& a, EventEntryInfo const& b);
0049   inline bool operator!=(EventEntryInfo const& a, EventEntryInfo const& b) { return !(a == b); }
0050   typedef std::vector<EventEntryInfo> EventEntryInfoVector;
0051 }  // namespace edm
0052 #endif