29 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.
fullKey() <<
" is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order.");
30 return StatusCode::SUCCESS;
34 std::unique_ptr<PixelTDAQData> writeCdo(std::make_unique<PixelTDAQData>());
36 const EventIDBase start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0,
37 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
38 const EventIDBase stop {EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1,
39 EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
41 EventIDRange rangeW{start, stop};
45 if (readCdo==
nullptr) {
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()= " << readCdo->
size());
58 std::vector<int> checkActive;
59 for (
const auto & attrList : *readCdo) {
61 checkActive.push_back((
int)channelNumber-1);
64 for (
int i=0; i<(int)
m_pixelID->wafer_hash_max(); i++) {
65 auto itr = std::find(checkActive.begin(),checkActive.end(),i);
66 if ((
size_t)std::distance(checkActive.begin(),itr)==checkActive.size()) { writeCdo->setModuleStatus(i,1); }
70 if (writeHandle.
record(rangeW, std::move(writeCdo)).isFailure()) {
71 ATH_MSG_FATAL(
"Could not record PixelTDAQData " << writeHandle.
key() <<
" with EventRange " << rangeW <<
" into Conditions Store");
72 return StatusCode::FAILURE;
74 ATH_MSG_INFO(
"recorded new CDO " << writeHandle.
key() <<
" with range " << rangeW <<
" into Conditions Store");
76 return StatusCode::SUCCESS;