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

#include <LArBadChannelMask.h>

Collaboration diagram for LArBadChannelMask:

Public Member Functions

 LArBadChannelMask (bool isSC=false)
 
StatusCode buildBitMask (const std::vector< std::string > &problemsToMask, MsgStream &msg)
 
bool cellShouldBeMasked (const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
 
bool cellShouldBeMasked (const LArBadChannelCont *bcCont, const Identifier &offlineId) const
 
bool isSC () const
 
void setSC ()
 

Private Types

typedef LArBadChannel::BitWord BitWord
 

Private Attributes

BitWord m_bitMask =0x0
 
bool m_isSC
 

Static Private Attributes

static const LArBadChanBitPacking s_bitPacking
 
static const LArBadChanSCBitPacking s_bitSCPacking
 

Detailed Description

Definition at line 18 of file LArBadChannelMask.h.

Member Typedef Documentation

◆ BitWord

Definition at line 34 of file LArBadChannelMask.h.

Constructor & Destructor Documentation

◆ LArBadChannelMask()

LArBadChannelMask::LArBadChannelMask ( bool  isSC = false)
inline

Definition at line 20 of file LArBadChannelMask.h.

20 :m_isSC(isSC){};

Member Function Documentation

◆ buildBitMask()

StatusCode LArBadChannelMask::buildBitMask ( const std::vector< std::string > &  problemsToMask,
MsgStream &  msg 
)

Definition at line 10 of file LArBadChannelMask.cxx.

10  {
11  m_bitMask = 0x0;
12  for (const std::string& prblm : problemsToMask) {
13  if(m_isSC) {
14  std::pair<bool, LArBadChannel::LArBadChannelSCEnum::ProblemType> result
15  = s_bitSCPacking.enumName(prblm);
16  if(result.first)
18  else {
19  msg << MSG::ERROR << "The problem flag '" << prblm << "' was not recognized." << endmsg;
20  return StatusCode::FAILURE;
21  }
22  } else {
23  std::pair<bool, LArBadChannel::LArBadChannelEnum::ProblemType> result
24  = s_bitPacking.enumName(prblm);
25  if(result.first)
27  else {
28  msg << MSG::ERROR << "The problem flag '" << prblm << "' was not recognized." << endmsg;
29  return StatusCode::FAILURE;
30  }
31  }
32  }//end loop over vector<string>
33  return StatusCode::SUCCESS;
34 }

◆ cellShouldBeMasked() [1/2]

bool LArBadChannelMask::cellShouldBeMasked ( const LArBadChannelCont bcCont,
const HWIdentifier hardwareId 
) const
inline

Definition at line 42 of file LArBadChannelMask.h.

43  {
44 
45  const LArBadChannel cellStatus=bcCont->status(hardwareId);
46  return (m_bitMask & cellStatus.packedData()) != 0;
47 }

◆ cellShouldBeMasked() [2/2]

bool LArBadChannelMask::cellShouldBeMasked ( const LArBadChannelCont bcCont,
const Identifier offlineId 
) const
inline

Definition at line 50 of file LArBadChannelMask.h.

51  {
52 
53  const LArBadChannel cellStatus=bcCont->offlineStatus(offlineId);
54  return (m_bitMask & cellStatus.packedData()) != 0;
55 }

◆ isSC()

bool LArBadChannelMask::isSC ( ) const
inline

Definition at line 28 of file LArBadChannelMask.h.

28 {return m_isSC;}

◆ setSC()

void LArBadChannelMask::setSC ( )
inline

Definition at line 29 of file LArBadChannelMask.h.

29 {m_isSC=true;}

Member Data Documentation

◆ m_bitMask

BitWord LArBadChannelMask::m_bitMask =0x0
private

Definition at line 35 of file LArBadChannelMask.h.

◆ m_isSC

bool LArBadChannelMask::m_isSC
private

Definition at line 36 of file LArBadChannelMask.h.

◆ s_bitPacking

const LArBadChanBitPacking LArBadChannelMask::s_bitPacking
staticprivate

Definition at line 32 of file LArBadChannelMask.h.

◆ s_bitSCPacking

const LArBadChanSCBitPacking LArBadChannelMask::s_bitSCPacking
staticprivate

Definition at line 33 of file LArBadChannelMask.h.


The documentation for this class was generated from the following files:
get_generator_info.result
result
Definition: get_generator_info.py:21
LArBadXCont::offlineStatus
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
LArBadXCont::status
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
LArBadChannelMask::m_isSC
bool m_isSC
Definition: LArBadChannelMask.h:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TLArBadChanBitPackingBase::enumName
std::pair< bool, typename T::ProblemType > enumName(const std::string &str) const
LArBadChannelMask::s_bitPacking
static const LArBadChanBitPacking s_bitPacking
Definition: LArBadChannelMask.h:32
LArBadChannel
Definition: LArBadChannel.h:10
LArBadChannelMask::s_bitSCPacking
static const LArBadChanSCBitPacking s_bitSCPacking
Definition: LArBadChannelMask.h:33
LArBadChannel::packedData
BitWord packedData() const
Definition: LArBadChannel.h:145
LArBadChannelMask::m_bitMask
BitWord m_bitMask
Definition: LArBadChannelMask.h:35
LArBadChannelMask::isSC
bool isSC() const
Definition: LArBadChannelMask.h:28
TLArBadChanBitPackingBase::setBit
void setBit(typename T::ProblemType pb, LArBadChannel::BitWord &word, bool value=true) const
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7