26 msg(MSG::DEBUG) <<
"Found valid write handle" <<
endmsg;
27 return StatusCode::SUCCESS;
35 std::unique_ptr<LArBadChannelCont> badChannelCont=std::make_unique<LArBadChannelCont>();
46 if (attrListColl==
nullptr) {
47 msg(MSG::ERROR) <<
"Failed to retrieve CondAttributeListCollection with key " <<
m_BCInputKey.key() <<
endmsg;
48 return StatusCode::FAILURE;
55 for (;chanIt!=chanIt_e;++chanIt) {
57 const coral::AttributeList& attrList = chanIt->second;
58 const coral::Blob& blob = attrList[
"Blob"].data<coral::Blob>();
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 =
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");
112 for (
const auto& entry : badChannelCont->fullCont()) {
114 if (
id.is_valid()) oflVec.emplace_back(
id.get_identifier32().get_compact(),entry.second);
117 badChannelCont->setOflVec(oflVec);
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;
std::vector< std::pair< HWIdentifier, T > > decodeBlob(const coral::Blob *blobp, std::size_t chanSize, std::size_t stateSize, int endian, int version, MsgStream &log)
Checks BLOB for differences in endian-ness and size of data types with respect to the architecture on...