12 , m_condSvc{
"CondSvc",
name}
23 unsigned int n_parameters_total=0;
25 if (n_parameter_sets>0) {
29 return StatusCode::FAILURE;
33 n_parameters_total += n_parameters;
40 n_parameters_total = n_parameter_sets * n_parameters_per_set;
43 for (
unsigned int param_set_i=0; param_set_i<n_parameter_sets; ++param_set_i ) {
47 <<
" n_parameters_per_set=" << n_parameters_per_set );
50 ATH_MSG_FATAL(
"Number of parameters in ErorScalingParameters does not match expectation. Estimated " << n_parameters_total
53 return StatusCode::FAILURE;
65 return StatusCode::FAILURE;
68 return StatusCode::SUCCESS;
72 EventIDBase timestamp (
int t)
74 return {EventIDBase::UNDEFNUM,
75 EventIDBase::UNDEFEVT,
79 EventIDBase infiniteIOVEend() {
84 std::ostream &
operator<<(std::ostream &
out,
const std::vector<T> &
a) {
85 for (
const T &elm :
a) {
96 EventIDRange
range(timestamp(0),infiniteIOVEend());
102 assert( set_i < error_scaling->
params().
size() );
103 error_scaling->
params()[set_i].clear();
104 error_scaling->
params()[set_i].reserve(n_params);
105 for(
unsigned int param_i=0; param_i<n_params; ++param_i, ++param_iter) {
107 error_scaling->
params()[set_i].push_back( *param_iter );
115 if (param_i>= error_scaling->
params().size()) {
117 return StatusCode::FAILURE;
126 ATH_MSG_ERROR(
"Conditions data for " << write_handle.
key() <<
" not valid.");
127 return StatusCode::FAILURE;
129 if (write_handle.
record(
range, std::move(error_scaling)).isFailure()) {
130 ATH_MSG_FATAL(
"Could not record RIO_OnTrackErrorScaling " << write_handle.
key()
131 <<
" with EventRange " <<
range
132 <<
" into Conditions Store");
133 return StatusCode::FAILURE;
136 return StatusCode::SUCCESS;
141 return StatusCode::SUCCESS;