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_TOffset.
cptr() ==
nullptr) {
34 return StatusCode::FAILURE;
36 ATH_MSG_DEBUG(
"Size of CondAttrListCollection" << readHandle_TOffset.
fullKey() <<
" = " << readHandle_TOffset->size());
37 EventIDRange rangeW_TOffset;
38 if (!readHandle_TOffset.
range(rangeW_TOffset)) {
39 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle_TOffset.
key());
40 return StatusCode::FAILURE;
45 EventIDRange rangeIntersection = EventIDRange::intersect(rangeW_TOffset);
46 if(rangeIntersection.start()>rangeIntersection.stop()) {
47 ATH_MSG_ERROR(
"Invalid intersection range: " << rangeIntersection);
48 return StatusCode::FAILURE;
51 auto outputCdo = std::make_unique<TgcDigitTimeOffsetData>();
52 constexpr std::string_view delimiter{
";"};
53 for (
const auto &[channel, attribute] : *readHandle_TOffset.
cptr()) {
54 const coral::Blob& blob_strip = attribute[
"bTimeOffset_strip"].data<coral::Blob>();
55 const std::string strstrip{
static_cast<const char*
>(blob_strip.startingAddress())};
58 auto it = std::begin(tokens);
65 uint16_t chamberId = (station_number << 3) + station_eta;
66 outputCdo->stripOffset.emplace(chamberId, offset_strip);
68 const coral::Blob& blob_wire = attribute[
"bTimeOffset_wire"].data<coral::Blob>();
69 const std::string strwire{
static_cast<const char*
>(blob_wire.startingAddress())};
73 it = std::begin(tokens);
80 chamberId = (station_number << 3) + station_eta;
81 outputCdo->wireOffset.emplace(chamberId, offset_wire);
85 if (writeHandle.
record(rangeIntersection, std::move(outputCdo)).isFailure()) {
86 ATH_MSG_FATAL(
"Could not record TgcDigitTimeOffsetData " << writeHandle.
key()
87 <<
" with EventRange " << rangeIntersection
88 <<
" into Conditions Store");
89 return StatusCode::FAILURE;
91 ATH_MSG_DEBUG(
"recorded new " << writeHandle.
key() <<
" with range " << rangeIntersection <<
" into Conditions Store");
93 return StatusCode::SUCCESS;