ATLAS Offline Software
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LArBadChanContainerHashed Class Reference

#include <LArBadChanContainerHashed.h>

Collaboration diagram for LArBadChanContainerHashed:

Public Types

typedef std::pair< HWIdentifier, LArBadChannelBadChanEntry
 
typedef std::pair< HWIdentifier, LArBadFebBadFebEntry
 
typedef std::vector< BadChanEntryBadChanVec
 
typedef BadChanVec::const_iterator const_iterator
 
typedef BadChanVec::size_type size_type
 

Public Member Functions

 LArBadChanContainerHashed ()
 
 LArBadChanContainerHashed (const LArBadChanFEBHasher &h)
 
 LArBadChanContainerHashed (const BadChanVec &vec)
 
LArBadChannel status (const HWIdentifier &channelID) const
 
LArBadChannel status (const HWIdentifier &feb, int ch) const
 
bool febBad (HWIdentifier febId) const
 
bool febAllGood (HWIdentifier febId) const
 
LArBadFeb febStatus (HWIdentifier febId) const
 
const_iterator begin () const
 
const_iterator end () const
 
size_type size () const
 
void set (const BadChanVec &cont)
 
void setBadFEBs (const std::vector< BadFebEntry > &badFebs)
 
void setHasher (const LArBadChanFEBHasher &hasher)
 

Private Types

typedef unsigned int HashType
 

Private Member Functions

void init ()
 

Private Attributes

std::vector< LArBadChanFebStatem_febVec
 
LArBadChanFEBHasher m_hasher
 
BadChanVec m_bcv
 

Detailed Description

Definition at line 13 of file LArBadChanContainerHashed.h.

Member Typedef Documentation

◆ BadChanEntry

Definition at line 16 of file LArBadChanContainerHashed.h.

◆ BadChanVec

Definition at line 18 of file LArBadChanContainerHashed.h.

◆ BadFebEntry

Definition at line 17 of file LArBadChanContainerHashed.h.

◆ const_iterator

typedef BadChanVec::const_iterator LArBadChanContainerHashed::const_iterator

Definition at line 19 of file LArBadChanContainerHashed.h.

◆ HashType

typedef unsigned int LArBadChanContainerHashed::HashType
private

Definition at line 62 of file LArBadChanContainerHashed.h.

◆ size_type

typedef BadChanVec::size_type LArBadChanContainerHashed::size_type

Definition at line 20 of file LArBadChanContainerHashed.h.

Constructor & Destructor Documentation

◆ LArBadChanContainerHashed() [1/3]

LArBadChanContainerHashed::LArBadChanContainerHashed ( )
inline

Definition at line 24 of file LArBadChanContainerHashed.h.

24 {}

◆ LArBadChanContainerHashed() [2/3]

LArBadChanContainerHashed::LArBadChanContainerHashed ( const LArBadChanFEBHasher h)
inlineexplicit

Definition at line 26 of file LArBadChanContainerHashed.h.

26 : m_hasher(h) {}

◆ LArBadChanContainerHashed() [3/3]

LArBadChanContainerHashed::LArBadChanContainerHashed ( const BadChanVec vec)
inline

Definition at line 28 of file LArBadChanContainerHashed.h.

28 { set(vec);}

Member Function Documentation

◆ begin()

const_iterator LArBadChanContainerHashed::begin ( ) const
inline

Definition at line 50 of file LArBadChanContainerHashed.h.

50 {return m_bcv.begin();}

◆ end()

const_iterator LArBadChanContainerHashed::end ( ) const
inline

Definition at line 51 of file LArBadChanContainerHashed.h.

51 {return m_bcv.end();}

◆ febAllGood()

bool LArBadChanContainerHashed::febAllGood ( HWIdentifier  febId) const
inline

Definition at line 42 of file LArBadChanContainerHashed.h.

42  {
43  return m_febVec.at( m_hasher.hashFEB( febId)).empty();
44  }

◆ febBad()

bool LArBadChanContainerHashed::febBad ( HWIdentifier  febId) const
inline

Definition at line 38 of file LArBadChanContainerHashed.h.

38  {
39  return m_febVec.at( m_hasher.hashFEB( febId)).bad();
40  }

◆ febStatus()

LArBadFeb LArBadChanContainerHashed::febStatus ( HWIdentifier  febId) const
inline

Definition at line 46 of file LArBadChanContainerHashed.h.

46  {
47  return m_febVec.at( m_hasher.hashFEB( febId)).febStatus();
48  }

◆ init()

void LArBadChanContainerHashed::init ( )
private

Definition at line 22 of file LArBadChanContainerHashed.cxx.

23 {
24 
25  //if (!m_hasher.initialized()) FIXME should throw an exception!
26 
27  m_febVec.resize( m_hasher.maxFEBHash());
28 }

◆ set()

void LArBadChanContainerHashed::set ( const BadChanVec cont)

Definition at line 7 of file LArBadChanContainerHashed.cxx.

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 }

◆ setBadFEBs()

void LArBadChanContainerHashed::setBadFEBs ( const std::vector< BadFebEntry > &  badFebs)

Definition at line 30 of file LArBadChanContainerHashed.cxx.

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 }

◆ setHasher()

void LArBadChanContainerHashed::setHasher ( const LArBadChanFEBHasher hasher)
inline

Definition at line 58 of file LArBadChanContainerHashed.h.

58 { m_hasher = hasher;}

◆ size()

size_type LArBadChanContainerHashed::size ( ) const
inline

Definition at line 52 of file LArBadChanContainerHashed.h.

52 {return m_bcv.size();}

◆ status() [1/2]

LArBadChannel LArBadChanContainerHashed::status ( const HWIdentifier channelID) const
inline

Definition at line 30 of file LArBadChanContainerHashed.h.

30  {
31  return m_febVec.at( m_hasher.febHashByChan( channelID)).status( m_hasher.channelInFeb( channelID));
32  }

◆ status() [2/2]

LArBadChannel LArBadChanContainerHashed::status ( const HWIdentifier feb,
int  ch 
) const
inline

Definition at line 34 of file LArBadChanContainerHashed.h.

34  {
35  return m_febVec.at( m_hasher.hashFEB( feb)).status( ch);
36  }

Member Data Documentation

◆ m_bcv

BadChanVec LArBadChanContainerHashed::m_bcv
private

Definition at line 66 of file LArBadChanContainerHashed.h.

◆ m_febVec

std::vector<LArBadChanFebState> LArBadChanContainerHashed::m_febVec
private

Definition at line 64 of file LArBadChanContainerHashed.h.

◆ m_hasher

LArBadChanFEBHasher LArBadChanContainerHashed::m_hasher
private

Definition at line 65 of file LArBadChanContainerHashed.h.


The documentation for this class was generated from the following files:
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
LArBadChanContainerHashed::init
void init()
Definition: LArBadChanContainerHashed.cxx:22
LArBadChanFEBHasher::maxFEBHash
unsigned int maxFEBHash() const
Definition: LArBadChanFEBHasher.h:54
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
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::m_bcv
BadChanVec m_bcv
Definition: LArBadChanContainerHashed.h:66
LArBadChanFEBHasher::channelInFeb
unsigned int channelInFeb(const HWIdentifier &chanID) const
Definition: LArBadChanFEBHasher.h:49
LArBadChanFEBHasher::febHashByChan
unsigned int febHashByChan(const HWIdentifier &chanID) const
Definition: LArBadChanFEBHasher.h:45