Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "DataFormats/Provenance/interface/ElementID.h"
0002 #include <algorithm>
0003 #include <ostream>
0004 
0005 namespace edm {
0006   void ElementID::swap(ElementID& other) {
0007     std::swap(index_, other.index_);
0008     edm::swap(id_, other.id_);
0009   }
0010 
0011   bool operator<(ElementID const& lh, ElementID const& rh) {
0012     return lh.id() < rh.id() || (lh.id() == rh.id() && lh.index() < rh.index());
0013   }
0014 
0015   std::ostream& operator<<(std::ostream& os, ElementID const& id) {
0016     os << id.id() << ":" << id.index();
0017     return os;
0018   }
0019 }  // namespace edm