src
DQM
HcalCommon
interface
ElectronicsMap.h
Go to the documentation of this file.
1
#ifndef ElectronicsMap_h
2
#define ElectronicsMap_h
3
14
#include "
DQM/HcalCommon/interface/HashFilter.h
"
15
#include "
DQM/HcalCommon/interface/HashMapper.h
"
16
#include "
DQM/HcalCommon/interface/HcalCommonHeaders.h
"
17
18
#include "string"
19
#include <unordered_map>
20
21
namespace
hcaldqm
{
22
namespace
electronicsmap {
23
enum
ElectronicsMapType
{
24
fHcalElectronicsMap
= 0,
25
fD2EHashMap
= 1,
26
fT2EHashMap
= 2,
27
fE2DHashMap
= 3,
28
fE2THashMap
= 4,
29
nElectronicsMapType
= 5
30
};
31
32
class
ElectronicsMap
{
33
public
:
34
ElectronicsMap
() :
_emap
(nullptr) {}
35
// define how to use upon construction
36
ElectronicsMap
(
ElectronicsMapType
etype) :
_etype
(etype),
_emap
(nullptr) {}
37
~ElectronicsMap
() {}
38
39
void
initialize
(
HcalElectronicsMap
const
*,
ElectronicsMapType
etype =
fHcalElectronicsMap
);
40
41
// filter is to filter things you do not need out
42
void
initialize
(
HcalElectronicsMap
const
*,
ElectronicsMapType
,
filter::HashFilter
const
&);
43
uint32_t
lookup
(
DetId
const
&);
44
uint32_t
lookup
(
HcalDetId
const
&);
45
uint32_t
lookup
(
HcalElectronicsId
const
&);
46
47
void
print
();
48
49
private
:
50
// configures how to use emap
51
ElectronicsMapType
_etype
;
52
53
// 2 choices either use as HcalElectronicsMap or as ur hash
54
typedef
std::unordered_map<uint32_t, uint32_t>
EMapType
;
55
EMapType
_ids
;
56
57
//
58
HcalElectronicsMap
const
*
_emap
;
59
};
60
}
// namespace electronicsmap
61
}
// namespace hcaldqm
62
63
#endif
HashFilter.h
hcaldqm::electronicsmap::nElectronicsMapType
Definition:
ElectronicsMap.h:29
hcaldqm::filter::HashFilter
Definition:
HashFilter.h:21
hcaldqm::electronicsmap::ElectronicsMap::initialize
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
Definition:
ElectronicsMap.cc:6
HashMapper.h
hcaldqm::electronicsmap::fD2EHashMap
Definition:
ElectronicsMap.h:25
hcaldqm::electronicsmap::ElectronicsMap
Definition:
ElectronicsMap.h:32
hcaldqm::electronicsmap::ElectronicsMap::lookup
uint32_t lookup(DetId const &)
Definition:
ElectronicsMap.cc:122
hcaldqm::electronicsmap::ElectronicsMap::~ElectronicsMap
~ElectronicsMap()
Definition:
ElectronicsMap.h:37
HcalDetId
Definition:
HcalDetId.h:12
hcaldqm::electronicsmap::ElectronicsMap::_ids
EMapType _ids
Definition:
ElectronicsMap.h:55
hcaldqm::electronicsmap::fHcalElectronicsMap
Definition:
ElectronicsMap.h:24
hcaldqm::electronicsmap::ElectronicsMap::_emap
HcalElectronicsMap const * _emap
Definition:
ElectronicsMap.h:58
hcaldqm::electronicsmap::fT2EHashMap
Definition:
ElectronicsMap.h:26
DetId
Definition:
DetId.h:17
hcaldqm
Definition:
Constants.h:8
hcaldqm::electronicsmap::ElectronicsMap::_etype
ElectronicsMapType _etype
Definition:
ElectronicsMap.h:51
hcaldqm::electronicsmap::ElectronicsMap::ElectronicsMap
ElectronicsMap()
Definition:
ElectronicsMap.h:34
HcalCommonHeaders.h
hcaldqm::electronicsmap::ElectronicsMapType
ElectronicsMapType
Definition:
ElectronicsMap.h:23
HcalElectronicsMap
Definition:
HcalElectronicsMap.h:31
hcaldqm::electronicsmap::ElectronicsMap::print
void print()
Definition:
ElectronicsMap.cc:157
hcaldqm::electronicsmap::ElectronicsMap::EMapType
std::unordered_map< uint32_t, uint32_t > EMapType
Definition:
ElectronicsMap.h:54
hcaldqm::electronicsmap::ElectronicsMap::ElectronicsMap
ElectronicsMap(ElectronicsMapType etype)
Definition:
ElectronicsMap.h:36
hcaldqm::electronicsmap::fE2THashMap
Definition:
ElectronicsMap.h:28
HcalElectronicsId
Readout chain identification for Hcal.
Definition:
HcalElectronicsId.h:32
hcaldqm::electronicsmap::fE2DHashMap
Definition:
ElectronicsMap.h:27
Generated for CMSSW Reference Manual by
1.8.14