artdaq
v3_09_01
|
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 | |
RoutingManagerCore & | operator= (RoutingManagerCore &&)=delete |
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 e, uint64_t f) |
Soft-Initializes the RoutingManagerCore. More... | |
bool | reinitialize (fhicl::ParameterSet const &pset, uint64_t e, uint64_t f) |
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. | |
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 31 of file RoutingManagerCore.hh.
artdaq::RoutingManagerCore::~RoutingManagerCore | ( | ) |
Destructor.
Definition at line 40 of file RoutingManagerCore.cc.
|
inline |
Get the number of table updates sent by this RoutingManager this run.
Definition at line 163 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 * "sender_ranks" (REQUIRED): List of ranks (integers) for the senders (that receive table updates) * "table_update_interval_ms" (Default: 1000): Maximum amount of time between table updates * "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 47 of file RoutingManagerCore.cc.
|
delete |
Copy Assignment operator is deleted.
bool artdaq::RoutingManagerCore::pause | ( | uint64_t | , |
uint64_t | |||
) |
Pauses the RoutingManagerCore.
Definition at line 216 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::reinitialize | ( | fhicl::ParameterSet const & | pset, |
uint64_t | e, | ||
uint64_t | f | ||
) |
Reinitializes the RoutingManagerCore.
pset | ParameterSet for configuring RoutingManagerCore |
timeout | Timeout for transition |
timestamp | Timestamp of transition |
Definition at line 250 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 618 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::resume | ( | uint64_t | , |
uint64_t | |||
) |
Resumes the RoutingManagerCore.
Definition at line 225 of file RoutingManagerCore.cc.
void artdaq::RoutingManagerCore::send_event_table | ( | detail::RoutingPacket | packet | ) |
Sends a detail::RoutingPacket to the table receivers.
table | 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 383 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::shutdown | ( | uint64_t | ) |
Shuts Down the RoutingManagerCore.
Definition at line 233 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::soft_initialize | ( | fhicl::ParameterSet const & | pset, |
uint64_t | e, | ||
uint64_t | f | ||
) |
Soft-Initializes the RoutingManagerCore.
pset | ParameterSet for configuring RoutingManagerCore |
timeout | Timeout for transition |
timestamp | Timestamp of transition |
Definition at line 242 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 181 of file RoutingManagerCore.cc.
bool artdaq::RoutingManagerCore::stop | ( | uint64_t | , |
uint64_t | |||
) |
Stops the RoutingManagerCore.
Definition at line 205 of file RoutingManagerCore.cc.