CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DataFormats/EcalRecHit/interface/EcalRecHitComparison.h

Go to the documentation of this file.
00001 #ifndef EcalRecHitComparison_H
00002 #define EcalRecHitComparison_H
00003 
00004 //ordering capability mandatory for lazy getter framework
00005 // Comparison operators
00006 inline bool operator<( const EcalRecHit& one, const EcalRecHit& other) {
00007   if(one.detid() == other.detid()){ return one.energy() < other.energy(); }
00008   return one.detid() < other.detid();}
00009 
00010 inline bool operator<( const EcalRecHit& one, const uint32_t& detid) {
00011   return one.detid() < detid;}
00012 
00013 inline bool operator<( const uint32_t& detid, const EcalRecHit& other) { 
00014   return detid < other.detid();}
00015 
00016 #endif
00017