ATLAS Offline Software
LArCalorimeter
LArBadChannelTool
src
LArBadChanContainerHashed.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArBadChannelTool/LArBadChanContainerHashed.h
"
6
7
void
LArBadChanContainerHashed::set
(
const
BadChanVec
& cont)
8
{
9
if
(
m_febVec
.empty())
init
();
10
11
// reset all channel information, but keep FEB status unchanged
12
for
(
unsigned
int
i
=0;
i
<
m_hasher
.
maxFEBHash
();
i
++)
m_febVec
[
i
].resetChannels();
13
14
for
(BadChanVec::const_iterator
i
=cont.begin();
i
!=cont.end(); ++
i
) {
15
HashType
h
=
m_hasher
.
febHashByChan
(
i
->first);
16
m_febVec
.at(
h
).addChannel(
m_hasher
.
channelInFeb
(
i
->first),
i
->second);
17
}
18
19
m_bcv
= cont;
20
}
21
22
void
LArBadChanContainerHashed::init
()
23
{
24
25
//if (!m_hasher.initialized()) FIXME should throw an exception!
26
27
m_febVec
.resize(
m_hasher
.
maxFEBHash
());
28
}
29
30
void
LArBadChanContainerHashed::setBadFEBs
(
const
std::vector<BadFebEntry>& badFebs)
31
{
32
if
(
m_febVec
.empty())
init
();
33
34
for
(
unsigned
int
i
=0;
i
<
m_hasher
.
maxFEBHash
();
i
++)
m_febVec
[
i
].resetBad();
35
36
for
(std::vector<BadFebEntry>::const_iterator
i
=badFebs.begin();
37
i
!=badFebs.end(); ++
i
) {
38
m_febVec
.at(
m_hasher
.
hashFEB
(
i
->first)).setFebStatus(
i
->second);
39
}
40
}
LArBadChanContainerHashed::init
void init()
Definition:
LArBadChanContainerHashed.cxx:22
LArBadChanFEBHasher::maxFEBHash
unsigned int maxFEBHash() const
Definition:
LArBadChanFEBHasher.h:54
LArBadChanContainerHashed.h
lumiFormat.i
int i
Definition:
lumiFormat.py:85
LArBadChanContainerHashed::HashType
unsigned int HashType
Definition:
LArBadChanContainerHashed.h:62
LArBadChanContainerHashed::m_febVec
std::vector< LArBadChanFebState > m_febVec
Definition:
LArBadChanContainerHashed.h:64
LArBadChanContainerHashed::set
void set(const BadChanVec &cont)
Definition:
LArBadChanContainerHashed.cxx:7
LArBadChanFEBHasher::hashFEB
unsigned int hashFEB(const HWIdentifier &FEBid) const
Definition:
LArBadChanFEBHasher.h:41
LArBadChanContainerHashed::m_hasher
LArBadChanFEBHasher m_hasher
Definition:
LArBadChanContainerHashed.h:65
h
LArBadChanContainerHashed::setBadFEBs
void setBadFEBs(const std::vector< BadFebEntry > &badFebs)
Definition:
LArBadChanContainerHashed.cxx:30
LArBadChanContainerHashed::m_bcv
BadChanVec m_bcv
Definition:
LArBadChanContainerHashed.h:66
LArBadChanFEBHasher::channelInFeb
unsigned int channelInFeb(const HWIdentifier &chanID) const
Definition:
LArBadChanFEBHasher.h:49
LArBadChanContainerHashed::BadChanVec
std::vector< BadChanEntry > BadChanVec
Definition:
LArBadChanContainerHashed.h:18
LArBadChanFEBHasher::febHashByChan
unsigned int febHashByChan(const HWIdentifier &chanID) const
Definition:
LArBadChanFEBHasher.h:45
Generated on Thu Nov 7 2024 21:19:14 for ATLAS Offline Software by
1.8.18