ATLAS Offline Software
TileCalorimeter
TileConditions
src
TileBadChannels.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TileConditions/TileBadChannels.h
"
6
#include <algorithm>
7
8
9
TileBadChannels::TileBadChannels
() {
10
11
}
12
13
14
TileBadChannels::~TileBadChannels
() {
15
16
}
17
18
void
TileBadChannels::addAdcStatus
(
const
HWIdentifier
channel_id
,
const
HWIdentifier
adc_id,
const
TileBchStatus
& adcStatus) {
19
m_channelStatus
[
channel_id
] += adcStatus;
20
m_adcStatus
[adc_id] += adcStatus;
21
}
22
23
24
const
TileBchStatus
&
TileBadChannels::getAdcStatus
(
const
HWIdentifier
adc_id)
const
{
25
26
BchMap::const_iterator adcStatus =
m_adcStatus
.find(adc_id);
27
if
(adcStatus ==
m_adcStatus
.end()) {
28
return
m_defaultStatus
;
29
}
else
{
30
return
adcStatus->second;
31
}
32
33
}
34
35
const
TileBchStatus
&
TileBadChannels::getChannelStatus
(
const
HWIdentifier
channel_id
)
const
{
36
37
BchMap::const_iterator channelStatus =
m_channelStatus
.find(
channel_id
);
38
if
(channelStatus ==
m_channelStatus
.end()) {
39
return
m_defaultStatus
;
40
}
else
{
41
return
channelStatus->second;
42
}
43
44
}
45
46
47
void
TileBadChannels::setMaskedDrawers
(std::vector<int>&& maskedDrawers) {
48
m_maskedDrawers
= std::move(maskedDrawers);
49
std::sort (
m_maskedDrawers
.begin(),
m_maskedDrawers
.end());
50
}
51
52
uint32_t
TileBadChannels::encodeStatus
(
const
TileBchStatus
&
status
) {
53
uint32_t
bad
;
54
55
if
(
status
.isGood()) {
56
bad
= 0;
57
}
else
if
(
status
.isBad()) {
58
bad
= 3;
59
}
else
if
(
status
.isNoisy()) {
60
bad
= 1;
61
}
else
if
(
status
.isAffected()) {
62
bad
= 2;
63
}
else
{
64
bad
= 4;
65
}
66
67
return
bad
;
68
}
69
70
uint32_t
TileBadChannels::encodeAdcStatus
(
const
HWIdentifier
adc_id)
const
{
71
return
encodeStatus
(
getAdcStatus
(adc_id));
72
}
bad
@ bad
Definition:
SUSYToolsTester.cxx:100
xAOD::uint32_t
setEventNumber uint32_t
Definition:
EventInfo_v1.cxx:127
TileBchStatus
Class holding bad channel problems.
Definition:
TileBchStatus.h:20
TileBadChannels::encodeAdcStatus
uint32_t encodeAdcStatus(const HWIdentifier adc_id) const
Definition:
TileBadChannels.cxx:70
HWIdentifier
Definition:
HWIdentifier.h:13
TileBadChannels::m_channelStatus
BchMap m_channelStatus
Definition:
TileBadChannels.h:88
TileBadChannels::m_defaultStatus
TileBchStatus m_defaultStatus
Definition:
TileBadChannels.h:84
TileBadChannels::setMaskedDrawers
void setMaskedDrawers(std::vector< int > &&maskedDrawers)
Store Tile drawers masked completely.
Definition:
TileBadChannels.cxx:47
TileBadChannels::encodeStatus
static uint32_t encodeStatus(const TileBchStatus &status)
Definition:
TileBadChannels.cxx:52
createCoolChannelIdFile.channel_id
channel_id
Definition:
createCoolChannelIdFile.py:52
TileBadChannels::~TileBadChannels
virtual ~TileBadChannels()
Definition:
TileBadChannels.cxx:14
TileBadChannels::getChannelStatus
const TileBchStatus & getChannelStatus(const HWIdentifier channel_id) const
Return Tile channel status.
Definition:
TileBadChannels.cxx:35
TileBadChannels::getAdcStatus
const TileBchStatus & getAdcStatus(const HWIdentifier adc_id) const
Return Tile ADC status.
Definition:
TileBadChannels.cxx:24
TileBadChannels::addAdcStatus
void addAdcStatus(const HWIdentifier channel_id, const HWIdentifier adc_id, const TileBchStatus &adcStatus)
Add status for given Tile ADC and corresponding channel.
Definition:
TileBadChannels.cxx:18
TileBadChannels.h
merge.status
status
Definition:
merge.py:17
TileBadChannels::m_adcStatus
BchMap m_adcStatus
Definition:
TileBadChannels.h:87
TileBadChannels::TileBadChannels
TileBadChannels()
Definition:
TileBadChannels.cxx:9
TileBadChannels::m_maskedDrawers
std::vector< int > m_maskedDrawers
Definition:
TileBadChannels.h:91
Generated on Thu Jan 9 2025 21:19:15 for ATLAS Offline Software by
1.8.18