artdaq  v3_12_02
artdaq::TableReceiver Class Reference

Sends Fragment objects using TransferInterface plugins. Uses Routing Tables if confgiured, otherwise will Round-Robin Fragments to the destinations. More...

#include <artdaq/DAQrate/detail/TableReceiver.hh>

Classes

struct  Config
 Configuration for Routing table reception More...
 

Public Types

using Parameters = fhicl::WrappedTable< Config >
 Used for ParameterSet validation (if desired)
 
using RoutingTable = std::map< artdaq::Fragment::sequence_id_t, int >
 Internal representation of a routing table, relating a sequence ID to a destination rank.
 

Public Member Functions

 TableReceiver (const fhicl::ParameterSet &ps)
 TableReceiver Constructor. More...
 
virtual ~TableReceiver ()
 TableReceiver Destructor.
 
RoutingTable GetRoutingTable () const
 Get a copy of the current RoutingTable.
 
RoutingTable GetAndClearRoutingTable ()
 Get the current RoutingTable and remove all entries.
 
int GetRoutingTableEntry (artdaq::Fragment::sequence_id_t seqID)
 Get the destination rank for the given sequence ID. More...
 
size_t GetRoutingTableEntryCount () const
 Gets the current size of the Routing Table, in case other parts of the system want to use this information. More...
 
size_t GetRemainingRoutingTableEntries () const
 Gets the number of sends remaining in the routing table, in case other parts of the system want to use this information. More...
 
void StopTableReceiver ()
 Stop the TableReceiver.
 
void RemoveRoutingTableEntry (Fragment::sequence_id_t seq)
 Remove the given sequence ID from the routing table and sent_count lists. More...
 
void SendMetrics () const
 Report metrics to MetricManager.
 
bool RoutingManagerEnabled () const
 Whether the TableReceiver will receive tables from the RoutingManager.
 

Static Public Attributes

static constexpr int ROUTING_FAILED = -1111
 Value used to indicate that a route was not properly generated.
 

Detailed Description

Sends Fragment objects using TransferInterface plugins. Uses Routing Tables if confgiured, otherwise will Round-Robin Fragments to the destinations.

Definition at line 34 of file TableReceiver.hh.

Constructor & Destructor Documentation

artdaq::TableReceiver::TableReceiver ( const fhicl::ParameterSet &  ps)
explicit

TableReceiver Constructor.

Parameters
psParameterSet used to configure the TableReceiver. See artdaq::TableReceiver::Config

Definition at line 16 of file TableReceiver.cc.

Member Function Documentation

size_t artdaq::TableReceiver::GetRemainingRoutingTableEntries ( ) const

Gets the number of sends remaining in the routing table, in case other parts of the system want to use this information.

Returns
The number of sends remaining in the routing table

Definition at line 334 of file TableReceiver.cc.

int artdaq::TableReceiver::GetRoutingTableEntry ( artdaq::Fragment::sequence_id_t  seqID)

Get the destination rank for the given sequence ID.

Parameters
seqIDSequence ID to query
Returns
Destination rank for given Sequence ID

Definition at line 74 of file TableReceiver.cc.

size_t artdaq::TableReceiver::GetRoutingTableEntryCount ( ) const

Gets the current size of the Routing Table, in case other parts of the system want to use this information.

Returns
The current size of the Routing Table.

Definition at line 328 of file TableReceiver.cc.

void artdaq::TableReceiver::RemoveRoutingTableEntry ( Fragment::sequence_id_t  seq)

Remove the given sequence ID from the routing table and sent_count lists.

Parameters
seqSequence ID to remove

Definition at line 342 of file TableReceiver.cc.


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