CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions
edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator > Class Template Reference

#include <Callback.h>

Inheritance diagram for edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >:
edm::eventsetup::CallbackBase< T, TProduceFunc, TReturn, TRecord, TDecorator >

Public Types

using Base = CallbackBase< T, TProduceFunc, TReturn, TRecord, TDecorator >
 

Public Member Functions

 Callback (T *iProd, TProduceFunc iProduceFunc, unsigned int iID, const TDecorator &iDec=TDecorator())
 
Callbackclone ()
 
void prefetchAsync (WaitingTaskHolder iTask, EventSetupRecordImpl const *iRecord, EventSetupImpl const *iEventSetupImpl, ServiceToken const &token, ESParentContext const &iParent)
 
- Public Member Functions inherited from edm::eventsetup::CallbackBase< T, TProduceFunc, TReturn, TRecord, TDecorator >
 CallbackBase (T *iProd, std::shared_ptr< TProduceFunc > iProduceFunc, unsigned int iID, const TDecorator &iDec)
 
 CallbackBase (const CallbackBase &)=delete
 
 CallbackBase (CallbackBase &&)=delete
 
ESModuleCallingContextcallingContext ()
 
TDecorator const & decorator () const
 
ESResolverIndex const * getTokenIndices () const
 
template<class DataT >
void holdOntoPointer (DataT *iData)
 
template<typename ProduceFunctor >
WaitingTaskHolder makeProduceTask (oneapi::tbb::task_group *group, ServiceWeakToken const &serviceToken, EventSetupRecordImpl const *record, EventSetupImpl const *eventSetupImpl, bool emitPostPrefetchingSignal, ProduceFunctor &&produceFunctor)
 
void newRecordComing ()
 
CallbackBaseoperator= (const CallbackBase &)=delete
 
CallbackBaseoperator= (CallbackBase &&)=delete
 
std::optional< std::vector< ESResolverIndex > > const & postMayGetResolvers () const
 
template<typename RunModuleFnctr >
void prefetchAsyncImpl (RunModuleFnctr &&runModuleFnctr, WaitingTaskHolder iTask, EventSetupRecordImpl const *iRecord, EventSetupImpl const *iEventSetupImpl, ServiceToken const &token, ESParentContext const &iParent)
 
std::shared_ptr< TProduceFunc > const & produceFunction ()
 
Tproducer ()
 
SerialTaskQueueChainqueue ()
 
template<class RemainingContainerT , class DataT , class ProductsT >
void setData (ProductsT &iProducts)
 
WaitingTaskListtaskList ()
 
unsigned int transitionID () const
 

Private Member Functions

 Callback (T *iProd, std::shared_ptr< TProduceFunc > iProduceFunc, unsigned int iID, const TDecorator &iDec=TDecorator())
 

Additional Inherited Members

- Protected Member Functions inherited from edm::eventsetup::CallbackBase< T, TProduceFunc, TReturn, TRecord, TDecorator >
 ~CallbackBase ()=default
 

Detailed Description

template<typename T, typename TProduceFunc, typename TReturn, typename TRecord, typename TDecorator = CallbackSimpleDecorator<TRecord>>
class edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >

Description: Functional object used as the 'callback' for the CallbackESProductResolver

Usage: Produces data objects for ESProducers in EventSetup system

Definition at line 44 of file Callback.h.

Member Typedef Documentation

◆ Base

template<typename T , typename TProduceFunc , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
using edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >::Base = CallbackBase<T, TProduceFunc, TReturn, TRecord, TDecorator>

Definition at line 46 of file Callback.h.

Constructor & Destructor Documentation

◆ Callback() [1/2]

template<typename T , typename TProduceFunc , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >::Callback ( T iProd,
TProduceFunc  iProduceFunc,
unsigned int  iID,
const TDecorator &  iDec = TDecorator() 
)
inline

Definition at line 48 of file Callback.h.

Referenced by edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >::clone().

49  : Callback(iProd, std::make_shared<TProduceFunc>(std::move(iProduceFunc)), iID, iDec) {}
Callback(T *iProd, TProduceFunc iProduceFunc, unsigned int iID, const TDecorator &iDec=TDecorator())
Definition: Callback.h:48
def move(src, dest)
Definition: eostools.py:511

◆ Callback() [2/2]

template<typename T , typename TProduceFunc , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >::Callback ( T iProd,
std::shared_ptr< TProduceFunc >  iProduceFunc,
unsigned int  iID,
const TDecorator &  iDec = TDecorator() 
)
inlineprivate

Definition at line 75 of file Callback.h.

79  : Base(iProd, std::move(iProduceFunc), iID, iDec) {}
CallbackBase< T, TProduceFunc, TReturn, TRecord, TDecorator > Base
Definition: Callback.h:46
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ clone()

template<typename T , typename TProduceFunc , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
Callback* edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >::clone ( void  )
inline

◆ prefetchAsync()

template<typename T , typename TProduceFunc , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
void edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >::prefetchAsync ( WaitingTaskHolder  iTask,
EventSetupRecordImpl const *  iRecord,
EventSetupImpl const *  iEventSetupImpl,
ServiceToken const &  token,
ESParentContext const &  iParent 
)
inline

Definition at line 55 of file Callback.h.

References watchdog::group, edm::eventsetup::CallbackBase< T, TProduceFunc, TReturn, TRecord, TDecorator >::makeProduceTask(), eostools::move(), edm::eventsetup::CallbackBase< T, TProduceFunc, TReturn, TRecord, TDecorator >::prefetchAsyncImpl(), edm::eventsetup::CallbackBase< T, TProduceFunc, TReturn, TRecord, TDecorator >::produceFunction(), AlCaHarvesting_cff::record, and unpackBuffers-CaloStage2::token.

59  {
61  [this](auto&& group, auto&& token, auto&& record, auto&& es) {
62  constexpr bool emitPostPrefetchingSignal = true;
63  auto produceFunctor = [this](TRecord const& record) { return (*Base::produceFunction())(record); };
64  return Base::makeProduceTask(
65  group, token, record, es, emitPostPrefetchingSignal, std::move(produceFunctor));
66  },
67  std::move(iTask),
68  iRecord,
69  iEventSetupImpl,
70  token,
71  iParent);
72  }
WaitingTaskHolder makeProduceTask(oneapi::tbb::task_group *group, ServiceWeakToken const &serviceToken, EventSetupRecordImpl const *record, EventSetupImpl const *eventSetupImpl, bool emitPostPrefetchingSignal, ProduceFunctor &&produceFunctor)
Definition: CallbackBase.h:85
std::shared_ptr< TProduceFunc > const & produceFunction()
Definition: CallbackBase.h:231
def move(src, dest)
Definition: eostools.py:511
void prefetchAsyncImpl(RunModuleFnctr &&runModuleFnctr, WaitingTaskHolder iTask, EventSetupRecordImpl const *iRecord, EventSetupImpl const *iEventSetupImpl, ServiceToken const &token, ESParentContext const &iParent)
Definition: CallbackBase.h:163