mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-12 05:25:36 +02:00
Refactor files around in project
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
|
||||
void PSIWriter::notify_first_pulse_id(uint64_t pulse_id)
|
||||
{
|
||||
string request_address(bsread_rest_address);
|
||||
|
||||
async(launch::async, [pulse_id, &request_address]{
|
||||
try {
|
||||
|
||||
cout << "Sending first received pulse_id " << pulse_id <<;
|
||||
cout << " to bsread_rest_address " << request_address << endl;
|
||||
|
||||
stringstream request;
|
||||
request << "curl -X PUT " << request_address;
|
||||
request << "/start_pulse_id/" << pulse_id;
|
||||
|
||||
string request_call(request.str());
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
cout << "[" << chrono::system_clock::now() << "]";
|
||||
cout << "[ProcessManager::notify_first_pulse_id] Sending request";
|
||||
cout << "(" << request_call << ")." << endl;
|
||||
#endif
|
||||
|
||||
system(request_call.c_str());
|
||||
} catch (...){}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
void PSIWriter::notify_last_pulse_id(uint64_t pulse_id)
|
||||
{
|
||||
|
||||
try {
|
||||
cout << "Sending last received pulse_id " << pulse_id;
|
||||
cout << " to bsread address " << bsread_rest_address << endl;
|
||||
|
||||
stringstream request;
|
||||
request << "curl -X PUT " << bsread_rest_address;
|
||||
request << "/stop_pulse_id/" << pulse_id;
|
||||
|
||||
cout << "Request: " << request.str() << endl;
|
||||
|
||||
string request_call(request.str());
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
using namespace date;
|
||||
cout << "[" << chrono::system_clock::now() << "]";
|
||||
cout << "[ProcessManager::notify_last_pulse_id] Sending request";
|
||||
cout << "(" << request_call << ")." << endl;
|
||||
#endif
|
||||
|
||||
system(request_call.c_str());
|
||||
} catch (...){}
|
||||
}
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
SRC_DIR = .
|
||||
OBJ_DIR = ./obj
|
||||
BIN_DIR = ./bin
|
||||
MKDIR = mkdir -p
|
||||
|
||||
CC = g++
|
||||
CFLAGS = -Wall -Wfatal-errors -std=c++11 -I${CONDA_PREFIX}/include -I${CONDA_PREFIX}/include/cpp_h5_writer
|
||||
LDFLAGS = -L${CONDA_PREFIX}/lib -L/usr/lib64 -lcpp_h5_writer -lzmq -lhdf5 -lhdf5_hl -lhdf5_cpp -lhdf5_hl_cpp -lboost_system -lboost_regex -lboost_thread -lpthread
|
||||
|
||||
HEADERS = $(wildcard $(SRC_DIR)/*.hpp)
|
||||
SRCS = $(wildcard $(SRC_DIR)/*.cpp)
|
||||
OBJS = $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(SRCS))
|
||||
|
||||
sf_h5_writer: export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib
|
||||
sf_h5_writer: lib build_dirs $(OBJS)
|
||||
$(CC) $(LDFLAGS) -o $(BIN_DIR)/sf_h5_writer $(OBJS) $(LDFLAGS)
|
||||
|
||||
lib:
|
||||
$(MAKE) -C ../lib deploy
|
||||
|
||||
debug: CFLAGS += -DDEBUG_OUTPUT -g
|
||||
debug: sf_h5_writer
|
||||
|
||||
deploy: sf_h5_writer
|
||||
cp bin/* ${CONDA_PREFIX}/bin
|
||||
|
||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -c -o $@ $<
|
||||
|
||||
build_dirs:
|
||||
$(MKDIR) $(OBJ_DIR) $(BIN_DIR)
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ_DIR) $(BIN_DIR)
|
||||
@@ -1,4 +0,0 @@
|
||||
make
|
||||
|
||||
cp bin/* ${PREFIX}/bin
|
||||
cp ../../bin/* ${PREFIX}/lib
|
||||
@@ -1,26 +0,0 @@
|
||||
package:
|
||||
name: sf_h5_writer
|
||||
version: 0.1.0
|
||||
|
||||
build:
|
||||
number: 0
|
||||
|
||||
source:
|
||||
path: ..
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- make
|
||||
- gcc
|
||||
- cppzmq ==4.2.1
|
||||
- hdf5 ==1.10.1
|
||||
- boost ==1.61.0
|
||||
|
||||
run:
|
||||
- cppzmq ==4.2.1
|
||||
- hdf5 ==1.10.1
|
||||
- boost ==1.61.0
|
||||
|
||||
|
||||
about:
|
||||
summary: "SF ZMQ to H5 writer."
|
||||
Reference in New Issue
Block a user