28 {
29
32
34 if (m_isSC) {
36 ATH_CHECK(detStore()->retrieve(ll,
"LArOnline_SuperCellID"));
37 larOnlineID = ll;
39
40 } else {
41 const LArOnlineID*
ll=
nullptr;
45 }
46
47 const CaloCell_Base_ID* caloId;
48 if (m_isSC) {
49 const CaloCell_SuperCell_ID* cs = nullptr;
51 caloId = cs;
52 } else {
53 const CaloCell_ID*
cc =
nullptr;
56 }
57
58 unsigned nConnected = 0;
59 std::array<unsigned,2> nEMECIW{0,0};
60 std::array<unsigned,2> nEMECOW{0,0};
61 std::array<unsigned,2> nBarrel{0,0};
62 std::array<unsigned,2> nHEC{0,0};
63 std::array<unsigned,2> nFCAL{0,0};
64
65
66
67 for (
const HWIdentifier chid : larOnlineID->
channel_range()) {
68 if (!
cabling->isOnlineConnected(chid))
continue;
69 ++nConnected;
70 const Identifier
id=
cabling->cnvToIdentifier(chid);
71 if (!id.is_valid()) {
72 ATH_MSG_ERROR(
"Invalid offline id for online id 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec <<
" " << larOnlineID->
channel_name(chid));
73 }
74 else {
75 std::string subdet="Unkown";
76 int posneg=larOnlineID->
pos_neg(chid);
77 if (caloId->
is_em_barrel(
id)) {subdet=
"Barrel"; ++nBarrel[posneg];}
80 if (caloId->
is_hec(
id)) {subdet=
"HEC"; ++nHEC[posneg];}
81 if (caloId->
is_fcal(
id)) {subdet=
"FCAL"; ++nFCAL[posneg];}
82
83 ATH_MSG_DEBUG(
"Channel 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec <<
" " << larOnlineID->
channel_name(chid)
84 << " offline id 0x" << std::hex << id.get_identifier32().get_compact() << std::dec << " " << subdet);
86 ATH_MSG_ERROR(
"isEMB mismatch online Id 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec <<
" " << larOnlineID->
channel_name(chid)
87 << " offline id 0x" << std::hex << id.get_identifier32().get_compact() << std::dec << " onl "
89 }
91 ATH_MSG_ERROR(
"isEMECIW mismatch online Id 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec <<
" " << larOnlineID->
channel_name(chid)
92 << " offline id 0x" << std::hex << id.get_identifier32().get_compact() << std::dec << " onl "
94 }
96 ATH_MSG_ERROR(
"isEMECOW mismatch online Id 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec <<
" " << larOnlineID->
channel_name(chid)
97 << " offline id 0x" << std::hex << id.get_identifier32().get_compact() << std::dec << " onl "
99 }
101 ATH_MSG_ERROR(
"isEMEC mismatch online Id 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec <<
" " << larOnlineID->
channel_name(chid)
102 << " offline id 0x" << std::hex << id.get_identifier32().get_compact() << std::dec << " onl "
104 }
106 ATH_MSG_ERROR(
"isHEC mismatch online Id 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec <<
" " << larOnlineID->
channel_name(chid)
107 << " offline id 0x" << std::hex << id.get_identifier32().get_compact() << std::dec << " onl "
109 }
111 ATH_MSG_ERROR(
"isFCAL mismatch online Id 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec <<
" " << larOnlineID->
channel_name(chid)
112 << " offline id 0x" << std::hex << id.get_identifier32().get_compact() << std::dec << " onl "
114 }
115
116
117 }
118 }
119
120 if (m_isSC) {
121 ATH_MSG_INFO(
"checked " << nConnected <<
" super-cell channels.");
122 } else {
123 ATH_MSG_INFO(
"checked " << nConnected <<
" regular channels.");
124 }
126 ATH_MSG_INFO(
"Barrel " << nBarrel[0] <<
"/" << nBarrel[1]);
128 ATH_MSG_INFO(
"EMECOW " << nEMECIW[0] <<
"/" << nEMECIW[1]);
130 ATH_MSG_INFO(
"EMECIW " << nEMECOW[0] <<
"/" << nEMECOW[1]);
136 return StatusCode::SUCCESS;
137}
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
bool is_em_endcap_outer(const Identifier id) const
test if the id belongs to the EM Endcap outer wheel
bool is_em_endcap_inner(const Identifier id) const
test if the id belongs to the EM Endcap inner wheel
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
Helper for the Liquid Argon Calorimeter cell identifiers.
virtual bool isEMECchannel(const HWIdentifier id) const =0
bool isEMBchannel(const HWIdentifier id) const
virtual bool isEMECIW(const HWIdentifier id) const =0
id_range channel_range() const
virtual bool isEMECOW(const HWIdentifier id) const =0
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...
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
bool isFCALchannel(const HWIdentifier id) const
virtual bool isHECchannel(const HWIdentifier id) const =0
retrieve(aClass, aKey=None)