25 return StatusCode::SUCCESS;
39 cabling=(*cablingHdl);
43 if (doExecSummary && !
m_isSC) {
45 badFebCont=(*badFebHdl);
51 StatusCode
sc =
detStore()->retrieve(ll,
"LArOnline_SuperCellID");
54 return StatusCode::FAILURE;
61 StatusCode
sc =
detStore()->retrieve(ll,
"LArOnlineID");
64 return StatusCode::FAILURE;
71 std::ostream *out = &(std::cout);
72 std::ofstream outfile;
74 outfile.open(
m_fileName.value().c_str(),std::ios::out);
75 if (outfile.is_open()) {
86 std::vector<std::vector<unsigned> > problemMatrix(
nProblemTypes, std::vector<unsigned>(
nParts));
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);
93 for (; it != it_e; ++it) {
95 if (cabling && !cabling->isOnlineConnected(chid))
123 Identifier offid = cabling->cnvToIdentifier(chid);
141 ++problemMatrix[
Noisy][dp];
153 ++problemMatrix[
Fibre][dp];
172 ATH_MSG_INFO (
"Found " <<
count <<
" entries in the bad-channel database. (Number of connected cells: " << nConnected <<
")" );
174 ATH_MSG_INFO (
"Found " <<
count <<
" entries in the bad-channel database. (Number of cells: " << nConnected <<
")");
179 if (outfile.is_open())
184 std::ofstream exeSum;
186 if (!exeSum.is_open()) {
188 return StatusCode::FAILURE;
194 exeSum <<
"LAr SuperCells dead readout (incl masked OSUM)" << std::endl;
197 exeSum <<
"LAr SuperCells suffering from high noise:" << std::endl;
200 exeSum <<
"LAr SuperCells w/o calibration (constants from phi average of eta neighbours):" << std::endl;
203 exeSum <<
"LAr SuperCells with distorted pulse shape:" << std::endl;
206 exeSum <<
"LAr SuperCells having problems with the peak reco:" << std::endl;
209 exeSum <<
"LAr SuperCells having problems with the optical transmission:" << std::endl;
212 exeSum <<
"LAr SuperCells not usable:" << std::endl;
216 exeSum <<
"LAr dead readout channels:" << std::endl;
219 exeSum <<
"LAr permanently dead channels inside detector:" << std::endl;
222 exeSum <<
"LAr noisy readout channels (more than 10 sigma above phi average or unstable):" << std::endl;
225 exeSum <<
"LAr readout channels showing sporadic noise bursts:" << std::endl;
228 exeSum <<
"LAr readout channels w/o calibration (constants from phi average of eta neighbours):" << std::endl;
231 exeSum <<
"LAr readout channels connected to inactive Front End Boards:" << std::endl;
234 exeSum <<
"LAr readout channels not usable:" << std::endl;
241 return StatusCode::SUCCESS;
247 const unsigned nTot=std::accumulate(nChans.begin(),nChans.end(),0);
248 const unsigned nTotProb=std::accumulate(probs.begin(),probs.end(),0);
250 constexpr const char*
fmt=
"{:>7}: {:>5} of {} ({:.3f}%)\n";
252 auto f = [](
unsigned den)->
double{
253 if (den > 0)
return 100./den;
256 exeFile << std::format(
fmt,
"EMB",probs[
EMB], nChans[
EMB], probs[
EMB]*f(nChans[
EMB]));
257 exeFile << std::format(
fmt,
"EMEC",probs[
EMEC], nChans[
EMEC], probs[
EMEC]*f(nChans[
EMEC]));
259 exeFile << std::format(
fmt,
"EMEC",probs[
HEC], nChans[
HEC], probs[
HEC]*f(nChans[
HEC]));
260 exeFile << std::format(
fmt,
"EMEC",probs[
FCAL], nChans[
FCAL], probs[
FCAL]*f(nChans[
FCAL]));
261 exeFile << std::format(
fmt,
"Total",nTotProb,nTot,nTotProb*f(nTot));
263 exeFile << std::endl;
#define ATH_CHECK
Evaluate an expression and check for errors.
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
virtual StatusCode initialize() final
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
virtual StatusCode execute() final
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.
Helper for the Liquid Argon Calorimeter cell identifiers.
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