CMS 3D CMS Logo

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

#include <Callback.h>

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

Public Types

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

Public Member Functions

 Callback (T *iProd, method_type iMethod, unsigned int iID, const TDecorator &iDec=TDecorator())
 
ESProxyIndex const * getTokenIndices () const
 
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)
 
void storeReturnedValues (TReturn iReturn)
 
unsigned int transitionID () const
 
- Public Member Functions inherited from edm::eventsetup::CallbackBase
virtual ~CallbackBase ()
 

Private Member Functions

 Callback (const Callback &)=delete
 
const Callbackoperator= (const Callback &)=delete
 

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 >

Definition at line 52 of file Callback.h.

Member Typedef Documentation

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 54 of file Callback.h.

Constructor & Destructor Documentation

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 56 of file Callback.h.

57  : proxyData_{},
58  producer_(iProd),
59  method_(iMethod),
60  id_(iID),
62  decorator_(iDec) {}
std::array< void *, produce::size< TReturn >::value > proxyData_
Definition: Callback.h:110
edm::propagate_const< T * > producer_
Definition: Callback.h:111
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 > &  )
privatedelete

Member Function Documentation

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

Definition at line 103 of file Callback.h.

103 { return producer_->getTokenIndices(id_); }
edm::propagate_const< T * > producer_
Definition: Callback.h:111
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

Definition at line 80 of file Callback.h.

80  {
82  }
std::array< void *, produce::size< TReturn >::value > proxyData_
Definition: Callback.h:110
template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::newRecordComing ( )
inline

Definition at line 100 of file Callback.h.

100 { wasCalledForThisRecord_ = false; }
template<typename T , typename TReturn , typename TRecord , typename TDecorator = CallbackSimpleDecorator<TRecord>>
void edm::eventsetup::Callback< T, TReturn, TRecord, TDecorator >::operator() ( const TRecord &  iRecord)
inline

Definition at line 70 of file Callback.h.

70  {
72  decorator_.pre(iRecord);
75  decorator_.post(iRecord);
76  }
77  }
void storeReturnedValues(TReturn iReturn)
Definition: Callback.h:84
edm::propagate_const< T * > producer_
Definition: Callback.h:111
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 > &  )
privatedelete
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 91 of file Callback.h.

References constexpr, edm::eventsetup::moveFromTo(), and groupFilesInBlocks::temp.

91  {
92  DataT* temp = reinterpret_cast<DataT*>(proxyData_[produce::find_index<TReturn, DataT>::value]);
93  if (nullptr != temp) {
94  moveFromTo(iProducts, *temp);
95  }
96  if constexpr (not std::is_same_v<produce::Null, RemainingContainerT>) {
97  setData<typename RemainingContainerT::head_type, typename RemainingContainerT::tail_type>(iProducts);
98  }
99  }
std::array< void *, produce::size< TReturn >::value > proxyData_
Definition: Callback.h:110
void moveFromTo(FromT &iFrom, ToT &iTo)
#define constexpr
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 84 of file Callback.h.

84  {
85  //std::cout <<" storeReturnedValues "<< iReturn <<" " <<iReturn->value_ <<std::endl;
87  setData<typename type::head_type, typename type::tail_type>(iReturn);
88  }
type
Definition: HCALResponse.h:21
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 102 of file Callback.h.

102 { return id_; }

Member Data Documentation

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

Definition at line 115 of file Callback.h.

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

Definition at line 113 of file Callback.h.

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

Definition at line 112 of file Callback.h.

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

Definition at line 111 of file Callback.h.

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

Definition at line 110 of file Callback.h.

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

Definition at line 114 of file Callback.h.