CMS 3D CMS Logo

ProductID.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_ProductID_h
00002 #define DataFormats_Provenance_ProductID_h
00003 
00004 /*----------------------------------------------------------------------
00005   
00006 ProductID: A unique identifier for each EDProduct within a process.
00007 
00008 $Id: ProductID.h,v 1.2 2007/04/01 15:39:03 wmtan Exp $
00009 
00010 ----------------------------------------------------------------------*/
00011 
00012 #include <iosfwd>
00013 
00014 namespace edm {
00015   struct ProductID {
00016     ProductID() : id_(0) {}
00017     explicit ProductID(unsigned int id) : id_(id) {}
00018     bool isValid() const { return id_ != 0U; }
00019     unsigned int id() const { return id_; }
00020     unsigned int id_;
00021     bool operator<(ProductID const& rh) const {return id_ < rh.id_;}
00022     bool operator>(ProductID const& rh) const {return id_ > rh.id_;}
00023     bool operator==(ProductID const& rh) const {return id_ == rh.id_;}
00024     bool operator!=(ProductID const& rh) const {return id_ != rh.id_;}
00025   };
00026 
00027   std::ostream&
00028   operator<<(std::ostream& os, ProductID const& id);
00029 }
00030 #endif

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