artdaq  v3_08_00
artdaq::TransferWrapper Class Reference

TransferWrapper wraps a TransferInterface so that it can be used in the ArtdaqInput class to make an art::Source. More...

#include <artdaq/ArtModules/detail/TransferWrapper.hh>

Public Member Functions

 TransferWrapper (const fhicl::ParameterSet &pset)
 TransferWrapper Constructor. More...
 
virtual ~TransferWrapper ()
 TransferWrapper Destructor.
 
artdaq::FragmentPtrs receiveMessage ()
 Receive a Fragment from the TransferInterface, and send it to art. More...
 
std::unordered_map
< artdaq::Fragment::type_t,
std::unique_ptr
< artdaq::Fragments > > 
receiveMessages ()
 Receive all messsages for an event from ArtdaqSharedMemoryService. More...
 
artdaq::FragmentPtrs receiveInitMessage ()
 Receive the Init message from the TransferInterface, and send it to art. More...
 
std::shared_ptr
< artdaq::detail::RawEventHeader > 
getEventHeader ()
 Get a pointer to the last received RawEventHeader. More...
 

Detailed Description

TransferWrapper wraps a TransferInterface so that it can be used in the ArtdaqInput class to make an art::Source.

JCF, May-27-2016

This is the class through which code that wants to access a transfer plugin (e.g., input sources, AggregatorCore, etc.) can do so. Its functionality is such that it satisfies the requirements needed to be a template in the ArtdaqInput class

Definition at line 30 of file TransferWrapper.hh.

Constructor & Destructor Documentation

artdaq::TransferWrapper::TransferWrapper ( const fhicl::ParameterSet &  pset)
explicit

TransferWrapper Constructor.

Parameters
psetParameterSet used to configure the TransferWrapper
* TransferWrapper accepts the following Parameters:
* "timeoutInUsecs" (Default: 100000): The receive timeout
* "dispatcherHost" (REQUIRED): The hostname that the Dispatcher Aggregator is running on
* "dispatcherPort" (REQUIRED): The port that the Dispatcher Aggregator is running on
* "maxEventsBeforeInit" (Default: 5): How many non-Init events to receive before raising an error
* "allowedFragmentTypes" (Default: [226,227,229]): The Fragment type codes for expected Fragments
* "dispatcherConnectTimeout" (Default: 0): Maximum amount of time (in seconds) to wait for the Dispatcher to reach the Running state. 0 to wait forever
* "dispatcherConnectRetryInterval_us" (Default 1,000,000): Amount of time to wait between polls of the Dispatcher status while waiting for it to reach the Running state.
* "quitOnFragmentIntegrityProblem" (Default: true): If there is an inconsistency in the received Fragment, throw an exception and quit when true
* "allowMultipleRuns" (Default: false): If true, will ignore EndOfData message and reconnect to the Dispatcher once the next run starts
* "debugLevel" (Default: 0): Enables some additional messages
* "transfer_plugin" (REQUIRED): Name of the TransferInterface plugin to load
* 
* This parameter set is also passed to TransferInterface, so any necessary Parameters for TransferInterface or the requested plugin
* should be included here.
* 

Definition at line 34 of file TransferWrapper.cc.

Member Function Documentation

std::shared_ptr<artdaq::detail::RawEventHeader> artdaq::TransferWrapper::getEventHeader ( )
inline

Get a pointer to the last received RawEventHeader.

Returns
a shared_ptr to the last received RawEventHeader

Definition at line 86 of file TransferWrapper.hh.

artdaq::FragmentPtrs artdaq::TransferWrapper::receiveInitMessage ( )
inline

Receive the Init message from the TransferInterface, and send it to art.

Returns
Received InitFragment

Definition at line 77 of file TransferWrapper.hh.

artdaq::FragmentPtrs artdaq::TransferWrapper::receiveMessage ( )

Receive a Fragment from the TransferInterface, and send it to art.

Returns
Received Fragment

Definition at line 87 of file TransferWrapper.cc.

std::unordered_map< artdaq::Fragment::type_t, std::unique_ptr< artdaq::Fragments > > artdaq::TransferWrapper::receiveMessages ( )

Receive all messsages for an event from ArtdaqSharedMemoryService.

Returns
A map of Fragment::type_t to a unique_ptr to Fragments containing all Fragments in an event

Definition at line 195 of file TransferWrapper.cc.


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