Analysis Software
Documentation for sPHENIX simulation software
|
#include "mongoose.h"
#include "rcdaq.h"
#include <iostream>
#include <sstream>
#include <sys/stat.h>
Go to the source code of this file.
Functions | |
int | update (struct mg_connection *nc, const char *key, const double value) |
int | update (struct mg_connection *nc, const char *key, const int value) |
int | update (struct mg_connection *nc, const char *key, const char *value) |
int | trigger_updates (struct mg_connection *nc) |
void | initial_ws_update (struct mg_connection *nc) |
void | send_ws_updates (struct mg_connection *nc) |
void | send_updates (struct mg_connection *nc) |
void | send_status (struct mg_connection *nc, std::string out) |
void | send_error (struct mg_connection *nc, std::string out) |
void | send_nothing (struct mg_connection *nc) |
void * | mg_server (void *arg) |
static void | broadcast (struct mg_connection *nc, char *str, const int len) |
int | mg_end () |
int | request_mg_update (const int what) |
std::string | get_statusstring () |
std::string | get_loggingstring () |
static void | ev_handler (struct mg_connection *nc, int ev, void *ev_data) |
Variables | |
static struct mg_serve_http_opts | s_http_server_opts |
int | end_web_thread = 0 |
pthread_mutex_t | M_ws_send |
int | error_flag = 0 |
std::string | error_string = "" |
static int | last_runstate |
static int | last_runnumber |
static int | last_eventnumber |
static double | last_runvolume |
static int | last_runduration |
static int | last_openflag |
static int | last_serverflag |
static int | rcdaqname_request_flag |
static int | speed_request_flag = 0 |
static int | speed_update_interval =9 |
|
static |
Definition at line 161 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 161 of file rcdaq_mg_server.cc
References Acts::PhysicalConstants::c, mg_next(), mg_send_websocket_frame(), mg_connection::mgr, and WEBSOCKET_OP_TEXT.
Referenced by update().
|
static |
Definition at line 298 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 298 of file rcdaq_mg_server.cc
References daq_begin(), daq_close(), daq_end(), daq_open(), websocket_message::data, error_flag, error_string, mg_connection::flags, initial_ws_update(), MG_EV_CLOSE, MG_EV_HTTP_REQUEST, MG_EV_WEBSOCKET_FRAME, MG_EV_WEBSOCKET_HANDSHAKE_DONE, MG_F_USER_1, mg_serve_http(), mg_vcmp(), out, s_http_server_opts, send_error(), send_nothing(), send_status(), send_updates(), websocket_message::size, utils::status, and http_message::uri.
Referenced by mg_call(), and mg_server().
std::string get_loggingstring | ( | ) |
Definition at line 101 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 101 of file rcdaq_mg_server.cc
References daq_running(), get_current_filename(), get_openflag(), get_serverflag(), and out.
Referenced by initial_ws_update(), and trigger_updates().
std::string get_statusstring | ( | ) |
Definition at line 82 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 82 of file rcdaq_mg_server.cc
References daq_running(), geant4_parallel::ends, error_flag, error_string, get_oldrunnumber(), get_runduration(), and out.
Referenced by initial_ws_update(), send_updates(), send_ws_updates(), and trigger_updates().
void initial_ws_update | ( | struct mg_connection * | nc | ) |
Definition at line 135 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 135 of file rcdaq_mg_server.cc
References daq_get_myname(), daq_running(), get_current_filename(), get_eventnumber(), get_loggingstring(), get_openflag(), get_runduration(), get_runnumber(), get_runvolume(), get_serverflag(), get_statusstring(), mg_send_websocket_frame(), str, and WEBSOCKET_OP_TEXT.
Referenced by ev_handler().
int mg_end | ( | ) |
Definition at line 50 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 50 of file rcdaq_mg_server.cc
References end_web_thread.
Referenced by daq_webcontrol().
void* mg_server | ( | void * | arg | ) |
Definition at line 497 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 497 of file rcdaq_mg_server.cc
References daq_running(), mg_serve_http_opts::document_root, mg_serve_http_opts::enable_directory_listing, end_web_thread, geant4_parallel::ends, ev_handler(), get_eventnumber(), get_openflag(), get_runduration(), get_runnumber(), get_runvolume(), get_serverflag(), mg_serve_http_opts::index_files, last_eventnumber, last_openflag, last_runduration, last_runnumber, last_runstate, last_runvolume, last_serverflag, M_ws_send, mg_bind(), mg_mgr_init(), mg_mgr_poll(), mg_set_protocol_http_websocket(), rcdaqname_request_flag, s_http_server_opts, send_ws_updates(), speed_request_flag, speed_update_interval, Acts::Test::time, and trigger_updates().
Referenced by daq_webcontrol().
int request_mg_update | ( | const int | what | ) |
Definition at line 56 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 56 of file rcdaq_mg_server.cc
References MG_REQUEST_NAME, MG_REQUEST_SPEED, rcdaqname_request_flag, and speed_request_flag.
Referenced by daq_begin(), daq_end(), and daq_set_name().
void send_error | ( | struct mg_connection * | nc, |
std::string | out | ||
) |
Definition at line 264 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 264 of file rcdaq_mg_server.cc
References mg_connection::flags, MG_F_SEND_AND_CLOSE, mg_printf(), and ambiguity_solver_full_chain::x.
Referenced by ev_handler().
void send_nothing | ( | struct mg_connection * | nc | ) |
Definition at line 283 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 283 of file rcdaq_mg_server.cc
References mg_connection::flags, MG_F_SEND_AND_CLOSE, and mg_printf().
Referenced by ev_handler().
void send_status | ( | struct mg_connection * | nc, |
std::string | out | ||
) |
Definition at line 238 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 238 of file rcdaq_mg_server.cc
References mg_connection::flags, MG_F_SEND_AND_CLOSE, mg_printf(), str, and ambiguity_solver_full_chain::x.
Referenced by ev_handler().
void send_updates | ( | struct mg_connection * | nc | ) |
Definition at line 218 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 218 of file rcdaq_mg_server.cc
References mg_connection::flags, get_eventnumber(), get_runvolume(), get_statusstring(), MG_F_SEND_AND_CLOSE, mg_printf(), and str.
Referenced by ev_handler().
void send_ws_updates | ( | struct mg_connection * | nc | ) |
Definition at line 206 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 206 of file rcdaq_mg_server.cc
References daq_running(), get_eventnumber(), get_runvolume(), get_statusstring(), and Acts::KalmanVertexTrackUpdater::update().
Referenced by mg_server().
int trigger_updates | ( | struct mg_connection * | nc | ) |
Definition at line 450 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 450 of file rcdaq_mg_server.cc
References daq_get_events_per_second(), daq_get_mb_per_second(), daq_get_myname(), daq_running(), error_flag, get_loggingstring(), get_openflag(), get_runnumber(), get_serverflag(), get_statusstring(), last_openflag, last_runstate, last_serverflag, rcdaqname_request_flag, speed_request_flag, and Acts::KalmanVertexTrackUpdater::update().
Referenced by mg_server().
int update | ( | struct mg_connection * | nc, |
const char * | key, | ||
const double | value | ||
) |
Definition at line 179 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 179 of file rcdaq_mg_server.cc
References broadcast(), and str.
int update | ( | struct mg_connection * | nc, |
const char * | key, | ||
const int | value | ||
) |
Definition at line 188 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 188 of file rcdaq_mg_server.cc
References broadcast(), and str.
int update | ( | struct mg_connection * | nc, |
const char * | key, | ||
const char * | value | ||
) |
Definition at line 197 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 197 of file rcdaq_mg_server.cc
References broadcast(), and str.
int end_web_thread = 0 |
Definition at line 29 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 29 of file rcdaq_mg_server.cc
Referenced by mg_end(), and mg_server().
int error_flag = 0 |
Definition at line 33 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 33 of file rcdaq_mg_server.cc
Referenced by ev_handler(), get_statusstring(), and trigger_updates().
std::string error_string = "" |
Definition at line 34 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 34 of file rcdaq_mg_server.cc
Referenced by ev_handler(), and get_statusstring().
|
static |
Definition at line 38 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 38 of file rcdaq_mg_server.cc
Referenced by mg_server().
|
static |
Definition at line 41 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 41 of file rcdaq_mg_server.cc
Referenced by mg_server(), and trigger_updates().
|
static |
Definition at line 40 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 40 of file rcdaq_mg_server.cc
Referenced by mg_server().
|
static |
Definition at line 37 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 37 of file rcdaq_mg_server.cc
Referenced by mg_server().
|
static |
Definition at line 36 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 36 of file rcdaq_mg_server.cc
Referenced by mg_server(), and trigger_updates().
|
static |
Definition at line 39 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 39 of file rcdaq_mg_server.cc
Referenced by mg_server().
|
static |
Definition at line 42 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 42 of file rcdaq_mg_server.cc
Referenced by mg_server(), and trigger_updates().
pthread_mutex_t M_ws_send |
Definition at line 31 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 31 of file rcdaq_mg_server.cc
Referenced by mg_server().
|
static |
Definition at line 43 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 43 of file rcdaq_mg_server.cc
Referenced by mg_server(), request_mg_update(), and trigger_updates().
|
static |
Definition at line 27 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 27 of file rcdaq_mg_server.cc
Referenced by ev_handler(), and mg_server().
|
static |
Definition at line 44 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 44 of file rcdaq_mg_server.cc
Referenced by mg_server(), request_mg_update(), and trigger_updates().
|
static |
Definition at line 46 of file rcdaq_mg_server.cc.
View newest version in sPHENIX GitHub at line 46 of file rcdaq_mg_server.cc
Referenced by mg_server().