#include <LArBadChannelDecoder.h>
|
| HWIdentifier | constructChannelId (const std::vector< int > &intVec, State::CoolChannelEnum coolChan, MsgStream &log) const |
| std::pair< bool, LArBadChannel > | constructStatus (const std::vector< std::string > &vec, MsgStream &log) const |
| std::pair< bool, LArBadFeb > | constructFebStatus (const std::vector< std::string > &vec, MsgStream &log) const |
| bool | checkId (const HWIdentifier &, int be, int pn, State::CoolChannelEnum) const |
| std::vector< HWIdentifier > | constructFebId (const std::vector< int > &intVec, MsgStream &log) const |
| HWIdentifier | constructSingleFebId (const std::vector< int > &v, MsgStream &log) const |
|
| static MsgStream & | insertExpandedID (const std::vector< int > &intVec, MsgStream &log) |
Definition at line 21 of file LArBadChannelDecoder.h.
◆ BadChanEntry
◆ BadFebEntry
◆ State
◆ anonymous enum
◆ LArBadChannelDecoder()
| LArBadChannelDecoder::LArBadChannelDecoder |
( |
const LArOnlineID_Base * | onlineID, |
|
|
bool | isSC = false ) |
|
inline |
◆ checkId()
Definition at line 202 of file LArBadChannelDecoder.cxx.
204{
211 return false;
212}
static CaloPartEnum caloPart(CoolChannelEnum chan)
static int barrelEndcap(CoolChannelEnum chan)
static int posNeg(CoolChannelEnum chan)
◆ constructChannelId()
Definition at line 77 of file LArBadChannelDecoder.cxx.
80{
81 HWIdentifier invalid;
82 if (intVec.size() < 5) {
83 log << MSG::WARNING <<
"Failed to produce a channel HWIdentifier for ";
84 for (
unsigned int i=0;
i<intVec.size();
i++) log << intVec[i] <<
" ";
85 log <<
"not enough identifiers" <<
endmsg;
86 return invalid;
87 }
88 try {
95 return invalid;
96 }
98 log <<
" to 0x" << MSG::hex << hwid << MSG::dec <<
endmsg;
99 return hwid;
100 }
101 catch( LArOnlID_Exception& idException) {
103 }
104 return invalid;
105}
static MsgStream & insertExpandedID(const std::vector< int > &intVec, MsgStream &log)
bool checkId(const HWIdentifier &, int be, int pn, State::CoolChannelEnum) const
static std::string coolChannelName(CoolChannelEnum chan)
◆ constructFebId()
| std::vector< HWIdentifier > LArBadChannelDecoder::constructFebId |
( |
const std::vector< int > & | intVec, |
|
|
MsgStream & | log ) const |
|
private |
Definition at line 107 of file LArBadChannelDecoder.cxx.
109{
110 const int maxFebPerFT = 15;
111
112 std::vector<HWIdentifier>
result;
113 if (intVec.size() != 4) {
114 log << MSG::WARNING <<
"Failed to produce a FEB HWIdentifier for ";
115 for (
unsigned int i=0;
i<intVec.size();
i++) log << intVec[i] <<
" ";
116 log <<
"not enough identifiers" <<
endmsg;
118 }
119
120
121 if (intVec[
slot] == -1) {
122 std::vector<int>
vec( intVec);
123
124
126
129 }
130 }
131 else{
134 }
136}
std::vector< size_t > vec
bool is_valid() const
Check if id is in a valid state.
HWIdentifier constructSingleFebId(const std::vector< int > &v, MsgStream &log) const
◆ constructFebStatus()
| std::pair< bool, LArBadFeb > LArBadChannelDecoder::constructFebStatus |
( |
const std::vector< std::string > & | vec, |
|
|
MsgStream & | log ) const |
|
private |
Definition at line 176 of file LArBadChannelDecoder.cxx.
178{
180 for(std::vector<std::string>::const_iterator it =
vec.begin(); it !=
vec.end(); ++it) {
182 if (!ok) {
183 log << MSG::WARNING <<
"LArBadChannelDecoder REJECTED line with "
184 <<
":\t unrecognized problem status: " << *
it <<
endmsg;
185 return std::pair<bool,LArBadFeb>(false,result);
186 }
187 }
188 return std::pair<bool,LArBadFeb>(true,result);
189}
LArBadFebBitPacking m_febPacking
◆ constructSingleFebId()
| HWIdentifier LArBadChannelDecoder::constructSingleFebId |
( |
const std::vector< int > & | v, |
|
|
MsgStream & | log ) const |
|
private |
Definition at line 138 of file LArBadChannelDecoder.cxx.
140{
141 HWIdentifier invalid;
142 if (
v.size() != 4)
return invalid;
143 try {
146 log <<
" to 0x" << MSG::hex << hwid << MSG::dec <<
endmsg;
147 return hwid;
148 }
149 catch( LArOnlID_Exception& idException) {
150 log << MSG::ERROR <<
"Failed to produce a FEB HWIdentifier for ";
insertExpandedID( v, log);
152 }
153 return invalid;
154}
◆ constructStatus()
| std::pair< bool, LArBadChannel > LArBadChannelDecoder::constructStatus |
( |
const std::vector< std::string > & | vec, |
|
|
MsgStream & | log ) const |
|
private |
Definition at line 157 of file LArBadChannelDecoder.cxx.
158{
160 for(std::vector<std::string>::const_iterator it =
vec.begin(); it !=
vec.end(); ++it) {
161 bool ok = false;
164 else
166 if (!ok) {
167 log << MSG::WARNING <<
"LArBadChannelDecoder REJECTED line with "
168 <<
":\t unrecognized problem status: " << *
it <<
endmsg;
169 return std::pair<bool,LArBadChannel>(false,result);
170 }
171 }
172 return std::pair<bool,LArBadChannel>(true,result);
173}
LArBadChanBitPacking m_packing
LArBadChanSCBitPacking m_SCpacking
◆ insertExpandedID()
| MsgStream & LArBadChannelDecoder::insertExpandedID |
( |
const std::vector< int > & | intVec, |
|
|
MsgStream & | log ) |
|
staticprivate |
◆ readASCII()
Definition at line 13 of file LArBadChannelDecoder.cxx.
16{
17 std::vector<BadChanEntry>
result;
18
19
20 LArBadChannelParser
parser(fname, &log, 6, -1);
21 if (!
parser.fileStatusGood()) {
22 log << MSG::ERROR <<
"Failed to open file " <<
fname
25 }
26
27 typedef std::string ParseType;
28 typedef std::pair<std::vector<int>, std::vector<ParseType> > ParsedLine;
29 std::vector<ParsedLine>
parsed =
parser.parseFile<ParseType>();
31
32 for (std::vector<ParsedLine>::const_iterator i=
parsed.begin();
37 if (badCh.first) {
38 result.emplace_back( hwid, badCh.second);
39 }
40 }
41 }
43}
HWIdentifier constructChannelId(const std::vector< int > &intVec, State::CoolChannelEnum coolChan, MsgStream &log) const
std::pair< bool, LArBadChannel > constructStatus(const std::vector< std::string > &vec, MsgStream &log) const
◆ readFebASCII()
Definition at line 46 of file LArBadChannelDecoder.cxx.
48{
49 std::vector<BadFebEntry>
result;
50
51
52 LArBadChannelParser
parser(fname, &log, 4, -1, 4);
53 if (!
parser.fileStatusGood()) {
54 log << MSG::ERROR <<
"Failed to open missing FEBs file " <<
fname <<
endmsg;
56 }
57
58 typedef std::string ParseType;
59 typedef std::pair<std::vector<int>, std::vector<ParseType> > ParsedLine;
60 std::vector<ParsedLine>
parsed =
parser.parseFile<ParseType>();
61 for (std::vector<ParsedLine>::const_iterator i=
parsed.begin();
64 if (!hwid.empty()) {
65
67 if (badFeb.first) {
68 for (std::vector<HWIdentifier>::const_iterator i=hwid.begin(); i!=hwid.end(); ++i) {
69 result.emplace_back( *i, badFeb.second);
70 }
71 }
72 }
73 }
75}
std::pair< bool, LArBadFeb > constructFebStatus(const std::vector< std::string > &vec, MsgStream &log) const
std::vector< HWIdentifier > constructFebId(const std::vector< int > &intVec, MsgStream &log) const
◆ m_febPacking
◆ m_isSC
| bool LArBadChannelDecoder::m_isSC |
|
private |
◆ m_onlineID
◆ m_packing
◆ m_SCpacking
The documentation for this class was generated from the following files: