$treeview $search $mathjax $extrastylesheet
artdaq
v3_04_01
$projectbrief
|
$projectbrief
|
$searchbox |
The interface through which RoutingMasterCore obtains Routing Tables using received Routing Tokens. More...
#include <artdaq/Application/Routing/RoutingMasterPolicy.hh>
Public Member Functions | |
RoutingMasterPolicy (fhicl::ParameterSet ps) | |
RoutingMasterPolicy Constructor. | |
virtual | ~RoutingMasterPolicy () |
Default virtual Destructor. | |
virtual detail::RoutingPacket | GetCurrentTable ()=0 |
Generate a Routing Table using received tokens. | |
size_t | GetReceiverCount () const |
Get the number of configured receivers. | |
size_t | GetMaxNumberOfTokens () const |
Get the largest number of tokens that the RoutingMasterPolicy has seen at any one time. | |
void | AddReceiverToken (int rank, unsigned new_slots_free) |
Add a token to the token list. | |
void | Reset () |
Reset the policy, setting the next sequence ID to be used to 1, and removing any tokens. | |
Protected Member Functions | |
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 | |
Fragment::sequence_id_t | next_sequence_id_ |
The next sequence ID to be assigned. |
The interface through which RoutingMasterCore obtains Routing Tables using received Routing Tokens.
Definition at line 18 of file RoutingMasterPolicy.hh.
artdaq::RoutingMasterPolicy::RoutingMasterPolicy | ( | fhicl::ParameterSet | ps | ) | [explicit] |
RoutingMasterPolicy Constructor.
ps | ParameterSet used to configure the RoutingMasterPolicy |
* RoutingMasterPolicy accepts the following Parameters: * "receiver_ranks" (REQUIRED): A list of integers indicating the ranks that the RoutingMasterPolicy should expect tokens from *
Definition at line 6 of file RoutingMasterPolicy.cc.
void artdaq::RoutingMasterPolicy::AddReceiverToken | ( | int | rank, | |
unsigned | new_slots_free | |||
) |
Add a token to the token list.
rank | Rank that the token is from | |
new_slots_free | Number of slots that are now free (should usually be 1) |
Definition at line 15 of file RoutingMasterPolicy.cc.
virtual detail::RoutingPacket artdaq::RoutingMasterPolicy::GetCurrentTable | ( | ) | [pure virtual] |
Generate a Routing Table using received tokens.
This function is pure virtual, it should be overridden by derived classes.
Implemented in artdaq::CapacityTestPolicy, artdaq::NoOpPolicy, and artdaq::RoundRobinPolicy.
size_t artdaq::RoutingMasterPolicy::GetMaxNumberOfTokens | ( | ) | const [inline] |
Get the largest number of tokens that the RoutingMasterPolicy has seen at any one time.
Definition at line 54 of file RoutingMasterPolicy.hh.
size_t artdaq::RoutingMasterPolicy::GetReceiverCount | ( | ) | const [inline] |
Get the number of configured receivers.
Definition at line 48 of file RoutingMasterPolicy.hh.