artdaq
v3_03_00
|
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...
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... | |
![]() | |
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 1. | |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
Fragment::sequence_id_t | next_sequence_id_ |
The next sequence ID to be assigned. | |
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 13 of file RoundRobin_policy.cc.
|
inlineexplicit |
RoundRobinPolicy Constructor.
ps | ParameterSet used to configure RoundRobinPolicy |
RoundRobinPolicy accepts the following Parameter: "use_all_tokens" (Default: false): Whether to use all tokens or to stop when we can no longer complete a "turn"
Definition at line 23 of file RoundRobin_policy.cc.
|
overridevirtual |
Create a Routing Table using the tokens that have been received.
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 47 of file RoundRobin_policy.cc.