15 class TransformSignalSentry {
18 : a_(
a), sc_(sc), mcc_(mcc) {
20 a_->preModuleTransformSignal_(sc_, mcc_);
22 ~TransformSignalSentry() {
24 a_->postModuleTransformSignal_(sc_, mcc_);
33 class TransformAcquiringSignalSentry {
38 : a_(
a), sc_(sc), mcc_(mcc) {
40 a_->preModuleTransformAcquiringSignal_(sc_, mcc_);
42 ~TransformAcquiringSignalSentry() {
44 a_->postModuleTransformAcquiringSignal_(sc_, mcc_);
75 auto const& list = iBase.typeLabelList();
77 std::size_t
index = 0;
79 for (
auto const& element : list) {
80 if (not element.isTransform_) {
83 if (element.typeID_ == iBranch.unwrappedTypeID() &&
84 element.productInstanceName_ == iBranch.productInstanceName()) {
100 auto const& putInfo = list[*
it];
104 putInfo.productInstanceName_.c_str(),
114 auto const& mcc =
iEvent.moduleCallingContext();
115 if (transformInfo_.get<kPreTransform>(iIndex)) {
121 handle =
iEvent.get(transformInfo_.get<
kType>(iIndex), transformInfo_.get<kResolverIndex>(iIndex));
123 iHolder.doneWaiting(std::current_exception());
127 auto cache = std::make_shared<std::any>();
130 std::exception_ptr
const* iPtr)
mutable {
132 holder.doneWaiting(*iPtr);
135 auto mcc =
iEvent.moduleCallingContext();
137 iEvent.put(iBase.putTokenIndexToProductResolverIndex()[transformInfo_.get<kToken>(iIndex).
index()],
144 *
cache = transformInfo_.get<kPreTransform>(iIndex)(*(
handle->wrapper()), wta);
146 wta.doneWaiting(std::current_exception());
151 auto handle =
iEvent.get(transformInfo_.get<
kType>(iIndex), transformInfo_.get<kResolverIndex>(iIndex));
157 iEvent.put(iBase.putTokenIndexToProductResolverIndex()[transformInfo_.get<kToken>(iIndex).
index()],
158 transformInfo_.get<kTransform>(iIndex)(
std::move(
v)),
162 iHolder.doneWaiting(std::current_exception());
bool any(const std::vector< T > &v, const T &what)
EDPutToken transforms(const TypeID &id, std::string instanceName)
static const std::string kType("type")
TypeLabelList const & typeLabelList() const
used by the fwk to register the list of products of this module
ProductResolverIndex index(KindOfType kindOfType, TypeID const &typeID, char const *moduleLabel, char const *instance, char const *process=nullptr) const
FunctorWaitingTask< F > * make_waiting_task(F f)
constexpr value_type index() const noexcept
StreamContext const * getStreamContext() const noexcept(false)
std::string const & processName() const
std::string const & moduleLabel() const