5#ifndef ACTSTRACK_SAFEDECORATOR_H
6#define ACTSTRACK_SAFEDECORATOR_H
18#include "GaudiKernel/EventContext.h"
29 template <
class T_Cont,
class T>
30 std::vector<SG::WriteDecorHandle<T_Cont,T> >
32 const EventContext &ctx) {
33 std::vector<SG::WriteDecorHandle<T_Cont,T> > out;
34 out.reserve(keys.size());
36 out.emplace_back(a_key,ctx);
37 if (not out.back().isValid()) {
38 std::stringstream
msg;
39 msg <<
"Failed to create decorator handdle " << a_key.key();
40 throw std::runtime_error(
msg.str() );
48 template<
class T_Parent,
class T_Cont>
51 const std::string &prefix,
52 const std::vector<std::string> &decor_names,
55 decor_out.reserve(decor_names.size());
56 for (
const std::string &a_decor_name : decor_names) {
57 assert( !a_decor_name.empty() );
58 decor_out.emplace_back(container_key.
key()+
"."+prefix+a_decor_name);
61 parent.declare(decor_out.back());
62 decor_out.back().setOwner(&parent);
63 decor_out.back().initialize().ignore();
Base class for elements of a container that can have aux data.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Handle class for reading a decoration on an object.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
Property holding a SG store/key/clid from which a ReadHandle is made.
const std::string & key() const
Return the StoreGate ID for the referenced object.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
void createDecoratorKeys(T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::WriteDecorHandleKey< T_Cont > > &decor_out)
std::vector< SG::WriteDecorHandle< T_Cont, T > > createDecorators(const std::vector< SG::WriteDecorHandleKey< T_Cont > > &keys, const EventContext &ctx)