ATLAS Offline Software
HistogramId.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HistogramId_H
6 #define HistogramId_H
7 
8 // c - c++
9 #include <map>
10 #include <string>
11 #include <utility>
12 
13 namespace MuonCalib {
14 
15  class MuonFixedId;
16 
24  class HistogramId {
25  public:
27  inline HistogramId() : m_id(0, 0) {}
28 
33  void Initialize(const MuonFixedId &id, int sort_by);
38  inline bool operator>(const HistogramId &other) const { return m_id > other.m_id; }
43  inline bool operator<(const HistogramId &other) const { return m_id < other.m_id; }
45  static const int TUBE = 4, LAYER = 2, MULTILAYER = 1, CHAMBER = 0, MEZZ_CARD = 3;
47  inline int getIdInt() const { return m_id.second; }
49  inline const std::string &HistogramName() const { return m_histogram_name; }
50 
51  private:
53  std::pair<int, int> m_id;
55  std::string m_histogram_name;
56  };
57 
58 } // namespace MuonCalib
59 
60 #endif
MuonCalib::HistogramId::m_id
std::pair< int, int > m_id
integer identity - value depends on the sort_by argument of the Initialize-Function
Definition: HistogramId.h:53
MuonCalib::HistogramId::operator>
bool operator>(const HistogramId &other) const
comparision operator defined so that this class can be used as a map index.
Definition: HistogramId.h:38
MuonCalib::HistogramId::MEZZ_CARD
static const int MEZZ_CARD
Definition: HistogramId.h:45
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::HistogramId::HistogramName
const std::string & HistogramName() const
get ascii histogram name
Definition: HistogramId.h:49
MuonCalib::HistogramId::TUBE
static const int TUBE
valid values of the sort_by argument of the Initialize function
Definition: HistogramId.h:45
MuonCalib::HistogramId::Initialize
void Initialize(const MuonFixedId &id, int sort_by)
initialize
Definition: HistogramId.cxx:18
MuonCalib::HistogramId::operator<
bool operator<(const HistogramId &other) const
comparision operator defined so that this class can be used as a map index.
Definition: HistogramId.h:43
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50
MuonCalib::HistogramId::HistogramId
HistogramId()
constructor - does nothing
Definition: HistogramId.h:27
MuonCalib::HistogramId::LAYER
static const int LAYER
Definition: HistogramId.h:45
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonCalib::HistogramId::MULTILAYER
static const int MULTILAYER
Definition: HistogramId.h:45
MuonCalib::HistogramId::getIdInt
int getIdInt() const
get numberic id
Definition: HistogramId.h:47
MuonCalib::HistogramId::CHAMBER
static const int CHAMBER
Definition: HistogramId.h:45
MuonCalib::HistogramId
Definition: HistogramId.h:24
MuonCalib::HistogramId::m_histogram_name
std::string m_histogram_name
ascii histogram name
Definition: HistogramId.h:55