ATLAS Offline Software
Loading...
Searching...
No Matches
LArBadChannelMask.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
10StatusCode LArBadChannelMask::buildBitMask(const std::vector<std::string>& problemsToMask, MsgStream& msg) {
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}
35
#define endmsg
static const LArBadChanBitPacking s_bitPacking
static const LArBadChanSCBitPacking s_bitSCPacking
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
MsgStream & msg
Definition testRead.cxx:32