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_TOffset.
cptr() ==
nullptr) {
31 return StatusCode::FAILURE;
33 ATH_MSG_DEBUG(
"Size of CondAttrListCollection" << readHandle_TOffset.
fullKey() <<
" = " << readHandle_TOffset->size());
34 EventIDRange rangeW_TOffset;
35 if (!readHandle_TOffset.
range(rangeW_TOffset)) {
36 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle_TOffset.
key());
37 return StatusCode::FAILURE;
42 EventIDRange rangeIntersection = EventIDRange::intersect(rangeW_TOffset);
43 if(rangeIntersection.start()>rangeIntersection.stop()) {
44 ATH_MSG_ERROR(
"Invalid intersection range: " << rangeIntersection);
45 return StatusCode::FAILURE;
48 auto outputCdo = std::make_unique<TgcDigitTimeOffsetData>();
49 constexpr std::string_view delimiter{
";"};
50 for (
const auto &[channel, attribute] : *readHandle_TOffset.
cptr()) {
51 const coral::Blob& blob_strip = attribute[
"bTimeOffset_strip"].data<coral::Blob>();
52 const std::string strstrip{
static_cast<const char*
>(blob_strip.startingAddress())};
55 auto it = std::begin(tokens);
62 uint16_t chamberId = (station_number << 3) + station_eta;
63 outputCdo->stripOffset.emplace(chamberId, offset_strip);
65 const coral::Blob& blob_wire = attribute[
"bTimeOffset_wire"].data<coral::Blob>();
66 const std::string strwire{
static_cast<const char*
>(blob_wire.startingAddress())};
70 it = std::begin(tokens);
77 chamberId = (station_number << 3) + station_eta;
78 outputCdo->wireOffset.emplace(chamberId, offset_wire);
82 if (writeHandle.
record(rangeIntersection, std::move(outputCdo)).isFailure()) {
83 ATH_MSG_FATAL(
"Could not record TgcDigitTimeOffsetData " << writeHandle.
key()
84 <<
" with EventRange " << rangeIntersection
85 <<
" into Conditions Store");
86 return StatusCode::FAILURE;
88 ATH_MSG_DEBUG(
"recorded new " << writeHandle.
key() <<
" with range " << rangeIntersection <<
" into Conditions Store");
90 return StatusCode::SUCCESS;