artdaq_demo
v3_06_00
|
Demonstration TransferInterface plugin showing how to discard events Intended for use in the transfer_to_dispatcher case, NOT for primary data stream! More...
Public Member Functions | |
NthEventTransfer (fhicl::ParameterSet const &ps, artdaq::TransferInterface::Role role) | |
NthEventTransfer Constructor. More... | |
TransferInterface::CopyStatus | transfer_fragment_min_blocking_mode (artdaq::Fragment const &fragment, size_t send_timeout_usec) override |
Transfer a Fragment to the destination. May not necessarily be reliable, but will not block longer than send_timeout_usec. More... | |
TransferInterface::CopyStatus | transfer_fragment_reliable_mode (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... | |
void | flush_buffers () override |
Flush any in-flight data. This should be used by the receiver after the receive loop has ended. | |
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.
artdaq::NthEventTransfer::NthEventTransfer | ( | fhicl::ParameterSet const & | ps, |
artdaq::TransferInterface::Role | role | ||
) |
NthEventTransfer Constructor.
ps | fhicl::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 |
role | Either kSend or kReceive, see TransferInterface constructor |
Definition at line 126 of file NthEvent_transfer.cc.
|
inlineoverride |
Get the destination rank from the physical transfer.
Definition at line 102 of file NthEvent_transfer.cc.
|
inlineoverridevirtual |
Determine whether the TransferInterface plugin is able to send/receive data.
Reimplemented from artdaq::TransferInterface.
Definition at line 109 of file NthEvent_transfer.cc.
|
inlineoverride |
Receive a fragment from the transfer plugin.
fragment | Reference to output Fragment object |
receiveTimeout | Timeout before aborting receive |
Definition at line 63 of file NthEvent_transfer.cc.
|
inlineoverride |
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 |
Definition at line 87 of file NthEvent_transfer.cc.
|
inlineoverride |
|
inlineoverride |
Get the source rank from the physical transfer.
Definition at line 96 of file NthEvent_transfer.cc.
|
overridevirtual |
Transfer a Fragment to the destination. May not necessarily be reliable, but will not block longer than send_timeout_usec.
Implements artdaq::TransferInterface.
Definition at line 152 of file NthEvent_transfer.cc.
|
overridevirtual |
Copy a fragment, using the reliable channel. moveFragment assumes ownership of the fragment.
fragment | Fragment to copy |
Implements artdaq::TransferInterface.
Definition at line 167 of file NthEvent_transfer.cc.