ATLAS Offline Software
LArBadChannelDecoder.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 LArBadChannelDecoder_H
6 #define LArBadChannelDecoder_H
7 
14 
15 #include <vector>
16 #include <string>
17 
18 class LArOnlineID_Base;
19 class MsgStream;
20 
22 public:
23 
24  LArBadChannelDecoder( const LArOnlineID_Base* onlineID, bool isSC=false) :
25  m_onlineID( onlineID), m_isSC(isSC) {}
26 
29  typedef std::pair< HWIdentifier, LArBadFeb> BadFebEntry;
30 
31  std::vector<BadChanEntry> readASCII( const std::string& name,
32  State::CoolChannelEnum coolChan,
33  MsgStream& log) const;
34 
35  std::vector<BadFebEntry> readFebASCII( const std::string& fname,
36  MsgStream& log) const;
37 
38 private:
39 
40  enum {barrel_ec, pos_neg, feedthrough, slot, channel}; // for local use only
41 
46 
47  bool m_isSC;
48 
49  HWIdentifier constructChannelId( const std::vector<int>& intVec,
50  State::CoolChannelEnum coolChan,
51  MsgStream& log) const;
52  std::pair<bool,LArBadChannel> constructStatus( const std::vector<std::string>& vec,
53  MsgStream& log) const;
54  std::pair<bool,LArBadFeb> constructFebStatus( const std::vector<std::string>& vec,
55  MsgStream& log) const;
56  bool checkId( const HWIdentifier&, int be, int pn, State::CoolChannelEnum) const;
57 
58  std::vector<HWIdentifier> constructFebId( const std::vector<int>& intVec,
59  MsgStream& log) const;
60 
61  HWIdentifier constructSingleFebId( const std::vector<int>& v, MsgStream& log) const;
62 
63  static MsgStream& insertExpandedID( const std::vector<int>& intVec, MsgStream& log) ;
64 
65 };
66 
67 #endif
LArBadChannelState.h
LArBadChanBitPacking
Definition: LArBadChanBitPacking.h:13
LArBadChannelState
Definition: LArBadChannelState.h:15
LArBadChannelDecoder::channel
@ channel
Definition: LArBadChannelDecoder.h:40
LArBadChannel.h
LArBadChannelDecoder
Definition: LArBadChannelDecoder.h:21
LArBadChannelDecoder::slot
@ slot
Definition: LArBadChannelDecoder.h:40
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
LArBadChannelDecoder::barrel_ec
@ barrel_ec
Definition: LArBadChannelDecoder.h:40
LArBadChannelDecoder::insertExpandedID
static MsgStream & insertExpandedID(const std::vector< int > &intVec, MsgStream &log)
Definition: LArBadChannelDecoder.cxx:191
LArBadChannelDecoder::m_SCpacking
LArBadChanSCBitPacking m_SCpacking
Definition: LArBadChannelDecoder.h:44
HWIdentifier
Definition: HWIdentifier.h:13
LArBadChannelState::BadChanEntry
std::pair< HWIdentifier, LArBadChannel > BadChanEntry
Definition: LArBadChannelState.h:18
LArBadChannelDecoder::m_febPacking
LArBadFebBitPacking m_febPacking
Definition: LArBadChannelDecoder.h:45
python.LArBadChannel2Ascii.isSC
isSC
Definition: LArBadChannel2Ascii.py:94
LArBadChannelDecoder::State
LArBadChannelState State
Definition: LArBadChannelDecoder.h:27
LArBadChannelDecoder::m_packing
LArBadChanBitPacking m_packing
Definition: LArBadChannelDecoder.h:43
python.ZdcRecConfig.pn
pn
Definition: ZdcRecConfig.py:506
LArBadChannelDecoder::m_onlineID
const LArOnlineID_Base * m_onlineID
Definition: LArBadChannelDecoder.h:42
LArBadFeb.h
LArBadChannelDecoder::BadFebEntry
std::pair< HWIdentifier, LArBadFeb > BadFebEntry
Definition: LArBadChannelDecoder.h:29
LArBadChannelDecoder::constructSingleFebId
HWIdentifier constructSingleFebId(const std::vector< int > &v, MsgStream &log) const
Definition: LArBadChannelDecoder.cxx:137
LArBadChanBitPacking.h
LArBadChannelDecoder::constructChannelId
HWIdentifier constructChannelId(const std::vector< int > &intVec, State::CoolChannelEnum coolChan, MsgStream &log) const
Definition: LArBadChannelDecoder.cxx:76
LArBadChannelDecoder::constructStatus
std::pair< bool, LArBadChannel > constructStatus(const std::vector< std::string > &vec, MsgStream &log) const
Definition: LArBadChannelDecoder.cxx:156
LArBadChanSCBitPacking
Definition: LArBadChanBitPacking.h:20
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition: LArOnlineID_Base.h:105
HWIdentifier.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArBadChannelDecoder::pos_neg
@ pos_neg
Definition: LArBadChannelDecoder.h:40
LArBadChannelDecoder::checkId
bool checkId(const HWIdentifier &, int be, int pn, State::CoolChannelEnum) const
Definition: LArBadChannelDecoder.cxx:201
LArBadChannelDecoder::constructFebId
std::vector< HWIdentifier > constructFebId(const std::vector< int > &intVec, MsgStream &log) const
Definition: LArBadChannelDecoder.cxx:106
LArBadChannelDecoder::m_isSC
bool m_isSC
Definition: LArBadChannelDecoder.h:47
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
python.PyAthena.v
v
Definition: PyAthena.py:154
LArBadChannelState::CoolChannelEnum
CoolChannelEnum
Definition: LArBadChannelState.h:23
LArBadFebBitPacking
Definition: LArBadFebBitPacking.h:16
LArBadChannelDecoder::readASCII
std::vector< BadChanEntry > readASCII(const std::string &name, State::CoolChannelEnum coolChan, MsgStream &log) const
Definition: LArBadChannelDecoder.cxx:12
LArBadChannelDecoder::readFebASCII
std::vector< BadFebEntry > readFebASCII(const std::string &fname, MsgStream &log) const
Definition: LArBadChannelDecoder.cxx:45
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArBadChannelDecoder::BadChanEntry
LArBadChannelState::BadChanEntry BadChanEntry
Definition: LArBadChannelDecoder.h:28
LArBadChannelDecoder::constructFebStatus
std::pair< bool, LArBadFeb > constructFebStatus(const std::vector< std::string > &vec, MsgStream &log) const
Definition: LArBadChannelDecoder.cxx:175
LArBadChannelDecoder::feedthrough
@ feedthrough
Definition: LArBadChannelDecoder.h:40
PlotCalibFromCool.be
be
Definition: PlotCalibFromCool.py:398
LArBadFebBitPacking.h
LArBadChannelDecoder::LArBadChannelDecoder
LArBadChannelDecoder(const LArOnlineID_Base *onlineID, bool isSC=false)
Definition: LArBadChannelDecoder.h:24