artdaq  v3_09_00
ArtdaqSharedMemoryServiceInterface Class Referenceabstract

Interface for ArtdaqSharedMemoryService. This interface is declared to art as part of the required registration of an art Service. More...

#include <artdaq/ArtModules/ArtdaqSharedMemoryService.h>

Inheritance diagram for ArtdaqSharedMemoryServiceInterface:
ArtdaqSharedMemoryService

Public Member Functions

virtual ~ArtdaqSharedMemoryServiceInterface ()=default
 Default virtual destructor.
 
virtual std::unordered_map
< artdaq::Fragment::type_t,
std::unique_ptr
< artdaq::Fragments > > 
ReceiveEvent (bool broadcast)=0
 Receive an event from the shared memory. More...
 
virtual size_t GetQueueSize ()=0
 Get the number of events which are ready to be read. More...
 
virtual size_t GetQueueCapacity ()=0
 Get the maximum number of events which can be stored in the shared memory. More...
 
virtual std::shared_ptr
< artdaq::detail::RawEventHeader > 
GetEventHeader ()=0
 Get a shared_ptr to the current event header, if any. More...
 

Detailed Description

Interface for ArtdaqSharedMemoryService. This interface is declared to art as part of the required registration of an art Service.

Definition at line 12 of file ArtdaqSharedMemoryService.h.

Member Function Documentation

virtual std::shared_ptr<artdaq::detail::RawEventHeader> ArtdaqSharedMemoryServiceInterface::GetEventHeader ( )
pure virtual

Get a shared_ptr to the current event header, if any.

Returns
std::shared_ptr to current event header. May be nullptr if no event is currently being read

Implemented in ArtdaqSharedMemoryService.

virtual size_t ArtdaqSharedMemoryServiceInterface::GetQueueCapacity ( )
pure virtual

Get the maximum number of events which can be stored in the shared memory.

Returns
The maximum number of events which can be stored in the shared memory

Implemented in ArtdaqSharedMemoryService.

virtual size_t ArtdaqSharedMemoryServiceInterface::GetQueueSize ( )
pure virtual

Get the number of events which are ready to be read.

Returns
The number of events which can be read

Implemented in ArtdaqSharedMemoryService.

virtual std::unordered_map<artdaq::Fragment::type_t, std::unique_ptr<artdaq::Fragments> > ArtdaqSharedMemoryServiceInterface::ReceiveEvent ( bool  broadcast)
pure virtual

Receive an event from the shared memory.

Parameters
broadcastWhether to only attempt to receive a broadcast (broadcasts are always preferentially received over data)
Returns
Map of Fragment types retrieved from shared memory

Implemented in ArtdaqSharedMemoryService.


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