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

#include <SiStripLatency.h>

Public Member Functions

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

Detailed Description

Definition at line 128 of file SiStripLatency.h.

Member Function Documentation

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

Definition at line 130 of file SiStripLatency.h.

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

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