ATLAS Offline Software
Loading...
Searching...
No Matches
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.

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)
17 s_bitSCPacking.setBit(result.second, m_bitMask);
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)
26 s_bitPacking.setBit(result.second, m_bitMask);
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}
#define endmsg
static const LArBadChanBitPacking s_bitPacking
static const LArBadChanSCBitPacking s_bitSCPacking
MsgStream & msg
Definition testRead.cxx:32

◆ 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}
BitWord packedData() const
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.

◆ 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}
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.

◆ 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: