CMS 3D CMS Logo

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 130 of file SiStripLatency.h.

Member Function Documentation

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

Definition at line 132 of file SiStripLatency.h.

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

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