artdaq  v3_00_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 copyFragment (artdaq::Fragment &, size_t) override
 Pretend to copy a Fragment to a destination. More...
 
CopyStatus moveFragment (artdaq::Fragment &&, size_t) override
 Pretend to move a Fragment to a destination. 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

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

Definition at line 8 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 81 of file Null_transfer.cc.

Member Function Documentation

CopyStatus artdaq::NullTransfer::copyFragment ( artdaq::Fragment &  ,
size_t   
)
inlineoverridevirtual

Pretend to copy a Fragment to a destination.

Returns
CopyStatus::kSuccess (No-Op)

Implements artdaq::TransferInterface.

Definition at line 65 of file Null_transfer.cc.

CopyStatus artdaq::NullTransfer::moveFragment ( artdaq::Fragment &&  ,
size_t   
)
inlineoverridevirtual

Pretend to move a Fragment to a destination.

Returns
CopyStatus::kSuccess (No-Op)

Implements artdaq::TransferInterface.

Definition at line 74 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 32 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 56 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 44 of file Null_transfer.cc.


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