CMS 3D CMS Logo

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

#include <DetGeomDesc.h>

Public Member Functions

bool operator() (const DetGeomDesc &a, const DetGeomDesc &b) const
 

Detailed Description

Definition at line 152 of file DetGeomDesc.h.

Member Function Documentation

bool DetGeomDescCompare::operator() ( const DetGeomDesc a,
const DetGeomDesc b 
) const
inline

Definition at line 153 of file DetGeomDesc.h.

References DetGeomDesc::copyno(), DetGeomDesc::geographicalID(), and DetGeomDesc::name().

153  {
154  return (a.geographicalID() != b.geographicalID()
155  ? a.geographicalID() < b.geographicalID() // Sort by DetId
156  // If DetIds are identical (== 0 for non-sensors), sort by name and copy number.
157  : (a.name() != b.name() ? a.name() < b.name() : a.copyno() < b.copyno()));
158  }
DetId geographicalID() const
Definition: DetGeomDesc.h:102
const std::string & name() const
Definition: DetGeomDesc.h:73
int copyno() const
Definition: DetGeomDesc.h:74