2 #ifndef FWCore_Framework_ESProducerExternalWork_h 3 #define FWCore_Framework_ESProducerExternalWork_h 23 #include <type_traits> 63 template <
typename T,
typename TDecorator>
75 template <
typename T,
typename TAcquireReturn,
typename TProduceReturn,
typename TRecord>
78 TProduceReturn (
T::*iProduceMethod)(
const TRecord&, TAcquireReturn),
84 template <
typename T,
typename TAcquireReturn,
typename TProduceReturn,
typename TRecord,
typename TDecorator>
87 TProduceReturn (
T ::*iProduceMethod)(
const TRecord&, TAcquireReturn),
88 const TDecorator& iDec,
90 return setWhatAcquiredProducedWithLambda<TAcquireReturn, TProduceReturn, TRecord>(
92 return (iThis->*iAcquireMethod)(iRecord,
std::move(iHolder));
94 [iThis, iProduceMethod](TRecord
const& iRecord, TAcquireReturn iAcquireReturn) {
95 return (iThis->*iProduceMethod)(iRecord,
std::move(iAcquireReturn));
106 template <
typename TAcquireFunc,
typename TProduceFunc>
108 TProduceFunc&& produceFunc,
111 using TAcquireReturn =
typename AcquireTypes::return_type;
113 using TProduceReturn =
typename ProduceTypes::return_type;
114 using TRecord =
typename ProduceTypes::argument_type;
117 return setWhatAcquiredProducedWithLambda<TAcquireReturn, TProduceReturn, TRecord>(
118 std::forward<TAcquireFunc>(acquireFunc), std::forward<TProduceFunc>(produceFunc), DecoratorType(), iLabel);
123 template <
typename TAcquireReturn,
124 typename TProduceReturn,
126 typename TAcquireFunc,
127 typename TProduceFunc,
130 TProduceFunc&& produceFunc,
134 using DecoratorType = std::decay_t<TDecorator>;
142 unsigned int iovIndex = 0;
143 auto temp = std::make_shared<CallbackType>(
this,
144 std::forward<TAcquireFunc>(acquireFunc),
145 std::forward<TProduceFunc>(produceFunc),
147 std::forward<TDecorator>(iDec));
149 std::make_shared<std::pair<unsigned int, std::shared_ptr<CallbackType>>>(iovIndex,
std::move(
temp));
152 static_cast<const TRecord*>(
nullptr),
auto setWhatAcquiredProducedWithLambda(TAcquireFunc &&acquireFunc, TProduceFunc &&produceFunc, const es::Label &iLabel={})
auto setWhatAcquiredProduced(T *iThis, const char *iLabel)
auto setWhatAcquiredProduced(T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
auto setWhatAcquiredProduced(T *iThis, const es::Label &iLabel={})
const TDecorator & createDecoratorFrom(T *, const TRecord *, const TDecorator &iDec)
ESConsumesInfo * consumesInfoPushBackNew()
auto setWhatAcquiredProduced(T *iThis, TAcquireReturn(T::*iAcquireMethod)(const TRecord &, WaitingTaskWithArenaHolder), TProduceReturn(T ::*iProduceMethod)(const TRecord &, TAcquireReturn), const TDecorator &iDec, const es::Label &iLabel={})
ESConsumesCollectorT< TRecord > setWhatAcquiredProducedWithLambda(TAcquireFunc &&acquireFunc, TProduceFunc &&produceFunc, TDecorator &&iDec, const es::Label &iLabel={})
void registerProducts(std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
auto setWhatAcquiredProduced(T *iThis, const std::string &iLabel)
unsigned int consumesInfoSize() const
auto setWhatAcquiredProduced(T *iThis, TAcquireReturn(T::*iAcquireMethod)(const TRecord &, WaitingTaskWithArenaHolder), TProduceReturn(T::*iProduceMethod)(const TRecord &, TAcquireReturn), const es::Label &iLabel={})