CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/Provenance/interface/EventEntryDescription.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_EventEntryDescription_h
00002 #define DataFormats_Provenance_EventEntryDescription_h
00003 
00004 /*----------------------------------------------------------------------
00005   
00006 EventEntryDescription: The event dependent portion of the description of a product
00007 and how it came into existence.
00008 
00009 ----------------------------------------------------------------------*/
00010 #include <iosfwd>
00011 #include <vector>
00012 
00013 #include "DataFormats/Provenance/interface/BranchID.h"
00014 #include "DataFormats/Provenance/interface/EntryDescriptionID.h"
00015 
00016 /*
00017   EventEntryDescription
00018 
00019   definitions:
00020   Product: The EDProduct to which a provenance object is associated
00021 
00022   Creator: The EDProducer that made the product.
00023 
00024   Parents: The EDProducts used as input by the creator.
00025 */
00026 
00027 namespace edm {
00028   class EventEntryDescription {
00029   public:
00030     EventEntryDescription();
00031 
00032     ~EventEntryDescription() {}
00033 
00034     // Only the 'salient attributes' are encoded into the ID.
00035     EntryDescriptionID id() const;
00036 
00037     void write(std::ostream& os) const;
00038 
00039     std::vector<BranchID> const& parents() const {return parents_;}
00040     std::vector<BranchID> & parents() {return parents_;}
00041 
00042   private:
00043 
00044     // The Branch IDs of the parents
00045     std::vector<BranchID> parents_;
00046 
00047     Hash<ModuleDescriptionType> moduleDescriptionID_;
00048   };
00049   
00050   inline
00051   std::ostream&
00052   operator<<(std::ostream& os, EventEntryDescription const& p) {
00053     p.write(os);
00054     return os;
00055   }
00056 
00057   // Only the 'salient attributes' are testing in equality comparison.
00058   bool operator==(EventEntryDescription const& a, EventEntryDescription const& b);
00059   inline bool operator!=(EventEntryDescription const& a, EventEntryDescription const& b) { return !(a==b); }
00060 }
00061 #endif