Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef EcalRecHitComparison_H
0002 #define EcalRecHitComparison_H
0003 
0004 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0005 
0006 //ordering capability mandatory for lazy getter framework
0007 // Comparison operators
0008 inline bool operator<(const EcalRecHit& one, const EcalRecHit& other) {
0009   if (one.detid() == other.detid()) {
0010     return one.energy() < other.energy();
0011   }
0012   return one.detid() < other.detid();
0013 }
0014 
0015 inline bool operator<(const EcalRecHit& one, const uint32_t& detid) { return one.detid() < detid; }
0016 
0017 inline bool operator<(const uint32_t& detid, const EcalRecHit& other) { return detid < other.detid(); }
0018 
0019 #endif