ATLAS Offline Software
Loading...
Searching...
No Matches
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
41inline
43 const HWIdentifier& hardwareId) const {
44
45 const LArBadChannel cellStatus=bcCont->status(hardwareId);
46 return (m_bitMask & cellStatus.packedData()) != 0;
47}
48
49inline
51 const Identifier& offlineId) const {
52
53 const LArBadChannel cellStatus=bcCont->offlineStatus(offlineId);
54 return (m_bitMask & cellStatus.packedData()) != 0;
55}
56
57#endif
LArBadXCont< LArBadChannel > LArBadChannelCont
static const LArBadChanBitPacking s_bitPacking
static const LArBadChanSCBitPacking s_bitSCPacking
LArBadChannelMask(bool isSC=false)
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
LArBadChannel::BitWord BitWord
unsigned int BitWord
BitWord packedData() const
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
MsgStream & msg
Definition testRead.cxx:32