ATLAS Offline Software
Public Member Functions | List of all members
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 15 of file MdtTubeLayer.cxx.

15  {
16  // Don't bother calling the underlying comparisons
17  // if the objects are the same. This saves a lot of time.
18  if (&a.layerTransform() != &b.layerTransform()) {
19  static const GeoTrf::TransformSorter trfSort{};
20  const int trfCmp = trfSort.compare(a.layerTransform(), b.layerTransform());
21  if (trfCmp) return trfCmp < 0;
22  }
23  if (a.m_layerNode != b.m_layerNode) {
24  static const GeoPhysVolSorter physSort{};
25  return physSort(a.m_layerNode, b.m_layerNode);
26  }
27  return false;
28  }

◆ operator()() [2/2]

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

Definition at line 29 of file MdtTubeLayer.cxx.

29  {
30  return (*this)(*a, *b);
31  }

The documentation for this struct was generated from the following files:
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10