6 #include "GaudiKernel/EventIDRange.h"
16 m_pixelID(nullptr) { }
26 return StatusCode::SUCCESS;
34 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.");
35 return StatusCode::SUCCESS;
39 std::unique_ptr<PixeldEdxData> writeCdo(std::make_unique<PixeldEdxData>());
41 const EventIDBase
start{EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, 0, 0, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
42 const EventIDBase
stop {EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM};
53 if (readCdo==
nullptr) {
55 return StatusCode::FAILURE;
58 ATH_MSG_DEBUG(
"Size of AthenaAttributeList " << readHandle.
fullKey() <<
" readCdo->size()= " << readCdo->size());
61 if (not readHandle.
range(rangeW)) {
63 return StatusCode::FAILURE;
65 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandle.
fullKey() <<
" readCdo->size()= " << readCdo->size());
69 std::string mystring=(*readCdo)[
"data"].data<std::string>();
70 std::istringstream mystringstream(mystring);
72 if (mystringstream.eof() || mystringstream.fail()) {
74 return StatusCode::FAILURE;
78 mystringstream >> fun_type;
79 mystringstream >> bb_type;
81 writeCdo -> setFunctionType(fun_type);
82 writeCdo -> setBetheBlochType(bb_type);
86 for (
int i=0;
i<5;
i++) {
87 for (
int j=0;j<9;j++) {
89 mystringstream >> param;
90 writeCdo -> setPar(
i,param);
93 writeCdo -> setPosNeg(
false);
96 for (
int i=0;
i<2*5;
i++) {
97 for (
int j=0;j<9;j++) {
99 mystringstream >> param;
100 writeCdo -> setPar(
i,param);
103 writeCdo -> setPosNeg(
true);
110 return StatusCode::FAILURE;
115 return StatusCode::FAILURE;
121 writeCdo -> setFunctionType(fun_type);
122 writeCdo -> setBetheBlochType(bb_type);
126 for (
int i=0;
i<5;
i++) {
127 for (
int j=0;j<9;j++) {
130 writeCdo -> setPar(
i,param);
133 writeCdo -> setPosNeg(
false);
136 for (
int i=0;
i<2*5;
i++) {
137 for (
int j=0;j<9;j++) {
140 writeCdo -> setPar(
i,param);
143 writeCdo -> setPosNeg(
true);
148 if (writeHandle.
record(rangeW, std::move(writeCdo)).isFailure()) {
149 ATH_MSG_FATAL(
"Could not record PixeldEdxData " << writeHandle.
key() <<
" with EventRange " << rangeW <<
" into Conditions Store");
150 return StatusCode::FAILURE;
152 ATH_MSG_DEBUG(
"recorded new CDO " << writeHandle.
key() <<
" with range " << rangeW <<
" into Conditions Store");
154 return StatusCode::SUCCESS;