27 <<
". In theory this should not be called, but may happen"
28 <<
" if multiple concurrent events are being processed out of order.");
29 return StatusCode::SUCCESS;
32 if (readHandle_XTalk.
cptr() ==
nullptr) {
34 return StatusCode::FAILURE;
36 ATH_MSG_DEBUG(
"Size of CondAttrListCollection" << readHandle_XTalk.
fullKey() <<
" = " << readHandle_XTalk->size());
37 EventIDRange rangeW_XTalk;
38 if (!readHandle_XTalk.
range(rangeW_XTalk)) {
39 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle_XTalk.
key());
40 return StatusCode::FAILURE;
45 EventIDRange rangeIntersection = EventIDRange::intersect(rangeW_XTalk);
46 if(rangeIntersection.start()>rangeIntersection.stop()) {
47 ATH_MSG_ERROR(
"Invalid intersection range: " << rangeIntersection);
48 return StatusCode::FAILURE;
51 auto outputCdo = std::make_unique<TgcDigitCrosstalkData>();
52 constexpr std::string_view delimiter{
";"};
53 for (
const auto &[channel, attribute] : *readHandle_XTalk.
cptr()) {
54 const coral::Blob& blob_strip = attribute[
"bXTalk_strip"].data<coral::Blob>();
55 const std::string strstrip{
static_cast<const char*
>(blob_strip.startingAddress())};
58 auto it = std::begin(tokens);
73 uint16_t layerId = (station_number << 5) + (station_eta << 2) + layer;
74 std::array<float, TgcDigitCrosstalkData::N_PROB> prob_strip{prob10, prob11, prob20, prob21};
75 outputCdo->setStripProbability(layerId, prob_strip);
77 const coral::Blob& blob_wire = attribute[
"bXTalk_wire"].data<coral::Blob>();
78 const std::string strwire {
static_cast<const char*
>(blob_wire.startingAddress())};
81 it = std::begin(tokens);
96 layerId = (station_number << 5) + (station_eta << 2) + layer;
97 std::array<float, TgcDigitCrosstalkData::N_PROB> prob_wire{prob10, prob11, prob20, prob21};
98 outputCdo->setWireProbability(layerId, prob_wire);
102 if (writeHandle.
record(rangeIntersection, std::move(outputCdo)).isFailure()) {
103 ATH_MSG_FATAL(
"Could not record TgcDigitCrosstalkData " << writeHandle.
key()
104 <<
" with EventRange " << rangeIntersection
105 <<
" into Conditions Store");
106 return StatusCode::FAILURE;
108 ATH_MSG_DEBUG(
"recorded new " << writeHandle.
key() <<
" with range " << rangeIntersection <<
" into Conditions Store");
110 return StatusCode::SUCCESS;