artdaq_demo  v3_02_00
artdaq::NthEventTransfer Class Reference

Demonstration TransferInterface plugin showing how to discard events Intended for use in the transfer_to_dispatcher case, NOT for primary data stream! More...

Inheritance diagram for artdaq::NthEventTransfer:

Public Member Functions

 NthEventTransfer (fhicl::ParameterSet const &ps, artdaq::TransferInterface::Role role)
 NthEventTransfer Constructor. More...
 
TransferInterface::CopyStatus copyFragment (artdaq::Fragment &fragment, size_t send_timeout_usec) override
 Copy a fragment, using the non-reliable channel. More...
 
TransferInterface::CopyStatus moveFragment (artdaq::Fragment &&fragment) override
 Copy a fragment, using the reliable channel. moveFragment assumes ownership of the fragment. More...
 
int receiveFragment (artdaq::Fragment &fragment, size_t receiveTimeout) override
 Receive a fragment from the transfer plugin. More...
 
int receiveFragmentHeader (detail::RawFragmentHeader &header, size_t receiveTimeout) override
 Receive a Fragment Header from the transport mechanism. More...
 
int receiveFragmentData (RawDataType *destination, size_t wordCount) override
 Receive the body of a Fragment to the given destination pointer. More...
 
int source_rank () const override
 Get the source rank from the physical transfer. More...
 
int destination_rank () const override
 Get the destination rank from the physical transfer. More...
 
bool isRunning () override
 Determine whether the TransferInterface plugin is able to send/receive data. More...
 

Detailed Description

Demonstration TransferInterface plugin showing how to discard events Intended for use in the transfer_to_dispatcher case, NOT for primary data stream!

Definition at line 28 of file NthEvent_transfer.cc.

Constructor & Destructor Documentation

artdaq::NthEventTransfer::NthEventTransfer ( fhicl::ParameterSet const &  ps,
artdaq::TransferInterface::Role  role 
)

NthEventTransfer Constructor.

Parameters
psfhicl::ParameterSet used to configure TransferInterface. Contains "nth", the interval at which events will be transferred, and "physical_transfer_plugin", a table configuring the TransferInterface plugin used for those transfers
roleEither kSend or kReceive, see TransferInterface constructor

Definition at line 121 of file NthEvent_transfer.cc.

Member Function Documentation

TransferInterface::CopyStatus artdaq::NthEventTransfer::copyFragment ( artdaq::Fragment &  fragment,
size_t  send_timeout_usec 
)
override

Copy a fragment, using the non-reliable channel.

Parameters
fragmentFragment to copy
send_timeout_usecTimeout before aborting
Returns
CopyStatus (either kSuccess, kTimeout, kErrorNotRequiringException or an exception)

Definition at line 147 of file NthEvent_transfer.cc.

int artdaq::NthEventTransfer::destination_rank ( ) const
inlineoverride

Get the destination rank from the physical transfer.

Returns
The destination rank from the physical transfer

Definition at line 103 of file NthEvent_transfer.cc.

bool artdaq::NthEventTransfer::isRunning ( )
inlineoverride

Determine whether the TransferInterface plugin is able to send/receive data.

Returns
True if the TransferInterface plugin is currently able to send/receive data

Definition at line 110 of file NthEvent_transfer.cc.

TransferInterface::CopyStatus artdaq::NthEventTransfer::moveFragment ( artdaq::Fragment &&  fragment)
override

Copy a fragment, using the reliable channel. moveFragment assumes ownership of the fragment.

Parameters
fragmentFragment to copy
send_timeout_usecTimeout before aborting
Returns
CopyStatus (either kSuccess, kTimeout, kErrorNotRequiringException or an exception)

Definition at line 162 of file NthEvent_transfer.cc.

int artdaq::NthEventTransfer::receiveFragment ( artdaq::Fragment &  fragment,
size_t  receiveTimeout 
)
inlineoverride

Receive a fragment from the transfer plugin.

Parameters
fragmentReference to output Fragment object
receiveTimeoutTimeout before aborting receive
Returns
Rank of sender or RECV_TIMEOUT

Definition at line 64 of file NthEvent_transfer.cc.

int artdaq::NthEventTransfer::receiveFragmentData ( RawDataType *  destination,
size_t  wordCount 
)
inlineoverride

Receive the body of a Fragment to the given destination pointer.

Parameters
destinationPointer to memory region where Fragment data should be stored
wordCountNumber of words of Fragment data to receive
Returns
The rank the Fragment was received from (should be source_rank), or RECV_TIMEOUT

Definition at line 88 of file NthEvent_transfer.cc.

int artdaq::NthEventTransfer::receiveFragmentHeader ( detail::RawFragmentHeader &  header,
size_t  receiveTimeout 
)
inlineoverride

Receive a Fragment Header from the transport mechanism.

Parameters
[out]headerReceived Fragment Header
receiveTimeoutTimeout for receive
Returns
The rank the Fragment was received from (should be source_rank), or RECV_TIMEOUT

Definition at line 77 of file NthEvent_transfer.cc.

int artdaq::NthEventTransfer::source_rank ( ) const
inlineoverride

Get the source rank from the physical transfer.

Returns
The source rank from the physical transfer

Definition at line 97 of file NthEvent_transfer.cc.


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