mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-24 11:10:43 +02:00
Rename Detector Name to lower case
This commit is contained in:
@@ -14,7 +14,8 @@ namespace BufferUtils
|
||||
const int reduction_factor_live_analysis;
|
||||
const std::string PEDE_FILENAME;
|
||||
const std::string GAIN_FILENAME;
|
||||
const std::string DETECTOR_NAME;
|
||||
|
||||
const std::string detector_name;
|
||||
const int n_modules;
|
||||
const int start_udp_port;
|
||||
};
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
using namespace std;
|
||||
using namespace chrono;
|
||||
using namespace buffer_config;
|
||||
using namespace BufferUtils;
|
||||
|
||||
int main (int argc, char *argv[]) {
|
||||
|
||||
@@ -27,18 +28,16 @@ int main (int argc, char *argv[]) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
auto config = BufferUtils::read_json_config(string(argv[1]));
|
||||
int module_id = atoi(argv[2]);
|
||||
const auto config = read_json_config(string(argv[1]));
|
||||
const int module_id = atoi(argv[2]);
|
||||
|
||||
auto udp_port = config.start_udp_port + module_id;
|
||||
const auto udp_port = config.start_udp_port + module_id;
|
||||
FrameUdpReceiver receiver(udp_port, module_id);
|
||||
RamBuffer buffer(config.DETECTOR_NAME, config.n_modules);
|
||||
RamBuffer buffer(config.detector_name, config.n_modules);
|
||||
FrameStats stats("M" + to_string(module_id), STATS_MODULO);
|
||||
|
||||
auto ctx = zmq_ctx_new();
|
||||
auto socket = BufferUtils::bind_socket(
|
||||
ctx, config.DETECTOR_NAME, module_id);
|
||||
|
||||
FrameStats stats("M" + to_string(module_id), STATS_MODULO);
|
||||
auto socket = bind_socket(ctx, config.detector_name, module_id);
|
||||
|
||||
ModuleFrame meta;
|
||||
char* data = new char[MODULE_N_BYTES];
|
||||
|
||||
@@ -106,7 +106,7 @@ void ZmqLiveSender::send(const ImageMetadata& meta, const char *data)
|
||||
header.AddMember("run_name", run_name, header_alloc);
|
||||
|
||||
rapidjson::Value detector_name;
|
||||
detector_name.SetString(config_.DETECTOR_NAME.c_str(), header_alloc);
|
||||
detector_name.SetString(config_.detector_name.c_str(), header_alloc);
|
||||
header.AddMember("detector_name", detector_name, header_alloc);
|
||||
|
||||
header.AddMember("htype", "array-1.0", header_alloc);
|
||||
|
||||
@@ -25,13 +25,13 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
auto config = BufferUtils::read_json_config(string(argv[1]));
|
||||
string RECV_IPC_URL = BUFFER_LIVE_IPC_URL + config.DETECTOR_NAME + "-";
|
||||
string RECV_IPC_URL = BUFFER_LIVE_IPC_URL + config.detector_name + "-";
|
||||
|
||||
auto ctx = zmq_ctx_new();
|
||||
zmq_ctx_set(ctx, ZMQ_IO_THREADS, STREAM_ZMQ_IO_THREADS);
|
||||
|
||||
ZmqPulseSyncReceiver receiver(ctx, config.DETECTOR_NAME, config.n_modules);
|
||||
RamBuffer ram_buffer(config.DETECTOR_NAME, config.n_modules);
|
||||
ZmqPulseSyncReceiver receiver(ctx, config.detector_name, config.n_modules);
|
||||
RamBuffer ram_buffer(config.detector_name, config.n_modules);
|
||||
ZmqLiveSender sender(ctx, config);
|
||||
|
||||
// TODO: Remove stats trash.
|
||||
|
||||
Reference in New Issue
Block a user