|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/MsgStream.h"
11 std::vector<LArBadChannelDecoder::BadChanEntry>
16 std::vector<BadChanEntry>
result;
20 if (!
parser.fileStatusGood()) {
21 log << MSG::ERROR <<
"Failed to open file " <<
fname
26 typedef std::string ParseType;
27 typedef std::pair<std::vector<int>, std::vector<ParseType> > ParsedLine;
28 std::vector<ParsedLine>
parsed =
parser.parseFile<ParseType>();
31 for (std::vector<ParsedLine>::const_iterator
i=
parsed.begin();
37 result.emplace_back( hwid, badCh.second);
44 std::vector<LArBadChannelDecoder::BadFebEntry>
48 std::vector<BadFebEntry>
result;
52 if (!
parser.fileStatusGood()) {
53 log << MSG::ERROR <<
"Failed to open missing FEBs file " <<
fname <<
endmsg;
57 typedef std::string ParseType;
58 typedef std::pair<std::vector<int>, std::vector<ParseType> > ParsedLine;
59 std::vector<ParsedLine>
parsed =
parser.parseFile<ParseType>();
60 for (std::vector<ParsedLine>::const_iterator
i=
parsed.begin();
67 for (std::vector<HWIdentifier>::const_iterator
i=hwid.begin();
i!=hwid.end(); ++
i) {
68 result.emplace_back( *
i, badFeb.second);
81 if (intVec.size() < 5) {
82 log << MSG::WARNING <<
"Failed to produce a channel HWIdentifier for ";
83 for (
unsigned int i=0;
i<intVec.size();
i++)
log << intVec[
i] <<
" ";
84 log <<
"not enough identifiers" <<
endmsg;
97 log <<
" to 0x" << MSG::hex << hwid << MSG::dec <<
endmsg;
107 MsgStream&
log)
const
109 const int maxFebPerFT = 15;
111 std::vector<HWIdentifier>
result;
112 if (intVec.size() != 4) {
113 log << MSG::WARNING <<
"Failed to produce a FEB HWIdentifier for ";
114 for (
unsigned int i=0;
i<intVec.size();
i++)
log << intVec[
i] <<
" ";
115 log <<
"not enough identifiers" <<
endmsg;
120 if (intVec[
slot] == -1) {
121 std::vector<int>
vec( intVec);
138 MsgStream&
log)
const
141 if (
v.size() != 4)
return invalid;
145 log <<
" to 0x" << MSG::hex << hwid << MSG::dec <<
endmsg;
155 std::pair<bool,LArBadChannel>
159 for(std::vector<std::string>::const_iterator
it =
vec.begin();
it !=
vec.end(); ++
it) {
166 log << MSG::WARNING <<
"LArBadChannelDecoder REJECTED line with "
167 <<
":\t unrecognized problem status: " << *
it <<
endmsg;
168 return std::pair<bool,LArBadChannel>(
false,
result);
171 return std::pair<bool,LArBadChannel>(
true,
result);
174 std::pair<bool,LArBadFeb>
176 MsgStream&
log)
const
179 for(std::vector<std::string>::const_iterator
it =
vec.begin();
it !=
vec.end(); ++
it) {
182 log << MSG::WARNING <<
"LArBadChannelDecoder REJECTED line with "
183 <<
":\t unrecognized problem status: " << *
it <<
endmsg;
184 return std::pair<bool,LArBadFeb>(
false,
result);
187 return std::pair<bool,LArBadFeb>(
true,
result);
196 <<
" slot " << intVec[
slot];
197 if (intVec.size() >= 5)
log <<
" ch " << intVec[
channel];
static CaloPartEnum caloPart(CoolChannelEnum chan)
static int barrelEndcap(CoolChannelEnum chan)
static int posNeg(CoolChannelEnum chan)
std::vector< size_t > vec
static MsgStream & insertExpandedID(const std::vector< int > &intVec, MsgStream &log)
LArBadChanSCBitPacking m_SCpacking
bool is_valid() const
Check if id is in a valid state.
LArBadFebBitPacking m_febPacking
LArBadChanBitPacking m_packing
const LArOnlineID_Base * m_onlineID
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
bool isFCALchannel(const HWIdentifier id) const
virtual bool isHECchannel(const HWIdentifier id) const =0
Exception class for LAr online Identifiers.
HWIdentifier constructSingleFebId(const std::vector< int > &v, MsgStream &log) const
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
HWIdentifier constructChannelId(const std::vector< int > &intVec, State::CoolChannelEnum coolChan, MsgStream &log) const
void setBit(ProblemType pb, BitWord &word, bool value=true) const
std::pair< bool, LArBadChannel > constructStatus(const std::vector< std::string > &vec, MsgStream &log) const
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
static std::string coolChannelName(CoolChannelEnum chan)
virtual bool isEMECchannel(const HWIdentifier id) const =0
bool checkId(const HWIdentifier &, int be, int pn, State::CoolChannelEnum) const
std::vector< HWIdentifier > constructFebId(const std::vector< int > &intVec, MsgStream &log) const
bool isEMBchannel(const HWIdentifier id) const
std::vector< BadChanEntry > readASCII(const std::string &name, State::CoolChannelEnum coolChan, MsgStream &log) const
std::vector< BadFebEntry > readFebASCII(const std::string &fname, MsgStream &log) const
std::pair< bool, LArBadFeb > constructFebStatus(const std::vector< std::string > &vec, MsgStream &log) const
void setBit(typename T::ProblemType pb, LArBadChannel::BitWord &word, bool value=true) const