CMS 3D CMS Logo

EcalRecHitComparison.h
Go to the documentation of this file.
1 #ifndef EcalRecHitComparison_H
2 #define EcalRecHitComparison_H
3 
5 
6 //ordering capability mandatory for lazy getter framework
7 // Comparison operators
8 inline bool operator<( const EcalRecHit& one, const EcalRecHit& other) {
9  if(one.detid() == other.detid()){ return one.energy() < other.energy(); }
10  return one.detid() < other.detid();}
11 
12 inline bool operator<( const EcalRecHit& one, const uint32_t& detid) {
13  return one.detid() < detid;}
14 
15 inline bool operator<( const uint32_t& detid, const EcalRecHit& other) {
16  return detid < other.detid();}
17 
18 #endif
19 
const DetId & detid() const
Definition: EcalRecHit.h:72
float energy() const
Definition: EcalRecHit.h:68
bool operator<(const EcalRecHit &one, const EcalRecHit &other)