artdaq
v3_02_00
|
RoutingMasterCore implements the state machine for the RoutingMaster artdaq application. RoutingMasterCore 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/RoutingMasterCore.hh>
Public Member Functions | |
RoutingMasterCore () | |
RoutingMasterCore Constructor. | |
RoutingMasterCore (RoutingMasterCore const &)=delete | |
Copy Constructor is deleted. | |
~RoutingMasterCore () | |
RoutingMasterCore & | operator= (RoutingMasterCore const &)=delete |
Copy Assignment operator is deleted. More... | |
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 RoutingMasterCore. More... | |
bool | stop (uint64_t, uint64_t) |
Stops the RoutingMasterCore. More... | |
bool | pause (uint64_t, uint64_t) |
Pauses the RoutingMasterCore. More... | |
bool | resume (uint64_t, uint64_t) |
Resumes the RoutingMasterCore. More... | |
bool | shutdown (uint64_t) |
Shuts Down the RoutingMasterCore. More... | |
bool | soft_initialize (fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) |
Soft-Initializes the RoutingMasterCore. More... | |
bool | reinitialize (fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) |
Reinitializes the RoutingMasterCore. More... | |
size_t | process_event_table () |
Main loop of the RoutingMasterCore. Determines when to send the next table update, asks the RoutingMasterPolicy for the table to send, and sends it. More... | |
void | send_event_table (detail::RoutingPacket table) |
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 RoutingMasterCore. 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. | |
RoutingMasterCore implements the state machine for the RoutingMaster artdaq application. RoutingMasterCore 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 RoutingMasterCore.hh.
artdaq::RoutingMasterCore::~RoutingMasterCore | ( | ) |
Destructor.
Definition at line 43 of file RoutingMasterCore.cc.
bool artdaq::RoutingMasterCore::initialize | ( | fhicl::ParameterSet const & | pset, |
uint64_t | , | ||
uint64_t | |||
) |
Processes the initialize request.
pset | ParameterSet used to configure the RoutingMasterCore |
* RoutingMasterCore accepts the following Parameters: * "daq" (REQUIRED): FHiCL table containing DAQ configuration * "policy" (REQUIRED): FHiCL table containing the RoutingMasterPolicy configuration * "policy" (Default: ""): Name of the RoutingMasterPolicy plugin to load * "rt_priority" (Default: 0): Unix process priority to assign to RoutingMasterCore * "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 * "routing_token_port" (Default: 35555): The port on which to listen for RoutingToken packets * "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_master_hostname" (Default: "localhost"): Hostname to send table updates from * "metrics": FHiCL table containing configuration for MetricManager *
Definition at line 49 of file RoutingMasterCore.cc.
|
delete |
Copy Assignment operator is deleted.
bool artdaq::RoutingMasterCore::pause | ( | uint64_t | , |
uint64_t | |||
) |
Pauses the RoutingMasterCore.
Definition at line 194 of file RoutingMasterCore.cc.
size_t artdaq::RoutingMasterCore::process_event_table | ( | ) |
Main loop of the RoutingMasterCore. Determines when to send the next table update, asks the RoutingMasterPolicy for the table to send, and sends it.
Definition at line 237 of file RoutingMasterCore.cc.
bool artdaq::RoutingMasterCore::reinitialize | ( | fhicl::ParameterSet const & | pset, |
uint64_t | timeout, | ||
uint64_t | timestamp | ||
) |
Reinitializes the RoutingMasterCore.
pset | ParameterSet for configuring RoutingMasterCore |
timeout | Timeout for transition |
timestamp | Timestamp of transition |
Definition at line 229 of file RoutingMasterCore.cc.
std::string artdaq::RoutingMasterCore::report | ( | std::string const & | ) | const |
Send a report on the current status of the RoutingMasterCore.
Definition at line 610 of file RoutingMasterCore.cc.
bool artdaq::RoutingMasterCore::resume | ( | uint64_t | , |
uint64_t | |||
) |
Resumes the RoutingMasterCore.
Definition at line 203 of file RoutingMasterCore.cc.
void artdaq::RoutingMasterCore::send_event_table | ( | detail::RoutingPacket | table | ) |
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 318 of file RoutingMasterCore.cc.
bool artdaq::RoutingMasterCore::shutdown | ( | uint64_t | ) |
Shuts Down the RoutingMasterCore.
Definition at line 212 of file RoutingMasterCore.cc.
bool artdaq::RoutingMasterCore::soft_initialize | ( | fhicl::ParameterSet const & | pset, |
uint64_t | timeout, | ||
uint64_t | timestamp | ||
) |
Soft-Initializes the RoutingMasterCore.
pset | ParameterSet for configuring RoutingMasterCore |
timeout | Timeout for transition |
timestamp | Timestamp of transition |
Definition at line 221 of file RoutingMasterCore.cc.
bool artdaq::RoutingMasterCore::start | ( | art::RunID | id, |
uint64_t | , | ||
uint64_t | |||
) |
Start the RoutingMasterCore.
id | Run ID of the current run |
Definition at line 168 of file RoutingMasterCore.cc.
bool artdaq::RoutingMasterCore::stop | ( | uint64_t | , |
uint64_t | |||
) |
Stops the RoutingMasterCore.
Definition at line 185 of file RoutingMasterCore.cc.