6 #include "GaudiKernel/EventIDRange.h"
25 return StatusCode::SUCCESS;
33 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.
fullKey() <<
" is already valid.. In theory this should not be called, but may happen if multiple concurrent events are being processed out of order.");
34 return StatusCode::SUCCESS;
38 std::unique_ptr<PixeldEdxData> writeCdo(std::make_unique<PixeldEdxData>());
40 const EventIDBase
start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0, 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
41 const EventIDBase
stop {EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
52 if (readCdo==
nullptr) {
54 return StatusCode::FAILURE;
57 ATH_MSG_DEBUG(
"Size of AthenaAttributeList " << readHandle.
fullKey() <<
" readCdo->size()= " << readCdo->size());
60 if (not readHandle.
range(rangeW)) {
62 return StatusCode::FAILURE;
64 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandle.
fullKey() <<
" readCdo->size()= " << readCdo->size());
68 std::string mystring=(*readCdo)[
"data"].data<std::string>();
69 std::istringstream mystringstream(mystring);
71 if (mystringstream.eof() || mystringstream.fail()) {
73 return StatusCode::FAILURE;
77 mystringstream >> fun_type;
78 mystringstream >> bb_type;
80 writeCdo -> setFunctionType(fun_type);
81 writeCdo -> setBetheBlochType(bb_type);
85 for (
int i=0;
i<5;
i++) {
86 for (
int j=0;j<9;j++) {
88 mystringstream >> param;
89 writeCdo -> setPar(
i,param);
92 writeCdo -> setPosNeg(
false);
95 for (
int i=0;
i<2*5;
i++) {
96 for (
int j=0;j<9;j++) {
98 mystringstream >> param;
99 writeCdo -> setPar(
i,param);
102 writeCdo -> setPosNeg(
true);
109 return StatusCode::FAILURE;
114 return StatusCode::FAILURE;
120 writeCdo -> setFunctionType(fun_type);
121 writeCdo -> setBetheBlochType(bb_type);
125 for (
int i=0;
i<5;
i++) {
126 for (
int j=0;j<9;j++) {
129 writeCdo -> setPar(
i,param);
132 writeCdo -> setPosNeg(
false);
135 for (
int i=0;
i<2*5;
i++) {
136 for (
int j=0;j<9;j++) {
139 writeCdo -> setPar(
i,param);
142 writeCdo -> setPosNeg(
true);
147 if (writeHandle.
record(rangeW, std::move(writeCdo)).isFailure()) {
148 ATH_MSG_FATAL(
"Could not record PixeldEdxData " << writeHandle.
key() <<
" with EventRange " << rangeW <<
" into Conditions Store");
149 return StatusCode::FAILURE;
151 ATH_MSG_DEBUG(
"recorded new CDO " << writeHandle.
key() <<
" with range " << rangeW <<
" into Conditions Store");
153 return StatusCode::SUCCESS;