This interface defines the functions used to transfer data between artdaq applications.
More...
#include <artdaq/TransferPlugins/TransferInterface.hh>
|
static std::string | CopyStatusToString (CopyStatus in) |
|
This interface defines the functions used to transfer data between artdaq applications.
Definition at line 18 of file TransferInterface.hh.
Enumerator |
---|
DATA_END |
Value that is to be returned when a Transfer plugin determines that no more data will be arriving.
|
RECV_TIMEOUT |
Value to be returned upon receive timeout.
|
RECV_SUCCESS |
For code clarity, things checking for successful receive should check retval >= RECV_SUCCESS.
|
Definition at line 35 of file TransferInterface.hh.
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.
Enumerator |
---|
kSuccess |
The send operation completed successfully.
|
kTimeout |
The send operation timed out.
|
kErrorNotRequiringException |
Some error occurred, but no exception was thrown.
|
Definition at line 55 of file TransferInterface.hh.
artdaq::TransferInterface::TransferInterface |
( |
const fhicl::ParameterSet & |
ps, |
|
|
Role |
role |
|
) |
| |
TransferInterface Constructor.
- Parameters
-
* TransferInterface accepts the following Parameters:
* "source_rank" (Default: my_rank): The rank that data is coming from
* "destination_rank" (Default: my_rank): The rank that data is going to
* "unique_label" (Default: "transfer_between_[source_rank]_and_[destination_rank]"): A label that uniquely identifies the TransferInterface instance
* "buffer_count" (Default: 10): How many Fragments can the TransferInterface handle simultaneously
* "max_fragment_size_words" (Default: 1024): The maximum Fragment size expected. May be used for static memory allocation, and will cause errors
* if larger Fragments are sent.
* "partition_number" (Default: 0): Partition that this TransferInterface is a part of
*
Definition at line 5 of file TransferInterface.cc.
virtual CopyStatus artdaq::TransferInterface::copyFragment |
( |
artdaq::Fragment & |
fragment, |
|
|
size_t |
send_timeout_usec |
|
) |
| |
|
pure virtual |
virtual int artdaq::TransferInterface::destination_rank |
( |
| ) |
const |
|
inlinevirtual |
std::string artdaq::TransferInterface::GetTraceName |
( |
| ) |
const |
|
inline |
Constructs a name suitable for TRACE messages.
- Returns
- The unique_label and a SEND/RECV identifier
Definition at line 180 of file TransferInterface.hh.
virtual bool artdaq::TransferInterface::isRunning |
( |
| ) |
|
|
inlinevirtual |
virtual CopyStatus artdaq::TransferInterface::moveFragment |
( |
artdaq::Fragment && |
fragment | ) |
|
|
pure virtual |
int artdaq::TransferInterface::receiveFragment |
( |
artdaq::Fragment & |
fragment, |
|
|
size_t |
receiveTimeout |
|
) |
| |
|
virtual |
virtual int artdaq::TransferInterface::receiveFragmentData |
( |
RawDataType * |
destination, |
|
|
size_t |
wordCount |
|
) |
| |
|
pure virtual |
Receive the body of a Fragment to the given destination pointer.
- Parameters
-
destination | Pointer to memory region where Fragment data should be stored |
wordCount | Number of words of Fragment data to receive |
- Returns
- The rank the Fragment was received from (should be source_rank), or RECV_TIMEOUT
The precondition for calling this function is that you have received a valid header, therefore it does not have a , as the Fragment data should immediately be available.
Implemented in artdaq::MulticastTransfer, artdaq::TCPSocketTransfer, artdaq::ShmemTransfer, artdaq::AutodetectTransfer, and artdaq::NullTransfer.
virtual int artdaq::TransferInterface::receiveFragmentHeader |
( |
detail::RawFragmentHeader & |
header, |
|
|
size_t |
receiveTimeout |
|
) |
| |
|
pure virtual |
Role artdaq::TransferInterface::role |
( |
| ) |
const |
|
inlineprotected |
virtual int artdaq::TransferInterface::source_rank |
( |
| ) |
const |
|
inlinevirtual |
std::string artdaq::TransferInterface::uniqueLabel |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: