CMS 3D CMS Logo

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