1 #ifndef Framework_Callback_h 2 #define Framework_Callback_h 23 #include <type_traits> 31 namespace eventsetup {
41 template <
typename TRecord>
43 void pre(
const TRecord&) {}
44 void post(
const TRecord&) {}
61 wasCalledForThisRecord_(
false),
71 if (!wasCalledForThisRecord_) {
72 decorator_.pre(iRecord);
73 storeReturnedValues((producer_->*method_)(iRecord));
74 wasCalledForThisRecord_ =
true;
75 decorator_.post(iRecord);
79 template <
class DataT>
87 setData<typename type::head_type, typename type::tail_type>(iReturn);
90 template <
class RemainingContainerT,
class DataT,
class ProductsT>
93 if (
nullptr != temp) {
96 if constexpr (not std::is_same_v<produce::Null, RemainingContainerT>) {
97 setData<typename RemainingContainerT::head_type, typename RemainingContainerT::tail_type>(iProducts);
void storeReturnedValues(TReturn iReturn)
void holdOntoPointer(DataT *iData)
std::array< void *, produce::size< TReturn >::value > proxyData_
void pre(const TRecord &)
unsigned int transitionID() const
Callback(T *iProd, method_type iMethod, unsigned int iID, const TDecorator &iDec=TDecorator())
TReturn(T::*)(const TRecord &) method_type
void moveFromTo(FromT &iFrom, ToT &iTo)
void post(const TRecord &)
void operator()(const TRecord &iRecord)
bool wasCalledForThisRecord_
void setData(ProductsT &iProducts)
ESProxyIndex const * getTokenIndices() const
edm::propagate_const< T * > producer_