artdaq  v2_03_00
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
artdaq::AutodetectTransfer Class Reference

The AutodetectTransfer TransferInterface plugin sets up a Shmem_transfer plugin or TCPSocket_transfer plugin depending if the source and destination are on the same host, to maximize throughput. More...

+ Inheritance diagram for artdaq::AutodetectTransfer:

Public Member Functions

 AutodetectTransfer (const fhicl::ParameterSet &pset, Role role)
 AutodetectTransfer Constructor. More...
 
virtual ~AutodetectTransfer ()=default
 AutodetectTransfer default Destructor.
 
int receiveFragment (artdaq::Fragment &fragment, size_t receiveTimeout) override
 Receive a Fragment, using the underlying transfer plugin. More...
 
CopyStatus copyFragment (artdaq::Fragment &fragment, size_t send_timeout_usec=std::numeric_limits< size_t >::max()) override
 Send a Fragment in non-reliable mode, using the underlying transfer plugin. More...
 
CopyStatus moveFragment (artdaq::Fragment &&fragment, size_t send_timeout_usec=std::numeric_limits< size_t >::max()) override
 Send a Fragment in reliable mode, using the underlying transfer plugin. More...
 
- Public Member Functions inherited from artdaq::TransferInterface
 TransferInterface (const fhicl::ParameterSet &ps, Role role)
 TransferInterface Constructor. More...
 
 TransferInterface (const TransferInterface &)=delete
 Copy Constructor is deleted.
 
TransferInterfaceoperator= (const TransferInterface &)=delete
 Copy Assignment operator is deleted. More...
 
virtual ~TransferInterface ()=default
 Default virtual Destructor.
 
std::string uniqueLabel () const
 Get the unique label of this TransferInterface instance. More...
 
virtual int source_rank () const
 Get the source rank for this TransferInterface instance. More...
 
virtual int destination_rank () const
 Get the destination rank for this TransferInterface instance. More...
 

Additional Inherited Members

- Public Types inherited from artdaq::TransferInterface
enum  Role { Role::kSend, Role::kReceive }
 Used to determine if a TransferInterface is a Sender or Receiver. More...
 
enum  CopyStatus { CopyStatus::kSuccess, CopyStatus::kTimeout, CopyStatus::kErrorNotRequiringException }
 Returned from the send functions, this enumeration describes the possible return codes. If an exception occurs, it will be thrown and should be handled normally. More...
 
- Static Public Attributes inherited from artdaq::TransferInterface
static const int RECV_TIMEOUT = 0xfedcba98
 Value to be returned upon receive timeout. Because receivers otherwise return rank, this is also the limit on the number of ranks that artdaq currently supports.
 
- Protected Member Functions inherited from artdaq::TransferInterface
Role role () const
 Get the TransferInterface::Role of this TransferInterface. More...
 
- Protected Attributes inherited from artdaq::TransferInterface
size_t buffer_count_
 The number of Fragment transfers the TransferInterface can handle simultaneously.
 
const size_t max_fragment_size_words_
 The maximum size of the transferred Fragment objects, in artdaq::Fragment::RawDataType words.
 

Detailed Description

The AutodetectTransfer TransferInterface plugin sets up a Shmem_transfer plugin or TCPSocket_transfer plugin depending if the source and destination are on the same host, to maximize throughput.

Definition at line 13 of file Autodetect_transfer.cc.

Constructor & Destructor Documentation

artdaq::AutodetectTransfer::AutodetectTransfer ( const fhicl::ParameterSet &  pset,
Role  role 
)

AutodetectTransfer Constructor.

Parameters
psetParameterSet used to configure AutodetectTransfer
roleRole of this TransferInterface, either kReceive or kSend

Definition at line 69 of file Autodetect_transfer.cc.

Member Function Documentation

CopyStatus artdaq::AutodetectTransfer::copyFragment ( artdaq::Fragment &  fragment,
size_t  send_timeout_usec = std::numeric_limits<size_t>::max() 
)
inlineoverridevirtual

Send a Fragment in non-reliable mode, using the underlying transfer plugin.

Parameters
fragmentThe Fragment to send
send_timeout_usecHow long to wait before aborting. Defaults to size_t::MAX_VALUE
Returns
A TransferInterface::CopyStatus result variable

Implements artdaq::TransferInterface.

Definition at line 46 of file Autodetect_transfer.cc.

CopyStatus artdaq::AutodetectTransfer::moveFragment ( artdaq::Fragment &&  fragment,
size_t  send_timeout_usec = std::numeric_limits<size_t>::max() 
)
inlineoverridevirtual

Send a Fragment in reliable mode, using the underlying transfer plugin.

Parameters
fragmentThe Fragment to send
send_timeout_usecHow long to wait before aborting. Defaults to size_t::MAX_VALUE
Returns
A TransferInterface::CopyStatus result variable

Implements artdaq::TransferInterface.

Definition at line 58 of file Autodetect_transfer.cc.

int artdaq::AutodetectTransfer::receiveFragment ( artdaq::Fragment &  fragment,
size_t  receiveTimeout 
)
inlineoverridevirtual

Receive a Fragment, using the underlying transfer plugin.

Parameters
fragmentOutput Fragment
receiveTimeoutTime to wait before returning TransferInterface::RECV_TIMEOUT
Returns
Rank of sender

Implements artdaq::TransferInterface.

Definition at line 34 of file Autodetect_transfer.cc.


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