artdaq
v3_07_01
|
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, and removing any tokens. | |
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 15 of file RoundRobin_policy.cc.
|
inlineexplicit |
RoundRobinPolicy Constructor.
ps | ParameterSet used to configure RoundRobinPolicy |
RoundRobinPolicy accepts the following Parameter: "minimum_participants" (Default: 0): Minimum number of receivers to distribute between. Use negative number to indicate how many can be missing from total. If the number of allowed missing receivers is greater than the number that exist, then the minimum number of participants will be set to 1.
Definition at line 25 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 50 of file RoundRobin_policy.cc.