CMS 3D CMS Logo

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

#include <Callback.h>

Public Types

using method_type = TReturn(T ::*)(const TRecord &)
 

Public Member Functions

 Callback (const Callback &)=delete
 
 Callback (T *iProd, method_type iMethod, unsigned int iID, const TDecorator &iDec=TDecorator())
 
Callbackclone ()
 
ESProxyIndex const * getTokenIndices () const
 
template<class DataT >
void holdOntoPointer (DataT *iData)
 
void newRecordComing ()
 
void operator() (const TRecord &iRecord)
 
const Callbackoperator= (const Callback &)=delete
 
template<class RemainingContainerT , class DataT , class ProductsT >
void setData (ProductsT &iProducts)
 
void storeReturnedValues (TReturn iReturn)
 
unsigned int transitionID () const
 

Private Attributes

TDecorator decorator_
 
unsigned int id_
 
method_type method_
 
edm::propagate_const< T * > producer_
 
std::array< void *, produce::size< TReturn >::value > proxyData_
 
bool wasCalledForThisRecord_
 

Detailed Description

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

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

Usage: <usage>

Definition at line 44 of file Callback.h.

Member Typedef Documentation

◆ method_type

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
using edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::method_type = TReturn (T ::*)(const TRecord&)

Definition at line 46 of file Callback.h.

Constructor & Destructor Documentation

◆ Callback() [1/2]

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

Definition at line 48 of file Callback.h.

49  : proxyData_{},
50  producer_(iProd),
51  method_(iMethod),
52  id_(iID),
54  decorator_(iDec) {}

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

◆ Callback() [2/2]

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::Callback ( const Callback< T, TReturn, TRecord, TDecorator > &  )
delete

Member Function Documentation

◆ clone()

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

◆ getTokenIndices()

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
ESProxyIndex const* edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::getTokenIndices ( ) const
inline

◆ holdOntoPointer()

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
template<class DataT >
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::holdOntoPointer ( DataT *  iData)
inline

◆ newRecordComing()

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

◆ operator()()

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator() ( const TRecord &  iRecord)
inline

◆ operator=()

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
const Callback& edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator= ( const Callback< T, TReturn, TRecord, TDecorator > &  )
delete

◆ setData()

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
template<class RemainingContainerT , class DataT , class ProductsT >
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::setData ( ProductsT &  iProducts)
inline

Definition at line 82 of file Callback.h.

82  {
83  DataT* temp = reinterpret_cast<DataT*>(proxyData_[produce::find_index<TReturn, DataT>::value]);
84  if (nullptr != temp) {
85  moveFromTo(iProducts, *temp);
86  }
87  if constexpr (not std::is_same_v<produce::Null, RemainingContainerT>) {
88  setData<typename RemainingContainerT::head_type, typename RemainingContainerT::tail_type>(iProducts);
89  }
90  }

References edm::eventsetup::moveFromTo(), edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::proxyData_, and groupFilesInBlocks::temp.

◆ storeReturnedValues()

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::storeReturnedValues ( TReturn  iReturn)
inline

Definition at line 76 of file Callback.h.

76  {
78  setData<typename type::head_type, typename type::tail_type>(iReturn);
79  }

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

◆ transitionID()

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
unsigned int edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::transitionID ( ) const
inline

Definition at line 93 of file Callback.h.

93 { return id_; }

References edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::id_.

Member Data Documentation

◆ decorator_

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
TDecorator edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::decorator_
private

◆ id_

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
unsigned int edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::id_
private

◆ method_

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
method_type edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::method_
private

◆ producer_

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
edm::propagate_const<T*> edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::producer_
private

◆ proxyData_

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
std::array<void*, produce::size<TReturn>::value> edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::proxyData_
private

◆ wasCalledForThisRecord_

template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
bool edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::wasCalledForThisRecord_
private
edm::eventsetup::produce::product_traits::type
T type
Definition: produce_helpers.h:58
edm::eventsetup::Callback::storeReturnedValues
void storeReturnedValues(TReturn iReturn)
Definition: Callback.h:76
edm::eventsetup::Callback::producer_
edm::propagate_const< T * > producer_
Definition: Callback.h:98
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
edm::eventsetup::Callback::id_
unsigned int id_
Definition: Callback.h:101
edm::eventsetup::Callback::decorator_
TDecorator decorator_
Definition: Callback.h:103
edm::propagate_const::get
element_type const * get() const
Definition: propagate_const.h:64
edm::eventsetup::Callback::proxyData_
std::array< void *, produce::size< TReturn >::value > proxyData_
Definition: Callback.h:97
edm::eventsetup::Callback::Callback
Callback(T *iProd, method_type iMethod, unsigned int iID, const TDecorator &iDec=TDecorator())
Definition: Callback.h:48
type
type
Definition: HCALResponse.h:21
edm::eventsetup::produce::find_index::value
constexpr static int value
Definition: produce_helpers.h:128
edm::eventsetup::Callback::wasCalledForThisRecord_
bool wasCalledForThisRecord_
Definition: Callback.h:102
edm::eventsetup::Callback::method_
method_type method_
Definition: Callback.h:99
edm::eventsetup::moveFromTo
void moveFromTo(FromT &iFrom, ToT &iTo)
Definition: produce_helpers.h:33