00001 #include "DataFormats/Provenance/interface/ProductID.h" 00002 #include <ostream> 00003 #include <algorithm> 00004 00005 namespace edm { 00006 std::ostream& 00007 operator<<(std::ostream& os, ProductID const& id) { 00008 os << id.processIndex() << ":" << id.productIndex(); 00009 return os; 00010 } 00011 00012 bool operator<(ProductID const& lh, ProductID const& rh) { 00013 return lh.processIndex() < rh.processIndex() || 00014 (lh.processIndex() == rh.processIndex() && lh.productIndex() < rh.productIndex()); 00015 } 00016 00017 void ProductID::swap(ProductID& other) { 00018 std::swap(processIndex_, other.processIndex_); 00019 std::swap(productIndex_, other.productIndex_); 00020 } 00021 }