24 <<
". In theory this should not be called, but may happen"
25 <<
" if multiple concurrent events are being processed out of order.");
26 return StatusCode::SUCCESS;
29 if (readHandle_XTalk.
cptr() ==
nullptr) {
31 return StatusCode::FAILURE;
33 ATH_MSG_DEBUG(
"Size of CondAttrListCollection" << readHandle_XTalk.
fullKey() <<
" = " << readHandle_XTalk->size());
34 EventIDRange rangeW_XTalk;
35 if (!readHandle_XTalk.
range(rangeW_XTalk)) {
36 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle_XTalk.
key());
37 return StatusCode::FAILURE;
42 EventIDRange rangeIntersection = EventIDRange::intersect(rangeW_XTalk);
43 if(rangeIntersection.start()>rangeIntersection.stop()) {
44 ATH_MSG_ERROR(
"Invalid intersection range: " << rangeIntersection);
45 return StatusCode::FAILURE;
48 auto outputCdo = std::make_unique<TgcDigitCrosstalkData>();
49 constexpr std::string_view delimiter{
";"};
50 for (
const auto &[channel, attribute] : *readHandle_XTalk.
cptr()) {
51 const coral::Blob& blob_strip = attribute[
"bXTalk_strip"].data<coral::Blob>();
52 const std::string strstrip{
static_cast<const char*
>(blob_strip.startingAddress())};
55 auto it = std::begin(tokens);
70 uint16_t layerId = (station_number << 5) + (station_eta << 2) + layer;
71 std::array<float, TgcDigitCrosstalkData::N_PROB> prob_strip{prob10, prob11, prob20, prob21};
72 outputCdo->setStripProbability(layerId, prob_strip);
74 const coral::Blob& blob_wire = attribute[
"bXTalk_wire"].data<coral::Blob>();
75 const std::string strwire {
static_cast<const char*
>(blob_wire.startingAddress())};
78 it = std::begin(tokens);
93 layerId = (station_number << 5) + (station_eta << 2) + layer;
94 std::array<float, TgcDigitCrosstalkData::N_PROB> prob_wire{prob10, prob11, prob20, prob21};
95 outputCdo->setWireProbability(layerId, prob_wire);
99 if (writeHandle.
record(rangeIntersection, std::move(outputCdo)).isFailure()) {
100 ATH_MSG_FATAL(
"Could not record TgcDigitCrosstalkData " << writeHandle.
key()
101 <<
" with EventRange " << rangeIntersection
102 <<
" into Conditions Store");
103 return StatusCode::FAILURE;
105 ATH_MSG_DEBUG(
"recorded new " << writeHandle.
key() <<
" with range " << rangeIntersection <<
" into Conditions Store");
107 return StatusCode::SUCCESS;