ATLAS Offline Software
Loading...
Searching...
No Matches
IdentifierByDetElSorter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONIDHELPERS_IDENTIFIERBYDETELSORTER_H
5#define MUONIDHELPERS_IDENTIFIERBYDETELSORTER_H
6
8
12namespace Muon{
14 template <typename T> concept hasIdentifyConcept = requires (const T theObj){
15 theObj.identify();
16 };
18 public:
20 m_idHelperSvc{idHelperSvc}{}
21
22 bool operator() (const Identifier& a, const Identifier& b) const{
23 const Identifier detA = m_idHelperSvc->detElId(a);
24 const Identifier detB = m_idHelperSvc->detElId(b);
25 if (detA != detB){
26 return detA < detB;
27 }
28 return a < b;
29 }
30 template <typename T>
31 bool operator () (const T* a, const T* b) const requires hasIdentifyConcept<T> {
32 return (*this)(a->identify(), b->identify());
33 }
34
35 template <typename T>
36 bool operator () (const T& a, const T&b) const requires hasIdentifyConcept<T> {
37 return (*this)(a.identify(), b.identify());
38 }
39
40 private:
42
43 };
44}
45
46#endif
47
static Double_t a
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
const Muon::IMuonIdHelperSvc * m_idHelperSvc
IdentifierByDetElSorter(const Muon::IMuonIdHelperSvc *idHelperSvc)
bool operator()(const Identifier &a, const Identifier &b) const
Define the concept that the object needs to have an Identifier method.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.