ATLAS Offline Software
Loading...
Searching...
No Matches
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.h
h
Header file for AthHistogramAlgorithm.
LArBadChanContainerHashed::HashType
unsigned int HashType
Definition
LArBadChanContainerHashed.h:62
LArBadChanContainerHashed::set
void set(const BadChanVec &cont)
Definition
LArBadChanContainerHashed.cxx:7
LArBadChanContainerHashed::m_febVec
std::vector< LArBadChanFebState > m_febVec
Definition
LArBadChanContainerHashed.h:64
LArBadChanContainerHashed::BadChanVec
std::vector< BadChanEntry > BadChanVec
Definition
LArBadChanContainerHashed.h:18
LArBadChanContainerHashed::init
void init()
Definition
LArBadChanContainerHashed.cxx:22
LArBadChanContainerHashed::m_bcv
BadChanVec m_bcv
Definition
LArBadChanContainerHashed.h:66
LArBadChanContainerHashed::setBadFEBs
void setBadFEBs(const std::vector< BadFebEntry > &badFebs)
Definition
LArBadChanContainerHashed.cxx:30
LArBadChanContainerHashed::m_hasher
LArBadChanFEBHasher m_hasher
Definition
LArBadChanContainerHashed.h:65
Generated on
for ATLAS Offline Software by
1.14.0