#include <Callback.h>
Public Types | |
typedef TReturn(T::* | method_type )(const TRecord &) |
Public Member Functions | |
Callback (T *iProd, method_type iMethod, const TDecorator &iDec=TDecorator()) | |
template<class DataT > | |
void | holdOntoPointer (DataT *iData) |
void | newRecordComing () |
void | operator() (const TRecord &iRecord) |
template<class RemainingContainerT , class DataT , class ProductsT > | |
void | setData (ProductsT &iProducts, const RemainingContainerT *, const DataT *) |
template<class DataT , class ProductsT > | |
void | setData (ProductsT &iProducts, const produce::Null *, const DataT *) |
void | storeReturnedValues (TReturn iReturn) |
Private Member Functions | |
Callback (const Callback &) | |
const Callback & | operator= (const Callback &) |
Private Attributes | |
TDecorator | decorator_ |
method_type | method_ |
T * | producer_ |
std::vector< void * > | proxyData_ |
bool | wasCalledForThisRecord_ |
Definition at line 47 of file Callback.h.
typedef TReturn(T ::* edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::method_type)(const TRecord &) |
Definition at line 49 of file Callback.h.
edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::Callback | ( | T * | iProd, |
method_type | iMethod, | ||
const TDecorator & | iDec = TDecorator() |
||
) | [inline] |
Definition at line 51 of file Callback.h.
: proxyData_(produce::size< TReturn >::value, static_cast<void*>(nullptr)), producer_(iProd), method_(iMethod), wasCalledForThisRecord_(false), decorator_(iDec) {}
edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::Callback | ( | const Callback< T, TReturn, TRecord, TDecorator > & | ) | [private] |
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::holdOntoPointer | ( | DataT * | iData | ) | [inline] |
Definition at line 78 of file Callback.h.
References edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::proxyData_.
{ proxyData_[produce::find_index<TReturn,DataT>::value] = iData; }
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::newRecordComing | ( | ) | [inline] |
Definition at line 102 of file Callback.h.
References edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::wasCalledForThisRecord_.
{ wasCalledForThisRecord_ = false; }
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator() | ( | const TRecord & | iRecord | ) | [inline] |
Definition at line 68 of file Callback.h.
References edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::decorator_, edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::method_, edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::producer_, edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::storeReturnedValues(), and edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::wasCalledForThisRecord_.
{ if(!wasCalledForThisRecord_) { decorator_.pre(iRecord); storeReturnedValues((producer_->*method_)(iRecord)); wasCalledForThisRecord_ = true; decorator_.post(iRecord); } }
const Callback& edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator= | ( | const Callback< T, TReturn, TRecord, TDecorator > & | ) | [private] |
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::setData | ( | ProductsT & | iProducts, |
const RemainingContainerT * | , | ||
const DataT * | |||
) | [inline] |
Definition at line 89 of file Callback.h.
References edm::eventsetup::copyFromTo(), edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::proxyData_, and groupFilesInBlocks::temp.
Referenced by edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::storeReturnedValues().
{ DataT* temp = reinterpret_cast< DataT*>(proxyData_[produce::find_index<TReturn,DataT>::value]) ; if(0 != temp) { copyFromTo(iProducts, *temp); } setData(iProducts, static_cast< const typename RemainingContainerT::head_type *>(nullptr), static_cast< const typename RemainingContainerT::tail_type *>(nullptr)); }
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::setData | ( | ProductsT & | iProducts, |
const produce::Null * | , | ||
const DataT * | |||
) | [inline] |
Definition at line 96 of file Callback.h.
References edm::eventsetup::copyFromTo(), edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::proxyData_, and groupFilesInBlocks::temp.
{ DataT* temp = reinterpret_cast< DataT*>(proxyData_[produce::find_index<TReturn,DataT>::value]) ; //std::cout <<" setData["<< produce::find_index<TReturn,DataT>::value<<"] "<< temp <<std::endl; if(0 != temp) { copyFromTo(iProducts, *temp); } }
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::storeReturnedValues | ( | TReturn | iReturn | ) | [inline] |
Definition at line 82 of file Callback.h.
References edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::setData().
Referenced by edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator()().
{ //std::cout <<" storeReturnedValues "<< iReturn <<" " <<iReturn->value_ <<std::endl; typedef typename produce::product_traits<TReturn>::type type; setData(iReturn, static_cast<typename type::head_type*>(nullptr), static_cast<const typename type::tail_type *>(nullptr)); }
TDecorator edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::decorator_ [private] |
Definition at line 115 of file Callback.h.
Referenced by edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator()().
method_type edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::method_ [private] |
Definition at line 113 of file Callback.h.
Referenced by edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator()().
T* edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::producer_ [private] |
Definition at line 112 of file Callback.h.
Referenced by edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator()().
std::vector<void*> edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::proxyData_ [private] |
Definition at line 111 of file Callback.h.
Referenced by edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::holdOntoPointer(), and edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::setData().
bool edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::wasCalledForThisRecord_ [private] |
Definition at line 114 of file Callback.h.
Referenced by edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::newRecordComing(), and edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator()().