ATLAS Offline Software
Loading...
Searching...
No Matches
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.
 RCUUpdate (RCUObject< T > &rcuobj, const EventContext &ctx)
 Constructor.
 RCUUpdate (RCUObject< T > &rcuobj, const EventContext &&ctx)=delete
const T & operator* () const
 Access data.
const T * operator-> () const
 Access data.
void update (std::unique_ptr< T > ptr)
 Publish a new version of the data object.

Private Attributes

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

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 555 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 600 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 603 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 597 of file RCUObject.h.


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