artdaq
v3_09_01
|
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...
Public Member Functions | |
AutodetectTransfer (const fhicl::ParameterSet &pset, Role role) | |
AutodetectTransfer Constructor. More... | |
~AutodetectTransfer () override=default | |
AutodetectTransfer default Destructor. | |
int | receiveFragment (artdaq::Fragment &fragment, size_t receiveTimeout) override |
Receive a Fragment, using the underlying 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... | |
CopyStatus | transfer_fragment_min_blocking_mode (artdaq::Fragment const &fragment, size_t send_timeout_usec) override |
Send a Fragment in non-reliable mode, using the underlying transfer plugin. More... | |
CopyStatus | transfer_fragment_reliable_mode (artdaq::Fragment &&fragment) override |
Send a Fragment in reliable mode, using the underlying transfer plugin. More... | |
bool | isRunning () override |
Determine whether the TransferInterface plugin is able to send/receive data. More... | |
void | flush_buffers () override |
Flush any in-flight data. This should be used by the receiver after the receive loop has ended. | |
![]() | |
TransferInterface (const fhicl::ParameterSet &ps, Role role) | |
TransferInterface Constructor. More... | |
TransferInterface (const TransferInterface &)=delete | |
Copy Constructor is deleted. | |
TransferInterface & | operator= (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 | |
![]() | |
enum | ReceiveReturnCode : int { DATA_END = -2222, RECV_TIMEOUT = -1111, NO_RANK_INFO = -1, RECV_SUCCESS = 0 } |
Return codes from receive operations More... | |
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... | |
using | Parameters = fhicl::WrappedTable< Config > |
Used for ParameterSet validation (if desired) | |
![]() | |
static std::string | CopyStatusToString (CopyStatus in) |
Convert a CopyStatus variable to its string represenatation More... | |
![]() | |
TransferInterface (TransferInterface &&)=delete | |
TransferInterface & | operator= (TransferInterface &&)=delete |
Role | role () const |
Get the TransferInterface::Role of this TransferInterface. More... | |
![]() | |
const Role | role_ |
Whether this instance of TransferInterface is a sender or receiver. | |
const int | source_rank_ |
Rank of source. | |
const int | destination_rank_ |
Rank of destination. | |
const std::string | unique_label_ |
Unique label of transfer (ideally the same on sender and receiver) | |
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. | |
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 17 of file Autodetect_transfer.cc.
artdaq::AutodetectTransfer::AutodetectTransfer | ( | const fhicl::ParameterSet & | pset, |
Role | role | ||
) |
AutodetectTransfer Constructor.
pset | ParameterSet used to configure AutodetectTransfer |
role | Role of this TransferInterface, either kReceive or kSend |
Definition at line 110 of file Autodetect_transfer.cc.
|
inlineoverridevirtual |
Determine whether the TransferInterface plugin is able to send/receive data.
Reimplemented from artdaq::TransferInterface.
Definition at line 91 of file Autodetect_transfer.cc.
|
inlineoverridevirtual |
Receive a Fragment, using the underlying transfer plugin.
fragment | Output Fragment |
receiveTimeout | Time to wait before returning TransferInterface::RECV_TIMEOUT |
Reimplemented from artdaq::TransferInterface.
Definition at line 38 of file Autodetect_transfer.cc.
|
inlineoverridevirtual |
Receive the body of a Fragment to the given destination pointer.
destination | Pointer to memory region where Fragment data should be stored |
wordCount | Number of words of Fragment data to receive |
Implements artdaq::TransferInterface.
Definition at line 61 of file Autodetect_transfer.cc.
|
inlineoverridevirtual |
Receive a Fragment Header from the transport mechanism.
[out] | header | Received Fragment Header |
receiveTimeout | Timeout for receive |
Implements artdaq::TransferInterface.
Definition at line 50 of file Autodetect_transfer.cc.
|
inlineoverridevirtual |
Send a Fragment in non-reliable mode, using the underlying transfer plugin.
fragment | The Fragment to send |
send_timeout_usec | How long to wait before aborting. Defaults to size_t::MAX_VALUE |
Implements artdaq::TransferInterface.
Definition at line 72 of file Autodetect_transfer.cc.
|
inlineoverridevirtual |
Send a Fragment in reliable mode, using the underlying transfer plugin.
fragment | The Fragment to send |
Implements artdaq::TransferInterface.
Definition at line 82 of file Autodetect_transfer.cc.