artdaq  v2_02_03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
artdaq::RoundRobinPolicy Class Reference

A RoutingMasterPolicy which evenly distributes Sequence IDs to all receivers. If an uneven number of tokens have been received, extra tokens are stored for the next table update. More...

+ Inheritance diagram for artdaq::RoundRobinPolicy:

Public Member Functions

 RoundRobinPolicy (fhicl::ParameterSet ps)
 RoundRobinPolicy Constructor. More...
 
virtual ~RoundRobinPolicy ()=default
 Default virtual Destructor.
 
detail::RoutingPacket GetCurrentTable () override
 Create a Routing Table using the tokens that have been received. More...
 
- Public Member Functions inherited from artdaq::RoutingMasterPolicy
 RoutingMasterPolicy (fhicl::ParameterSet ps)
 RoutingMasterPolicy Constructor. More...
 
virtual ~RoutingMasterPolicy ()=default
 Default virtual Destructor.
 
size_t GetReceiverCount () const
 Get the number of configured receivers. More...
 
size_t GetMaxNumberOfTokens () const
 Get the largest number of tokens that the RoutingMasterPolicy has seen at any one time. More...
 
void AddReceiverToken (int rank, unsigned new_slots_free)
 Add a token to the token list. More...
 
void Reset ()
 Reset the policy, setting the next sequence ID to be used to 0.
 

Additional Inherited Members

- Protected Member Functions inherited from artdaq::RoutingMasterPolicy
std::unique_ptr< std::deque
< int > > 
getTokensSnapshot ()
 Gets the current token list, used for building Routing Tables.
 
void addUnusedTokens (std::unique_ptr< std::deque< int >> tokens)
 If necessary, return unused tokens to the token list, for subsequent updates.
 
- Protected Attributes inherited from artdaq::RoutingMasterPolicy
Fragment::sequence_id_t next_sequence_id_
 The next sequence ID to be assigned.
 

Detailed Description

A RoutingMasterPolicy which evenly distributes Sequence IDs to all receivers. If an uneven number of tokens have been received, extra tokens are stored for the next table update.

Definition at line 11 of file RoundRobin_policy.cc.

Constructor & Destructor Documentation

artdaq::RoundRobinPolicy::RoundRobinPolicy ( fhicl::ParameterSet  ps)
inlineexplicit

RoundRobinPolicy Constructor.

Parameters
psParameterSet used to configure RoundRobinPolicy

RoundRobinPolicy accepts no Parameters at this time.

Definition at line 20 of file RoundRobin_policy.cc.

Member Function Documentation

detail::RoutingPacket artdaq::RoundRobinPolicy::GetCurrentTable ( )
overridevirtual

Create a Routing Table using the tokens that have been received.

Returns
A detail::RoutingPacket containing the table update

RoundRobinPolicy will go through the list of receivers as many times as it can, until one or more receivers have no tokens. It always does full "turns" through the recevier list.

Implements artdaq::RoutingMasterPolicy.

Definition at line 38 of file RoundRobin_policy.cc.


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