21 #include "CaloDetDescr/CaloDetDescrElement.h"
63 TString warn_binning=
"";
97 std::vector<std::string> availableErrorCodesStrs;
100 availableErrorCodesStrs.emplace_back(Form(
"%d",
code));
133 if(ctx.evt()+1 >
m_nevents )
return StatusCode::SUCCESS;
144 std::vector<LArChanHelp> the_coverageMap(0);
145 auto ref_the_coverageMap =
std::ref(the_coverageMap);
163 std::map<int,std::map<std::string,std::vector<LArChanHelp> > > coverageMap;
170 std::vector<long> knownDeadFEBs(0);
171 std::vector<long> knownErrorFEBs(0);
180 const LArOnOffIdMapping* larCabling{*cablingHdl};
183 return StatusCode::FAILURE;
188 if(! pRawChannelsContainer.
isValid() ) {
190 return StatusCode::SUCCESS;
198 lb1 = (
float)ctx.eventID().lumi_block();
211 if(!mfCont)
ATH_MSG_WARNING(
"Do not have Missing FEBs container !!" );
214 HWIdentifier febid = HWIdentifier(*allFeb);
215 const LArBadFeb febStatus = mfCont->status(febid);
216 if (febStatus.
deadAll() || febStatus.
deadReadout()) knownDeadFEBs.push_back(febid.get_compact());
217 if(febStatus.
inError()) knownErrorFEBs.push_back(febid.get_compact());
224 for (
const LArRawChannel& pRawChannel : *pRawChannelsContainer) {
225 uint16_t provenanceChan = pRawChannel.provenance();
226 float energyChan = pRawChannel.energy();
227 HWIdentifier
id = pRawChannel.hardwareID();
228 Identifier offlineID = larCabling->cnvToIdentifier(
id);
231 if(!larCabling->isOnlineConnected(
id))
continue;
243 if(caloDetElement == 0 ){
244 ATH_MSG_ERROR(
"Cannot retrieve (eta,phi) coordinates for raw channels" );
247 etaChan = caloDetElement->
eta_raw();
248 phiChan = caloDetElement->
phi_raw();
259 std::string cnGroup_toFill=
"";
263 else ATH_MSG_WARNING(
"LAr IDhelper returned unexpected sampling: " << sampling <<
". Group EM could not be filled.");
268 else ATH_MSG_WARNING(
"LAr IDhelper returned unexpected sampling: " << sampling <<
". Group HEC could not be filled.");
273 else ATH_MSG_WARNING(
"LAr IDhelper returned unexpected sampling: " << sampling <<
". Group FCAL could not be filled.");
280 std::string the_side= (etaChan >= 0 ?
"A" :
"C");
306 else if(energyChan != 0) cellContent=3;
314 if(knownDeadFEBs.size()>0 &&
std::find(knownDeadFEBs.begin(), knownDeadFEBs.end(), febID.get_compact())!=knownDeadFEBs.end()) {
315 if(cellContent==0) cellContent=1;
318 if(knownErrorFEBs.size()>0 &&
std::find(knownErrorFEBs.begin(), knownErrorFEBs.end(), febID.get_compact())!=knownErrorFEBs.end())cellContent=1;
360 if(etaChan >= 0)
part+=
"A";
363 if(
part.find(
"FCal") != std::string::npos) coverageMap[cellContent][
part].push_back(
LArChanHelp(single_channel,i_ftslot,sampling,etaFCal,phiFCal));
364 else coverageMap[cellContent][
part].push_back(
LArChanHelp(single_channel,i_ftslot,sampling,etaChan,phiChan));
375 ref_the_coverageMap=coverageMap[chanStatusCodePair.first][
"EMBA"];
376 if(ref_the_coverageMap.get().size()!=0)
fill(
m_tools[
m_CoverageToolArrayEMBA.at(chanStatusCodePair.second)],mon_Channels,mon_ChanFtSlot,mon_Eta,mon_Phi,mon_isSampling0,mon_isSampling1,mon_isSampling2,mon_isSampling3);
378 ref_the_coverageMap=coverageMap[chanStatusCodePair.first][
"EMBC"];
379 if(ref_the_coverageMap.get().size()!=0)
fill(
m_tools[
m_CoverageToolArrayEMBC.at(chanStatusCodePair.second)],mon_Channels,mon_ChanFtSlot,mon_Eta,mon_Phi,mon_isSampling0,mon_isSampling1,mon_isSampling2,mon_isSampling3);
382 ref_the_coverageMap=coverageMap[chanStatusCodePair.first][
"EMECA"];
383 if(ref_the_coverageMap.get().size()!=0)
fill(
m_tools[
m_CoverageToolArrayEMECA.at(chanStatusCodePair.second)],mon_Channels,mon_ChanFtSlot,mon_Eta,mon_Phi,mon_isSampling0,mon_isSampling1,mon_isSampling2,mon_isSampling3);
386 ref_the_coverageMap=coverageMap[chanStatusCodePair.first][
"EMECC"];
387 if(ref_the_coverageMap.get().size()!=0)
fill(
m_tools[
m_CoverageToolArrayEMECC.at(chanStatusCodePair.second)],mon_Channels,mon_ChanFtSlot,mon_Eta,mon_Phi,mon_isSampling0,mon_isSampling1,mon_isSampling2,mon_isSampling3);
390 ref_the_coverageMap=coverageMap[chanStatusCodePair.first][
"HECA"];
391 if(ref_the_coverageMap.get().size()!=0)
fill(
m_tools[
m_CoverageToolArrayHECA.at(chanStatusCodePair.second)],mon_Channels,mon_ChanFtSlot,mon_Eta,mon_Phi,mon_isSampling0,mon_isSampling1,mon_isSampling2,mon_isSampling3);
394 ref_the_coverageMap=coverageMap[chanStatusCodePair.first][
"HECC"];
395 if(ref_the_coverageMap.get().size()!=0)
fill(
m_tools[
m_CoverageToolArrayHECC.at(chanStatusCodePair.second)],mon_Channels,mon_ChanFtSlot,mon_Eta,mon_Phi,mon_isSampling0,mon_isSampling1,mon_isSampling2,mon_isSampling3);
398 ref_the_coverageMap=coverageMap[chanStatusCodePair.first][
"FCalA"];
399 if(ref_the_coverageMap.get().size()!=0)
fill(
m_tools[
m_CoverageToolArrayFCalA.at(chanStatusCodePair.second)],mon_Channels,mon_ChanFtSlot,mon_Eta,mon_Phi,mon_isSampling0,mon_isSampling1,mon_isSampling2,mon_isSampling3);
402 ref_the_coverageMap=coverageMap[chanStatusCodePair.first][
"FCalC"];
403 if(ref_the_coverageMap.get().size()!=0)
fill(
m_tools[
m_CoverageToolArrayFCalC.at(chanStatusCodePair.second)],mon_Channels,mon_ChanFtSlot,mon_Eta,mon_Phi,mon_isSampling0,mon_isSampling1,mon_isSampling2,mon_isSampling3);
407 return StatusCode::SUCCESS;
421 LArBadChannel bc = bcCont->
status(onID);
424 if(bc.deadCalib())
flag = 1;
425 if(bc.lowNoiseHG()||bc.lowNoiseMG()||bc.lowNoiseLG())
flag = 2;
426 if(bc.distorted())
flag = 3;
427 if(bc.unstable())
flag = 4;
428 if(bc.sporadicBurstNoise())
flag = 5;
429 if(bc.highNoiseHG()|| bc.highNoiseMG() || bc.highNoiseLG())
flag = 6;
430 if(bc.deadReadout()||bc.deadPhys()||bc.almostDead()||bc.shortProblem())
flag = 7;