29 if (writeHandleStatus.
isValid()) {
30 ATH_MSG_DEBUG(
"CondHandle " << writeHandleStatus.
fullKey() <<
" is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order.");
31 return StatusCode::SUCCESS;
35 std::unique_ptr<PixelDCSStatusData> writeCdoStatus(std::make_unique<PixelDCSStatusData>());
37 const EventIDBase start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0, 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
38 const EventIDBase stop {EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
40 EventIDRange rangeW{start, stop};
45 if (readCdoStatus==
nullptr) {
46 ATH_MSG_FATAL(
"Null pointer to the read conditions object (state)");
47 return StatusCode::FAILURE;
50 if (not readHandle.
range(rangeW)) {
52 return StatusCode::FAILURE;
54 ATH_MSG_INFO(
"Size of CondAttrListCollection " << readHandle.
fullKey() <<
" readCdo->size()= " << readCdoStatus->
size());
58 const std::string paramStatus =
"FSM_status";
59 for (
const auto & readCdoStatu : *readCdoStatus) {
62 if (payload.exists(paramStatus.c_str()) and not payload[paramStatus.c_str()].isNull()) {
63 const std::string& val = payload[paramStatus.c_str()].data<std::string>();
70 ATH_MSG_WARNING(paramStatus <<
" does not exist for ChanNum " << channelNumber);
76 for (
int i=0; i<(int)
m_pixelID->wafer_hash_max(); i++) {
81 if (writeHandleStatus.
record(rangeW, std::move(writeCdoStatus)).isFailure()) {
82 ATH_MSG_FATAL(
"Could not record PixelDCSStatusData " << writeHandleStatus.
key() <<
" with EventRange "
83 << writeHandleStatus.
getRange() <<
" into Conditions Store");
84 return StatusCode::FAILURE;
86 ATH_MSG_INFO(
"recorded new CDO " << writeHandleStatus.
key() <<
" with range "
87 << writeHandleStatus.
getRange() <<
" into Conditions Store");
89 return StatusCode::SUCCESS;