CMS 3D CMS Logo

DTRangeMapAccessor.h
Go to the documentation of this file.
1 #ifndef DataFormats_DTRangeMapAccessor_H
2 #define DataFormats_DTRangeMapAccessor_H
3 
5 
6 #include <utility>
7 
15 public:
16  // Operations
18  bool operator()(DTSuperLayerId sl1, DTSuperLayerId sl2) const {
19  if (sl1 == sl2)
20  return false;
21  return (sl1 < sl2);
22  }
23 
24 private:
25 };
26 
34 public:
35  // Operations
37  bool operator()(DTChamberId ch1, DTChamberId ch2) const {
38  if (ch1 == ch2)
39  return false;
40  return (ch1 < ch2);
41  }
42 
43 private:
44 };
45 
53 public:
54  bool operator()(DTChamberId ch1, DTChamberId ch2) const {
55  if (ch1.station() == ch2.station())
56  return false;
57 
58  return (ch1.station() < ch2.station());
59  }
60 };
61 
69 public:
72 
74  virtual ~DTRangeMapAccessor();
75 
76  // Operations
77 
79  static std::pair<DTLayerId, DTSuperLayerIdComparator> layersBySuperLayer(DTSuperLayerId slId);
80 
82  static std::pair<DTLayerId, DTChamberIdComparator> layersByChamber(DTChamberId chamberId);
83 
85  static std::pair<DTSuperLayerId, DTChamberIdComparator> superLayersByChamber(DTChamberId chamberId);
86 
88  static std::pair<DTChamberId, DTChamberIdDetLayerComparator> chambersByDetLayer(DTChamberId id);
89 
90 private:
91 };
92 
93 #endif
DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTChamberIdComparator::operator()
bool operator()(DTChamberId ch1, DTChamberId ch2) const
Compare two ChamberId.
Definition: DTRangeMapAccessor.h:37
DTChamberIdDetLayerComparator::operator()
bool operator()(DTChamberId ch1, DTChamberId ch2) const
Definition: DTRangeMapAccessor.h:54
DTRangeMapAccessor
Definition: DTRangeMapAccessor.h:68
DTLayerId.h
DTSuperLayerIdComparator::operator()
bool operator()(DTSuperLayerId sl1, DTSuperLayerId sl2) const
Compare two superLayerId.
Definition: DTRangeMapAccessor.h:18
DTRangeMapAccessor::superLayersByChamber
static std::pair< DTSuperLayerId, DTChamberIdComparator > superLayersByChamber(DTChamberId chamberId)
Access by chamber objects written into a RangeMap by SL.
Definition: DTRangeMapAccessor.cc:25
DTRangeMapAccessor::~DTRangeMapAccessor
virtual ~DTRangeMapAccessor()
Destructor.
Definition: DTRangeMapAccessor.cc:12
DTChamberIdDetLayerComparator
Definition: DTRangeMapAccessor.h:52
DTRangeMapAccessor::layersBySuperLayer
static std::pair< DTLayerId, DTSuperLayerIdComparator > layersBySuperLayer(DTSuperLayerId slId)
Access by SL objects written into a RangeMap by layer.
Definition: DTRangeMapAccessor.cc:15
DTRangeMapAccessor::layersByChamber
static std::pair< DTLayerId, DTChamberIdComparator > layersByChamber(DTChamberId chamberId)
Access by chamber objects written into a RangeMap by layer.
Definition: DTRangeMapAccessor.cc:20
DTSuperLayerIdComparator
Definition: DTRangeMapAccessor.h:14
DTChamberIdComparator
Definition: DTRangeMapAccessor.h:33
DTChamberId
Definition: DTChamberId.h:14
DTRangeMapAccessor::DTRangeMapAccessor
DTRangeMapAccessor()
Constructor.
Definition: DTRangeMapAccessor.cc:10
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
DTRangeMapAccessor::chambersByDetLayer
static std::pair< DTChamberId, DTChamberIdDetLayerComparator > chambersByDetLayer(DTChamberId id)
Access chambers in a RangeMap by DetLayer.
Definition: DTRangeMapAccessor.cc:30