artdaq  v3_04_01
artdaq::NullTransfer Class Reference

NullTransfer does not send or receive data, but acts as if it did. More...

Inheritance diagram for artdaq::NullTransfer:
artdaq::TransferInterface

Public Member Functions

 NullTransfer (const fhicl::ParameterSet &pset, Role role)
 NullTransfer constructor. More...
 
virtual ~NullTransfer ()=default
 NullTransfer default Destructor.
 
int receiveFragment (artdaq::Fragment &, size_t) override
 Pretend to receive a Fragment. More...
 
int receiveFragmentHeader (detail::RawFragmentHeader &, size_t) override
 Pretend to receive a Fragment Header. More...
 
int receiveFragmentData (RawDataType *, size_t) override
 Pretend to receive Fragment Data. More...
 
CopyStatus transfer_fragment_min_blocking_mode (artdaq::Fragment const &, size_t) override
 Pretend to send a Fragment to a destination. More...
 
CopyStatus transfer_fragment_reliable_mode (artdaq::Fragment &&) override
 Pretend to send a Fragment to a destination. 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.
 
- 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  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 Public Member Functions inherited from artdaq::TransferInterface
static std::string CopyStatusToString (CopyStatus in)
 Convert a CopyStatus variable to its string represenatation More...
 
- Protected Member Functions inherited from artdaq::TransferInterface
Role role () const
 Get the TransferInterface::Role of this TransferInterface. More...
 
- Protected Attributes inherited from artdaq::TransferInterface
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.
 

Detailed Description

NullTransfer does not send or receive data, but acts as if it did.

Definition at line 7 of file Null_transfer.cc.

Constructor & Destructor Documentation

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

NullTransfer constructor.

Parameters
psetParameterSet used to configure TransferInterface
roleRole of this NullTransfer instance (kSend or kReceive)

NullTransfer only requires the Parameters for configuring a TransferInterface

Definition at line 78 of file Null_transfer.cc.

Member Function Documentation

bool artdaq::NullTransfer::isRunning ( )
inlineoverridevirtual

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

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

Reimplemented from artdaq::TransferInterface.

Definition at line 68 of file Null_transfer.cc.

int artdaq::NullTransfer::receiveFragment ( artdaq::Fragment &  ,
size_t   
)
inlineoverridevirtual

Pretend to receive a Fragment.

Returns
Source Rank (Success code)

WARNING: This function may create unintended side-effets. NullTransfer should only really be used in Role::kSend!

Reimplemented from artdaq::TransferInterface.

Definition at line 30 of file Null_transfer.cc.

int artdaq::NullTransfer::receiveFragmentData ( RawDataType *  ,
size_t   
)
inlineoverridevirtual

Pretend to receive Fragment Data.

Returns
Source Rank (Success code)

WARNING: This function may create unintended side-effets. NullTransfer should only really be used in Role::kSend!

Implements artdaq::TransferInterface.

Definition at line 48 of file Null_transfer.cc.

int artdaq::NullTransfer::receiveFragmentHeader ( detail::RawFragmentHeader &  ,
size_t   
)
inlineoverridevirtual

Pretend to receive a Fragment Header.

Returns
Source Rank (Success code)

WARNING: This function may create unintended side-effets. NullTransfer should only really be used in Role::kSend!

Implements artdaq::TransferInterface.

Definition at line 39 of file Null_transfer.cc.

CopyStatus artdaq::NullTransfer::transfer_fragment_min_blocking_mode ( artdaq::Fragment const &  ,
size_t   
)
inlineoverridevirtual

Pretend to send a Fragment to a destination.

Returns
CopyStatus::kSuccess (No-Op)

Implements artdaq::TransferInterface.

Definition at line 54 of file Null_transfer.cc.

CopyStatus artdaq::NullTransfer::transfer_fragment_reliable_mode ( artdaq::Fragment &&  )
inlineoverridevirtual

Pretend to send a Fragment to a destination.

Returns
CopyStatus::kSuccess (No-Op)

Implements artdaq::TransferInterface.

Definition at line 62 of file Null_transfer.cc.


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