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

A RoutingMasterPolicy which tries to fully load the first receiver, then the second, and so on. More...

+ Inheritance diagram for artdaq::CapacityTestPolicy:

Public Member Functions

 CapacityTestPolicy (fhicl::ParameterSet ps)
 CapacityTestPolicy Constructor. More...
 
virtual ~CapacityTestPolicy ()=default
 Default virtual Destructor.
 
detail::RoutingPacket GetCurrentTable () override
 Apply the policy to the current tokens. 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 tries to fully load the first receiver, then the second, and so on.

Definition at line 11 of file CapacityTest_policy.cc.

Constructor & Destructor Documentation

artdaq::CapacityTestPolicy::CapacityTestPolicy ( fhicl::ParameterSet  ps)
explicit

CapacityTestPolicy Constructor.

Parameters
psParameterSet used to configure the CapacityTestPolicy
* CapacityTestPolicy accepts the following Parameters:
* "tokens_used_per_table_percent" (Default: 50): Percentage of available tokens to be used on each iteration.
* 

Definition at line 45 of file CapacityTest_policy.cc.

Member Function Documentation

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

Apply the policy to the current tokens.

Returns
A detail::RoutingPacket containing the Routing Table

CapacityTestPolicy will assign available tokens from the first receiver, then the second, and so on until it has assigned tokens equal to the inital_token_count * tokens_used_per_table_percent / 100. The idea is that in steady-state, the load on the receivers should reflect the workload relative to the capacity of the system. (i.e. if you have 5 receivers, and 3 of them are 100% busy, then your load factor is approximately 60%.)

Implements artdaq::RoutingMasterPolicy.

Definition at line 50 of file CapacityTest_policy.cc.


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