9 #include "CoralBase/Blob.h"
10 #include <string_view>
20 return StatusCode::SUCCESS;
25 if (writeHandle.isValid()) {
26 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
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;
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()) {
55 const std::string strstrip{
static_cast<const char*
>(blob_strip.startingAddress())};
66 outputCdo->stripOffset.emplace(chamberId, offset_strip);
69 const std::string strwire{
static_cast<const char*
>(blob_wire.startingAddress())};
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;