artdaq  v3_12_02
ArtdaqGlobalsService Class Reference

ArtdaqGlobalsService extends ArtdaqSharedMemoryServiceInterface. It manages the artdaq Global varaibles my_rank and app_name, and initializes MetricManager. Users should retrieve a ServiceHandle to this class before using artdaq Globals to ensure the correct values are used. More...

#include <artdaq/ArtModules/ArtdaqGlobalsService.h>

Inheritance diagram for ArtdaqGlobalsService:
ArtdaqSharedMemoryServiceInterface

Classes

struct  Config
 Allowed Configuration parameters of ArtdaqGlobalsService. May be used for configuration validation More...
 

Public Types

using Parameters = fhicl::WrappedTable< Config >
 Used for ParameterSet validation (if desired)
 

Public Member Functions

virtual ~ArtdaqGlobalsService ()
 ArtdaqGlobalsService Destructor. Calls disconnect().
 
 ArtdaqGlobalsService (fhicl::ParameterSet const &pset, art::ActivityRegistry &)
 ArtdaqGlobalsService Constructor. More...
 
std::unordered_map
< artdaq::Fragment::type_t,
std::unique_ptr
< artdaq::Fragments > > 
ReceiveEvent (bool) override
 Pretend to receive an event from the shared memory. More...
 
size_t GetQueueSize () override
 Get the number of events which are ready to be read (0) More...
 
size_t GetQueueCapacity () override
 Get the maximum number of events which can be stored in the shared memory (0) More...
 
std::shared_ptr
< artdaq::detail::RawEventHeader > 
GetEventHeader () override
 Get a shared_ptr to the current event header, if any. More...
 
- Public Member Functions inherited from ArtdaqSharedMemoryServiceInterface
virtual ~ArtdaqSharedMemoryServiceInterface ()=default
 Default virtual destructor.
 

Detailed Description

ArtdaqGlobalsService extends ArtdaqSharedMemoryServiceInterface. It manages the artdaq Global varaibles my_rank and app_name, and initializes MetricManager. Users should retrieve a ServiceHandle to this class before using artdaq Globals to ensure the correct values are used.

Definition at line 16 of file ArtdaqGlobalsService.h.

Constructor & Destructor Documentation

ArtdaqGlobalsService::ArtdaqGlobalsService ( fhicl::ParameterSet const &  pset,
art::ActivityRegistry &   
)

ArtdaqGlobalsService Constructor.

Parameters
psetParameterSet used to configure ArtdaqGlobalsService. See ArtdaqGlobalsService::Config

Definition at line 16 of file ArtdaqGlobalsService_service.cc.

Member Function Documentation

std::shared_ptr<artdaq::detail::RawEventHeader> ArtdaqGlobalsService::GetEventHeader ( )
inlineoverridevirtual

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

Returns
Nullptr

Implements ArtdaqSharedMemoryServiceInterface.

Definition at line 62 of file ArtdaqGlobalsService.h.

size_t ArtdaqGlobalsService::GetQueueCapacity ( )
inlineoverridevirtual

Get the maximum number of events which can be stored in the shared memory (0)

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

Implements ArtdaqSharedMemoryServiceInterface.

Definition at line 57 of file ArtdaqGlobalsService.h.

size_t ArtdaqGlobalsService::GetQueueSize ( )
inlineoverridevirtual

Get the number of events which are ready to be read (0)

Returns
The number of events which can be read (0)

Implements ArtdaqSharedMemoryServiceInterface.

Definition at line 52 of file ArtdaqGlobalsService.h.

std::unordered_map<artdaq::Fragment::type_t, std::unique_ptr<artdaq::Fragments> > ArtdaqGlobalsService::ReceiveEvent ( bool  )
inlineoverridevirtual

Pretend to receive an event from the shared memory.

Returns
Map of Fragment types retrieved from shared memory

Implements ArtdaqSharedMemoryServiceInterface.

Definition at line 43 of file ArtdaqGlobalsService.h.


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