4#ifndef MUONTRUTHALGS_DECORUTILS_H
5#define MUONTRUTHALGS_DECORUTILS_H
12 template <
typename ContType,
typename DataType>
14 template <
typename ContType,
typename DataType>
19 template <
typename DataType,
typename ContType>
27 auto decorHandle = std::make_unique<SG::WriteDecorHandle<ContType, DataType>>(
key, ctx);
28 for (
const auto* obj : (**decorHandle)){
29 (*decorHandle)(*obj) =
defVal;
34 template <
typename DataType,
typename ContType>
40 for (
const SG::WriteDecorHandleKey<ContType>& key : keys) {
41 handles.emplace_back(
makeHandle(ctx, key, defVal));
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/attr name from which a WriteDecorHandle is made.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
DecorHandlePtr_wt< ContType, DataType > makeHandle(const EventContext &ctx, const SG::WriteDecorHandleKey< ContType > &key, const DataType defVal={})
Returns a unique_ptr with an initialized WriteDecorHandle.
std::vector< DecorHandlePtr_wt< ContType, DataType > > DecorHandlePtrVec_t
std::unique_ptr< SG::WriteDecorHandle< ContType, DataType > > DecorHandlePtr_wt
DecorHandlePtrVec_t< ContType, DataType > makeHandles(const EventContext &ctx, const SG::WriteDecorHandleKeyArray< ContType > &keys, const DataType defVal={})
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray