edit test.cpp and Makefile for ClassInfluxDB
This commit is contained in:
parent
04e62777c3
commit
7c16a69466
15
Aux/Makefile
15
Aux/Makefile
|
@ -2,13 +2,22 @@ CC=g++
|
|||
CFLAG= -O2
|
||||
#CFLAG= -g -O0
|
||||
ROOTFLAG=`root-config --cflags --glibs`
|
||||
|
||||
OBJS = ClassDigitizer.o ClassInfluxDB.o
|
||||
|
||||
all: EventBuilder
|
||||
|
||||
EventBuilder: EventBuilder.cpp SolReader.h ../Hit.h
|
||||
$(CC) $(CFLAG) EventBuilder.cpp -o EventBuilder ${ROOTFLAG}
|
||||
|
||||
test: test.cpp ../ClassDigitizer2Gen.o
|
||||
$(CC) $(CFLAG) test.cpp ../ClassDigitizer2Gen.o -o test -lcurl -lCAEN_FELib -lX11
|
||||
ClassDigitizer.o : ../ClassDigitizer.cpp ../ClassDigitizer.h ../RegisterAddress.h ../macro.h ../ClassData.h
|
||||
$(CC) $(COPTS) -c ../ClassDigitizer.cpp
|
||||
|
||||
ClassInfluxDB.o : ../ClassInfluxDB.cpp ../ClassInfluxDB.h
|
||||
$(CC) $(COPTS) -c ../ClassInfluxDB.cpp -lcurl
|
||||
|
||||
test: test.cpp ../ClassDigitizer2Gen.o ../ClassInfluxDB.o
|
||||
$(CC) $(CFLAG) test.cpp ../ClassDigitizer2Gen.o ../ClassInfluxDB.o -o test -lcurl -lCAEN_FELib -lX11
|
||||
|
||||
clean:
|
||||
-rm EventBuilder
|
||||
-rm EventBuilder test
|
||||
|
|
39
Aux/test.cpp
39
Aux/test.cpp
|
@ -9,10 +9,10 @@
|
|||
#include <mutex>
|
||||
|
||||
#include "../ClassDigitizer2Gen.h"
|
||||
#include "../influxdb.h"
|
||||
#include "../ClassInfluxDB.h"
|
||||
|
||||
#define maxRead 400
|
||||
|
||||
ß
|
||||
std::mutex digiMTX;
|
||||
Digitizer2Gen * digi = new Digitizer2Gen();
|
||||
InfluxDB * influx = new InfluxDB("https://fsunuc.physics.fsu.edu/influx/", false);
|
||||
|
@ -77,29 +77,26 @@ static void StatLoop(){
|
|||
|
||||
}
|
||||
|
||||
#include <CAENDig2.h>
|
||||
// #include <CAENDig2.h>
|
||||
// int CAENDig2_GetLibVersion(char* version);
|
||||
// void CAEN_test(){
|
||||
// printf("##########################################\n");
|
||||
// printf("\t CAEN firmware DPP-PHA testing \n");
|
||||
// printf("##########################################\n");
|
||||
// remove("haha_000.sol");
|
||||
// char version[16];
|
||||
// CAENDig2_GetLibVersion(version);
|
||||
// puts(version);
|
||||
// char haha[100];
|
||||
// CAEN_FELib_GetLibInfo(haha, 100);
|
||||
// puts(haha);
|
||||
// CAEN_FELib_GetLibVersion(version);
|
||||
// puts(version);
|
||||
|
||||
int CAENDig2_GetLibVersion(char* version);
|
||||
// }
|
||||
|
||||
int main(int argc, char* argv[]){
|
||||
|
||||
printf("##########################################\n");
|
||||
printf("\t CAEN firmware DPP-PHA testing \n");
|
||||
printf("##########################################\n");
|
||||
|
||||
remove("haha_000.sol");
|
||||
|
||||
char version[16];
|
||||
CAENDig2_GetLibVersion(version);
|
||||
puts(version);
|
||||
|
||||
char haha[100];
|
||||
CAEN_FELib_GetLibInfo(haha, 100);
|
||||
puts(haha);
|
||||
|
||||
CAEN_FELib_GetLibVersion(version);
|
||||
puts(version);
|
||||
|
||||
/*
|
||||
const char * url = "dig2://192.168.0.100/";
|
||||
//const char * url = "dig2://192.168.0.254/";
|
||||
|
|
Loading…
Reference in New Issue
Block a user