18 return StatusCode::SUCCESS;
25 if (writeHandle.isValid()) {
27 return StatusCode::SUCCESS;
35 std::unique_ptr<LArBadChannelCont> badChannelCont=std::make_unique<LArBadChannelCont>();
40 writeHandle.addDependency(cablingHdl);
46 if (attrListColl==
nullptr) {
48 return StatusCode::FAILURE;
50 writeHandle.addDependency(readHandle);
55 for (;chanIt!=chanIt_e;++chanIt) {
59 unsigned int chanSize = attrList[
"ChannelSize"].data<
unsigned int>();
60 unsigned int stateSize = attrList[
"StatusWordSize"].data<
unsigned int>();
61 unsigned int endian = attrList[
"Endianness"].data<
unsigned int>();
62 unsigned int version = attrList[
"Version"].data<
unsigned int>();
64 std::vector<std::pair<HWIdentifier,LArBadChannel> > bcVec =
65 LArBadChanBlobUtils::decodeBlob<LArBadChannel>( &
blob, chanSize, stateSize, endian,
68 for (
auto& idBC : bcVec) {
72 badChannelCont->
add(idBC.first, idBC.second);
93 for (
auto& idBC : bcVec) {
97 badChannelCont->
add(idBC.first, idBC.second);
101 size_t nChanBeforeMege=badChannelCont->
size();
102 badChannelCont->
sort();
104 ATH_MSG_INFO(
"Read a total of " << badChannelCont->
size() <<
" problematic channels from database");
105 if (nChanBeforeMege!=badChannelCont->
size()) {
106 ATH_MSG_INFO(
"Merged " << nChanBeforeMege-badChannelCont->
size() <<
" duplicate entries");
114 if (
id.is_valid()) oflVec.emplace_back(
id.get_identifier32().get_compact(),
entry.second);
119 if(writeHandle.record(std::move(badChannelCont)).isFailure()) {
120 ATH_MSG_ERROR(
"Could not record LArBadChannelCont object with "
122 <<
" with EventRange " << writeHandle.getRange()
123 <<
" into Conditions Store");
124 return StatusCode::FAILURE;
126 ATH_MSG_INFO(
"Recorded LArBadChannelCont object with key "
128 <<
" with EventRange " << writeHandle.getRange()
129 <<
" into Conditions Store");
130 return StatusCode::SUCCESS;