CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
SiStripLatency::OrderByLatencyAndMode Struct Reference

Public Member Functions

bool operator() (const Latency &lat1, const Latency &lat2)
 

Detailed Description

Definition at line 126 of file SiStripLatency.h.

Member Function Documentation

bool SiStripLatency::OrderByLatencyAndMode::operator() ( const Latency lat1,
const Latency lat2 
)
inline

Definition at line 128 of file SiStripLatency.h.

References SiStripLatency::Latency::latency, and SiStripLatency::Latency::mode.

128  {
129  // latency and mode are unsigned short that cannot exceed 255.
130  // Sum them multiplying the mode by 1000 to get a single ordering number.
131  int latencyAndModeSortValue1 = int(lat1.latency) + 1000*int(lat1.mode);
132  int latencyAndModeSortValue2 = int(lat2.latency) + 1000*int(lat2.mode);
133  return( latencyAndModeSortValue1 < latencyAndModeSortValue2 );
134  }