artdaq
v3_12_02
|
RoutingManagerCore implements the state machine for the RoutingManager artdaq application. RoutingManagerCore collects tokens from receivers, and at regular intervals uses these tokens to build Routing Tables that are sent to the senders. More...
#include <artdaq/Application/RoutingManagerCore.hh>
Public Member Functions | |
RoutingManagerCore () | |
RoutingManagerCore Constructor. | |
RoutingManagerCore (RoutingManagerCore const &)=delete | |
Copy Constructor is deleted. | |
~RoutingManagerCore () | |
RoutingManagerCore & | operator= (RoutingManagerCore const &)=delete |
Copy Assignment operator is deleted. More... | |
RoutingManagerCore (RoutingManagerCore &&)=delete | |
Move Constructor is deleted. | |
RoutingManagerCore & | operator= (RoutingManagerCore &&)=delete |
Move Assignment Operator is deleted. | |
bool | initialize (fhicl::ParameterSet const &pset, uint64_t, uint64_t) |
Processes the initialize request. More... | |
bool | start (art::RunID id, uint64_t, uint64_t) |
Start the RoutingManagerCore. More... | |
bool | stop (uint64_t, uint64_t) |
Stops the RoutingManagerCore. More... | |
bool | pause (uint64_t, uint64_t) |
Pauses the RoutingManagerCore. More... | |
bool | resume (uint64_t, uint64_t) |
Resumes the RoutingManagerCore. More... | |
bool | shutdown (uint64_t) |
Shuts Down the RoutingManagerCore. More... | |
bool | soft_initialize (fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) |
Soft-Initializes the RoutingManagerCore. More... | |
bool | reinitialize (fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) |
Reinitializes the RoutingManagerCore. More... | |
void | process_event_table () |
Main loop of the RoutingManagerCore. Determines when to send the next table update, asks the RoutingManagerPolicy for the table to send, and sends it. | |
void | send_event_table (detail::RoutingPacket packet) |
Sends a detail::RoutingPacket to the table receivers. More... | |
std::string | report (std::string const &) const |
Send a report on the current status of the RoutingManagerCore. More... | |
size_t | get_update_count () const |
Get the number of table updates sent by this RoutingManager this run. More... | |
Static Public Attributes | |
static const std::string | TABLE_UPDATES_STAT_KEY |
Key for Table Update count MonnitoredQuantity. | |
static const std::string | TOKENS_RECEIVED_STAT_KEY |
Key for the Tokens Received MonitoredQuantity. | |
static const std::string | CURRENT_TABLE_INTERVAL_STAT_KEY |
Key for the Current Table Interval MonitoredQuantity. | |
RoutingManagerCore implements the state machine for the RoutingManager artdaq application. RoutingManagerCore collects tokens from receivers, and at regular intervals uses these tokens to build Routing Tables that are sent to the senders.
Definition at line 34 of file RoutingManagerCore.hh.
artdaq::RoutingManagerCore::~RoutingManagerCore | ( | ) |
Destructor.
Definition at line 41 of file RoutingManagerCore.cc.
|
inline |
Get the number of table updates sent by this RoutingManager this run.
Definition at line 168 of file RoutingManagerCore.hh.
bool artdaq::RoutingManagerCore::initialize | ( | fhicl::ParameterSet const & | pset, |
uint64_t | , | ||
uint64_t | |||
) |
Processes the initialize request.
pset | ParameterSet used to configure the RoutingManagerCore |
* RoutingManagerCore accepts the following Parameters: * "daq" (REQUIRED): FHiCL table containing DAQ configuration * "policy" (REQUIRED): FHiCL table containing the RoutingManagerPolicy configuration * "policy" (Default: ""): Name of the RoutingManagerPolicy plugin to load * "rt_priority" (Default: 0): Unix process priority to assign to RoutingManagerCore * "table_update_interval_ms" (Default: 1000): Maximum amount of time between table updates * "table_update_interval_high_frac" (Default: 0.75): Fraction of the maximum seen table size at which the interval should be reduced * "table_update_interval_low_frac" (Default: 0.5): Fraction of the maximum seen table size at which the interval should be increased * "senders_send_by_send_count" (Default: false): If true, senders will use the current send count to lookup routing information in the table, instead of sequence ID. * "table_ack_retry_count" (Default: 5): The number of times the table will be resent while waiting for acknowledements * "table_update_port" (Default: 35556): The port on which to send table updates * "table_acknowledge_port" (Default: 35557): The port on which to listen for RoutingAckPacket datagrams * "table_update_address" (Default: "227.128.12.28"): Multicast address to send table updates to * "routing_manager_hostname" (Default: "localhost"): Hostname to send table updates from * "metrics": FHiCL table containing configuration for MetricManager *
Definition at line 48 of file RoutingManagerCore.cc.
|
delete |
Copy Assignment operator is deleted.
bool artdaq::RoutingManagerCore::pause | ( | uint64_t | , |
uint64_t | |||
) |
Pauses the RoutingManagerCore.
Definition at line 220 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::reinitialize | ( | fhicl::ParameterSet const & | pset, |
uint64_t | timeout, | ||
uint64_t | timestamp | ||
) |
Reinitializes the RoutingManagerCore.
pset | ParameterSet for configuring RoutingManagerCore |
timeout | Timeout for transition |
timestamp | Timestamp of transition |
Definition at line 258 of file RoutingManagerCore.cc.
std::string artdaq::RoutingManagerCore::report | ( | std::string const & | ) | const |
Send a report on the current status of the RoutingManagerCore.
Definition at line 392 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::resume | ( | uint64_t | , |
uint64_t | |||
) |
Resumes the RoutingManagerCore.
Definition at line 229 of file RoutingManagerCore.cc.
void artdaq::RoutingManagerCore::send_event_table | ( | detail::RoutingPacket | packet | ) |
Sends a detail::RoutingPacket to the table receivers.
packet | The detail::RoutingPacket to send |
send_event_table checks the table update socket and the acknowledge socket before sending the table update the first time. It then enters a loop where it sends the table update, then waits for acknowledgement packets. It keeps track of which senders have sent their acknowledgement packets, and discards duplicate acks. It leaves this loop once all senders have sent a valid acknowledgement packet.
Definition at line 365 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::shutdown | ( | uint64_t | ) |
Shuts Down the RoutingManagerCore.
Definition at line 237 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::soft_initialize | ( | fhicl::ParameterSet const & | pset, |
uint64_t | timeout, | ||
uint64_t | timestamp | ||
) |
Soft-Initializes the RoutingManagerCore.
pset | ParameterSet for configuring RoutingManagerCore |
timeout | Timeout for transition |
timestamp | Timestamp of transition |
Definition at line 250 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::start | ( | art::RunID | id, |
uint64_t | , | ||
uint64_t | |||
) |
Start the RoutingManagerCore.
id | Run ID of the current run |
Definition at line 192 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::stop | ( | uint64_t | , |
uint64_t | |||
) |
Stops the RoutingManagerCore.
Definition at line 209 of file RoutingManagerCore.cc.