ATLAS Offline Software
LArBadChannelMask.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARBADCHANNEL_LARBADCHANNELMASK_H
6 #define LARBADCHANNEL_LARBADCHANNELMASK_H
7 
8 //#include "CaloIdentifier/CaloGain.h"
12 #include "GaudiKernel/MsgStream.h"
13 #include "GaudiKernel/StatusCode.h"
14 #include <vector>
15 #include <string>
16 
17 
19  public:
21 
22  StatusCode buildBitMask(const std::vector<std::string>& problemsToMask, MsgStream& msg);
23 
24 
25  bool cellShouldBeMasked(const LArBadChannelCont* bcCont, const HWIdentifier& hardwareId) const;
26  bool cellShouldBeMasked(const LArBadChannelCont* bcCont, const Identifier& offlineId) const;
27 
28  bool isSC() const {return m_isSC;}
29  void setSC() {m_isSC=true;}
30 
31  private:
32  const static LArBadChanBitPacking s_bitPacking; // A helper for bit operations, etc.
33  const static LArBadChanSCBitPacking s_bitSCPacking; // A helper for bit operations, etc.
35  BitWord m_bitMask=0x0; // The list of problems in bit form.
36  bool m_isSC;
37 };
38 
39 
40 
41 inline
43  const HWIdentifier& hardwareId) const {
44 
45  const LArBadChannel cellStatus=bcCont->status(hardwareId);
46  return (m_bitMask & cellStatus.packedData()) != 0;
47 }
48 
49 inline
51  const Identifier& offlineId) const {
52 
53  const LArBadChannel cellStatus=bcCont->offlineStatus(offlineId);
54  return (m_bitMask & cellStatus.packedData()) != 0;
55 }
56 
57 #endif
LArBadChanBitPacking
Definition: LArBadChanBitPacking.h:13
LArBadXCont
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
Definition: LArBadChannelCont.h:28
LArBadChannelMask::LArBadChannelMask
LArBadChannelMask(bool isSC=false)
Definition: LArBadChannelMask.h:20
LArBadChannelMask::buildBitMask
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
Definition: LArBadChannelMask.cxx:10
HWIdentifier
Definition: HWIdentifier.h:13
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.
LArBadChannelMask::cellShouldBeMasked
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
Definition: LArBadChannelMask.h:42
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
LArBadChannelCont.h
LArBadChannel::BitWord
unsigned int BitWord
Definition: LArBadChannel.h:13
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArBadChannelMask::BitWord
LArBadChannel::BitWord BitWord
Definition: LArBadChannelMask.h:34
LArBadChannelMask::s_bitPacking
static const LArBadChanBitPacking s_bitPacking
Definition: LArBadChannelMask.h:32
LArBadChannel
Definition: LArBadChannel.h:10
LArBadChanBitPacking.h
LArBadChanSCBitPacking
Definition: LArBadChanBitPacking.h:20
LArBadChannelMask::s_bitSCPacking
static const LArBadChanSCBitPacking s_bitSCPacking
Definition: LArBadChannelMask.h:33
LArBadChannelMask::setSC
void setSC()
Definition: LArBadChannelMask.h:29
HWIdentifier.h
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
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
LArBadChannelMask
Definition: LArBadChannelMask.h:18
Identifier
Definition: IdentifierFieldParser.cxx:14