11#include "Gaudi/Algorithm.h"
18 typename T::const_value_type
from;
19 typename T::const_value_type
to;
22template <
typename T,
typename C>
26 std::map<std::string,std::string>
toCopy;
33 std::vector<SG::AuxElement::ConstAccessor<T>>
m_fromAcc;
37 const std::vector<std::string>& froms,
38 const std::string& to) {
39 for (
const auto& key:
toCopy) {
40 std::string fullto = to +
"." + key.second;
41 std::string doc =
"Key to move " + key.first +
"->" + key.second;
42 for (
const auto& from: froms) {
43 std::string fullfrom = from +
"." + key.first;
44 m_fromKeys.emplace_back(parent,
"read_" + key.first, fullfrom, doc);
47 m_toKeys.emplace_back(parent,
"write_" + key.second, fullto, doc);
51 return StatusCode::SUCCESS;
55 std::vector<SG::ReadDecorHandle<C,T>> from;
56 std::vector<SG::WriteDecorHandle<C,T>> to;
58 from.emplace_back(k, cxt);
61 to.emplace_back(k, cxt);
64 for (
const auto&
pair: pairs) {
65 for (
size_t iii = 0; iii < n_keys; iii++) {
#define ATH_CHECK
Evaluate an expression and check for errors.
StatusCode initialize(Gaudi::Algorithm *parent, const std::vector< std::string > &froms, const std::string &to)
VariableMule(const T &default_value)
std::map< std::string, std::string > toCopy
std::vector< SG::AuxElement::ConstAccessor< T > > m_fromAcc
SG::ReadDecorHandleKeyArray< C > RC
SG::WriteDecorHandleKeyArray< C > WC
void copy(const std::vector< MatchedPair< C > > &pairs, const EventContext &cxt) const
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray