ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Athena::RCUUpdate< T > Class Template Reference

Helper to update data in a RCUObject. More...

#include <RCUObject.h>

Collaboration diagram for Athena::RCUUpdate< T >:

Public Member Functions

 RCUUpdate (RCUObject< T > &rcuobj)
 Constructor. More...
 
 RCUUpdate (RCUObject< T > &rcuobj, const EventContext &ctx)
 Constructor. More...
 
 RCUUpdate (RCUObject< T > &rcuobj, const EventContext &&ctx)=delete
 
const T & operator* () const
 Access data. More...
 
const T * operator-> () const
 Access data. More...
 
void update (std::unique_ptr< T > ptr)
 Publish a new version of the data object. More...
 

Private Attributes

RCUObject< T > & m_rcuobj
 The object we're referencing. More...
 
const EventContext & m_ctx
 The event context. More...
 
std::unique_lock< std::mutex > m_g
 Lock for synchonization. More...
 

Detailed Description

template<class T>
class Athena::RCUUpdate< T >

Helper to update data in a RCUObject.

See the header comments for details.

Definition at line 138 of file RCUObject.h.

Constructor & Destructor Documentation

◆ RCUUpdate() [1/3]

template<class T >
Athena::RCUUpdate< T >::RCUUpdate ( RCUObject< T > &  rcuobj)

Constructor.

Parameters
rcuobjThe RCUObject we're reading.

This version will read the global event context.

◆ RCUUpdate() [2/3]

template<class T >
Athena::RCUUpdate< T >::RCUUpdate ( RCUObject< T > &  rcuobj,
const EventContext &  ctx 
)

Constructor.

Parameters
rcuobjThe RCUObject we're reading.
ctxThe event context (must not be a temporary).

◆ RCUUpdate() [3/3]

template<class T >
Athena::RCUUpdate< T >::RCUUpdate ( RCUObject< T > &  rcuobj,
const EventContext &&  ctx 
)
delete

Member Function Documentation

◆ operator*()

template<class T >
const T& Athena::RCUUpdate< T >::operator* ( ) const

Access data.

◆ operator->()

template<class T >
const T* Athena::RCUUpdate< T >::operator-> ( ) const

Access data.

◆ update()

template<class T >
void Athena::RCUUpdate< T >::update ( std::unique_ptr< T >  ptr)

Publish a new version of the data object.

Parameters
ptrThe new data object.

Member Data Documentation

◆ m_ctx

template<class T >
const EventContext& Athena::RCUUpdate< T >::m_ctx
private

The event context.

Definition at line 610 of file RCUObject.h.

◆ m_g

template<class T >
std::unique_lock<std::mutex> Athena::RCUUpdate< T >::m_g
private

Lock for synchonization.

Definition at line 613 of file RCUObject.h.

◆ m_rcuobj

template<class T >
RCUObject<T>& Athena::RCUUpdate< T >::m_rcuobj
private

The object we're referencing.

Definition at line 607 of file RCUObject.h.


The documentation for this class was generated from the following file: