ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGMR4::MdtTubeLayerSorter Struct Reference

Helper struct to sort equivalent MdtTubeLayers into a std::set. More...

#include <MdtTubeLayer.h>

Collaboration diagram for MuonGMR4::MdtTubeLayerSorter:

Public Member Functions

bool operator() (const MdtTubeLayer &a, const MdtTubeLayer &b) const
bool operator() (const MdtTubeLayerPtr &a, const MdtTubeLayerPtr &b) const

Detailed Description

Helper struct to sort equivalent MdtTubeLayers into a std::set.

Definition at line 19 of file MdtTubeLayer.h.

Member Function Documentation

◆ operator()() [1/2]

bool MuonGMR4::MdtTubeLayerSorter::operator() ( const MdtTubeLayer & a,
const MdtTubeLayer & b ) const

Definition at line 28 of file MdtTubeLayer.cxx.

28 {
29 // Don't bother calling the underlying comparisons
30 // if the objects are the same. This saves a lot of time.
31 if (a.m_layTrf != b.m_layTrf) {
32 static const GeoTrf::TransformSorter trfSort{};
33 const int trfCmp = trfSort.compare(a.layerTransform(), b.layerTransform());
34 if (trfCmp) return trfCmp < 0;
35 }
36 if (a.m_layerNode != b.m_layerNode) {
37 static const GeoPhysVolSorter physSort{};
38 return physSort(a.m_layerNode, b.m_layerNode);
39 }
40 return false;
41 }
static Double_t a

◆ operator()() [2/2]

bool MuonGMR4::MdtTubeLayerSorter::operator() ( const MdtTubeLayerPtr & a,
const MdtTubeLayerPtr & b ) const

Definition at line 42 of file MdtTubeLayer.cxx.

42 {
43 return (*this)(*a, *b);
44 }

The documentation for this struct was generated from the following files: