CMS 3D CMS Logo

EntryDescription.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_EntryDescription_h
00002 #define DataFormats_Provenance_EntryDescription_h
00003 
00004 /*----------------------------------------------------------------------
00005   
00006 EntryDescription: 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 #include "boost/shared_ptr.hpp"
00013 
00014 #include "DataFormats/Provenance/interface/ProductID.h"
00015 #include "DataFormats/Provenance/interface/ModuleDescription.h"
00016 #include "DataFormats/Provenance/interface/EntryDescriptionID.h"
00017 
00018 /*
00019   EntryDescription
00020 
00021   definitions:
00022   Product: The EDProduct to which a provenance object is associated
00023 
00024   Creator: The EDProducer that made the product.
00025 
00026   Parents: The EDProducts used as input by the creator.
00027 */
00028 
00029 namespace edm {
00030   class EntryDescription {
00031   public:
00032     EntryDescription();
00033 
00034     ~EntryDescription() {}
00035 
00036     // Only the 'salient attributes' are encoded into the ID.
00037     EntryDescriptionID id() const;
00038 
00039     void write(std::ostream& os) const;
00040 
00041     std::vector<ProductID> const& parents() const {return parents_;}
00042     std::vector<ProductID> & parents() {return parents_;}
00043 
00044     ModuleDescriptionID const& moduleDescriptionID() const {return moduleDescriptionID_;}
00045     ModuleDescriptionID & moduleDescriptionID() {return moduleDescriptionID_;}
00046 
00047 
00048   private:
00049     // The Branch IDs of the parents
00050     std::vector<ProductID> parents_;
00051 
00052     // the last of these is not in the roadmap, but is on the board
00053 
00054     ModuleDescriptionID moduleDescriptionID_;
00055 
00056   };
00057   
00058   inline
00059   std::ostream&
00060   operator<<(std::ostream& os, EntryDescription const& p) {
00061     p.write(os);
00062     return os;
00063   }
00064 
00065   // Only the 'salient attributes' are testing in equality comparison.
00066   bool operator==(EntryDescription const& a, EntryDescription const& b);
00067   inline bool operator!=(EntryDescription const& a, EntryDescription const& b) { return !(a==b); }
00068 }
00069 #endif

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