29 {
30
32
33 SG::ReadCondHandle<LArBadChannelCont>
bch{
m_BCKey};
35
36 const LArOnOffIdMapping*
cabling=
nullptr;
38 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{
m_cablingKey};
40 }
41
43 if (doExecSummary && !
m_isSC) {
44 SG::ReadCondHandle<LArBadFebCont> badFebHdl{
m_BFKey};
45 badFebCont=(*badFebHdl);
46 }
47
48 const LArOnlineID_Base* larOnlineID;
50 const LArOnline_SuperCellID*
ll;
54 return StatusCode::FAILURE;
55 } else {
58 }
59 } else {
60 const LArOnlineID*
ll;
64 return StatusCode::FAILURE;
65 } else {
68 }
69 }
70
71 std::ostream *
out = &(std::cout);
78 }
79 else
81 }
82
83 const LArBadChanBitPacking packing;
84 const LArBadChanSCBitPacking SCpacking;
85
86 std::vector<std::vector<unsigned> > problemMatrix(
nProblemTypes, std::vector<unsigned>(
nParts));
87
88 std::vector<HWIdentifier>::const_iterator
it = larOnlineID->
channel_begin();
89 std::vector<HWIdentifier>::const_iterator it_e = larOnlineID->
channel_end();
90 unsigned count = 0, nConnected = 0;
91 std::vector<unsigned> nPerPart(
nParts);
92
93 for (;
it != it_e; ++
it) {
94 const HWIdentifier chid = *
it;
95 if (cabling && !
cabling->isOnlineConnected(chid))
96 continue;
97 ++nConnected;
98
106
108
109 LArBadChannel bc = badChannelCont->
status(chid);
110
114
117 } else {
119 }
120
122 if (cabling) {
123 Identifier offid =
cabling->cnvToIdentifier(chid);
125 }
126 (*out) << std::endl;
127 }
128
129 if (doExecSummary) {
130 HWIdentifier fid = larOnlineID->
feb_Id(chid);
131 LArBadFeb bf;
133
144
147
150 }
151
154 }
155
161 }
162 else {
165 }
166
167
168 }
169
170 }
172 ATH_MSG_INFO (
"Found " <<
count <<
" entries in the bad-channel database. (Number of connected cells: " << nConnected <<
")" );
173 else
174 ATH_MSG_INFO (
"Found " <<
count <<
" entries in the bad-channel database. (Number of cells: " << nConnected <<
")");
177 else
181
182
183 if (doExecSummary) {
184 std::ofstream exeSum;
186 if (!exeSum.is_open()) {
188 return StatusCode::FAILURE;
189 }
190
192
194 exeSum << "LAr SuperCells dead readout (incl masked OSUM)" << std::endl;
196
197 exeSum << "LAr SuperCells suffering from high noise:" << std::endl;
199
200 exeSum << "LAr SuperCells w/o calibration (constants from phi average of eta neighbours):" << std::endl;
202
203 exeSum << "LAr SuperCells with distorted pulse shape:" << std::endl;
205
206 exeSum << "LAr SuperCells having problems with the peak reco:" << std::endl;
208
209 exeSum << "LAr SuperCells having problems with the optical transmission:" << std::endl;
211
212 exeSum << "LAr SuperCells not usable:" << std::endl;
214 }
215 else {
216 exeSum << "LAr dead readout channels:" << std::endl;
218
219 exeSum << "LAr permanently dead channels inside detector:" << std::endl;
221
222 exeSum << "LAr noisy readout channels (more than 10 sigma above phi average or unstable):" << std::endl;
224
225 exeSum << "LAr readout channels showing sporadic noise bursts:" << std::endl;
227
228 exeSum << "LAr readout channels w/o calibration (constants from phi average of eta neighbours):" << std::endl;
230
231 exeSum << "LAr readout channels connected to inactive Front End Boards:" << std::endl;
233
234 exeSum << "LAr readout channels not usable:" << std::endl;
236 }
237
238 exeSum.close();
239 }
240
241 return StatusCode::SUCCESS;
242}
LArBadXCont< LArBadFeb > LArBadFebCont
LArBadXCont< LArBadChannel > LArBadChannelCont
const ServiceHandle< StoreGateSvc > & detStore() const
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
SG::ReadCondHandleKey< LArBadFebCont > m_BFKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Property< std::string > m_fileName
void writeSum(std::ofstream &exeFile, const std::vector< unsigned > &probs, const std::vector< unsigned > &nChans) const
Gaudi::Property< std::string > m_executiveSummaryFile
Gaudi::Property< bool > m_isSC
Gaudi::Property< bool > m_skipDisconnected
Gaudi::Property< bool > m_wMissing
bool offAmplitude() const
bool transmissionErrorFibre() const
bool lowLightFibre() const
bool deformedPulse() const
bool nonLinearRamp() const
bool deformedTail() const
bool sporadicBurstNoise() const
bool good() const
Returns true if no problems at all (all bits at zero)
bool deadAll() const
FEB is completely missing, e.g. powered off.
bool deactivatedInOKS() const
Deactivated in OKS.
bool deadReadout() const
FEB is not sending readout data, but the L1 trigger path is working.
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
virtual bool isEMECchannel(const HWIdentifier id) const =0
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
id_iterator channel_end() const
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
bool isFCALchannel(const HWIdentifier id) const
virtual bool isHECchannel(const HWIdentifier id) const =0
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
std::string stringStatus(const LArBadChannel &bc) const
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
::StatusCode StatusCode
StatusCode definition for legacy code.