17 return StatusCode::SUCCESS;
26 msg(MSG::DEBUG) <<
"Found valid write handle" <<
endmsg;
27 return StatusCode::SUCCESS;
30 std::unique_ptr<LArBadFebCont> badFebCont=std::make_unique<LArBadFebCont>();
37 if (attrList==
nullptr) {
38 msg(MSG::ERROR) <<
"Failed to retrieve CondAttributeListCollection with key " <<
m_BCInputKey.key() <<
endmsg;
39 return StatusCode::FAILURE;
43 const coral::Blob& blob = (*attrList)[
"Blob"].data<coral::Blob>();
44 unsigned int chanSize = (*attrList)[
"ChannelSize"].data<
unsigned int>();
45 unsigned int stateSize = (*attrList)[
"StatusWordSize"].data<
unsigned int>();
46 unsigned int endian = (*attrList)[
"Endianness"].data<
unsigned int>();
47 unsigned int version = (*attrList)[
"Version"].data<
unsigned int>();
49 std::vector<std::pair<HWIdentifier,LArBadFeb> > bcVec =
53 for (
auto& idBC : bcVec) {
54 badFebCont->add(idBC.first,idBC.second);
67 std::vector<std::pair<HWIdentifier,LArBadFeb> > bcVec = decoder.readFebASCII(
m_inputFileName,
msg());
68 for (
auto& idBC : bcVec) {
69 badFebCont->add(idBC.first,idBC.second);
75 size_t nChanBeforeMege=badFebCont->size();
78 ATH_MSG_INFO(
"Read a total of " << badFebCont->size() <<
" problematic febs from database");
79 if (nChanBeforeMege!=badFebCont->size()) {
80 ATH_MSG_INFO(
"Merged " << nChanBeforeMege-badFebCont->size() <<
" duplicate entries");
83 if(writeHandle.
record(std::move(badFebCont)).isFailure()) {
86 <<
" with EventRange " << writeHandle.
getRange()
87 <<
" into Conditions Store");
88 return StatusCode::FAILURE;
92 <<
" with EventRange " << writeHandle.
getRange()
93 <<
" into Conditions Store");
96 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
An AttributeList represents a logical row of attributes in a metadata table.
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
SG::ReadCondHandleKey< AthenaAttributeList > m_BCInputKey
virtual StatusCode execute(const EventContext &ctx) const override final
SG::WriteCondHandleKey< LArBadFebCont > m_BCOutputKey
Gaudi::Property< std::string > m_inputFileName
virtual StatusCode initialize() override final
const std::string & key() const
void addDependency(const EventIDRange &range)
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
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...