All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
evd::ThreadsafeGalleryEvent Class Reference

#include <ThreadsafeGalleryEvent.h>

Public Types

template<class PROD >
using HandleT = gallery::Event::template HandleT< PROD >
 

Public Member Functions

 ThreadsafeGalleryEvent (const gallery::Event *evt)
 
template<class T >
bool getByLabel (const art::InputTag &tag, gallery::Handle< T > &result) const
 
template<class T >
std::vector< art::InputTag > getInputTags () const
 
const art::EventAuxiliary & eventAuxiliary () const
 

Protected Attributes

std::mutex fLock
 
const gallery::Event * fEvt
 

Detailed Description

gallery::Event is not designed to be threadsafe. Serializing calls through this wrapper should be more efficient than giving up on threading as a whole. This way we can still write and transfer the PNGs in parallel for example.

Definition at line 14 of file ThreadsafeGalleryEvent.h.

Member Typedef Documentation

template<class PROD >
using evd::ThreadsafeGalleryEvent::HandleT = gallery::Event::template HandleT<PROD>

Definition at line 17 of file ThreadsafeGalleryEvent.h.

Constructor & Destructor Documentation

evd::ThreadsafeGalleryEvent::ThreadsafeGalleryEvent ( const gallery::Event *  evt)
inline

Definition at line 19 of file ThreadsafeGalleryEvent.h.

19  : fEvt(evt)
20  {
21  }
TCEvent evt
Definition: DataStructs.cxx:8

Member Function Documentation

const art::EventAuxiliary& evd::ThreadsafeGalleryEvent::eventAuxiliary ( ) const
inline

Definition at line 37 of file ThreadsafeGalleryEvent.h.

38  {
39  std::lock_guard guard(fLock);
40  return fEvt->eventAuxiliary();
41  }
template<class T >
bool evd::ThreadsafeGalleryEvent::getByLabel ( const art::InputTag &  tag,
gallery::Handle< T > &  result 
) const
inline

Definition at line 24 of file ThreadsafeGalleryEvent.h.

25  {
26  std::lock_guard guard(fLock);
27  return fEvt->getByLabel(tag, result);
28  }
template<class T >
std::vector<art::InputTag> evd::ThreadsafeGalleryEvent::getInputTags ( ) const
inline

Definition at line 31 of file ThreadsafeGalleryEvent.h.

32  {
33  std::lock_guard guard(fLock);
34  return fEvt->getInputTags<T>();
35  }

Member Data Documentation

const gallery::Event* evd::ThreadsafeGalleryEvent::fEvt
protected

Definition at line 45 of file ThreadsafeGalleryEvent.h.

std::mutex evd::ThreadsafeGalleryEvent::fLock
mutableprotected

Definition at line 44 of file ThreadsafeGalleryEvent.h.


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