mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-01 10:20:04 +02:00
almost no changes - checking in for alba
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@263 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
e0ad54dd46
commit
d7bafd8072
@ -13,9 +13,9 @@ INSTMODE= 0777
|
||||
SRCS= server.c server_funcs.c communication_funcs.c firmware_funcs.c mcb_funcs.c trimming_funcs.c sharedmemory.c
|
||||
OBJS= $(SRCS:%.c=%.o)
|
||||
|
||||
CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DVERBOSE -DDACS_INT
|
||||
#-DVERYVERBOSE
|
||||
#-Werror
|
||||
#VFLAGS= -DVERBOSE -DVERYVERBOSE
|
||||
CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DDACS_INT $(VFLAGS)
|
||||
#-Werror
|
||||
|
||||
LDLIBS+= -lm
|
||||
|
||||
@ -28,8 +28,6 @@ $(PROGS): $(OBJS)
|
||||
echo $(OBJS)
|
||||
$(CC) $(LDFLAGS) $^ $(LDLIBS) $(CFLAGS) -o $@
|
||||
|
||||
|
||||
|
||||
install: $(PROGS)
|
||||
$(INSTALL) -d $(INSTDIR)
|
||||
$(INSTALL) -m $(INSTMODE) $(PROGS) $(INSTDIR)
|
||||
|
@ -761,8 +761,11 @@ int getThresholdEnergy() {
|
||||
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
//printf("module=%d gain=%f, offset=%f, dacu=%f\n",imod, myg, myo, detectorDacs[VTHRESH+imod*NDAC]);
|
||||
#ifdef DACS_INT
|
||||
printf("module=%d gain=%f, offset=%f, dacu=%d\n",imod, myg, myo,setDACRegister(VTHRESH,-1,imod));
|
||||
#else
|
||||
printf("module=%d gain=%f, offset=%f, dacu=%f\n",imod, myg, myo,setDACRegister(VTHRESH,-1,imod));
|
||||
#endif
|
||||
printf("Threshold energy of module %d is %d eV\n", imod, ethr);
|
||||
#endif
|
||||
|
||||
|
@ -48,7 +48,7 @@ class angCalLogClass {
|
||||
|
||||
//
|
||||
|
||||
int readHeader(ifstream &infile, char *settings, int &maxmod, int &nmod, int &chanspermod, char *angconvfile, double &globaloff, double &fineoff, int &angdir, char *ffdir, char *fffile, char *badfile ) { \
|
||||
int readHeader(ifstream &infile, int &maxmod, int &nmod, int &chanspermod, char *angconvfile, double &globaloff, double &fineoff, int &angdir, char *ffdir, char *fffile, char *badfile ) { \
|
||||
nmod=0; chanspermod=0; globaloff=0; fineoff=0; angdir=1; \
|
||||
strcpy(angconvfile,"none"); strcpy(ffdir,"none"); strcpy(fffile,"none"); strcpy(badfile,"none"); \
|
||||
char line[1000], myvar[100], myarg[100]; \
|
||||
@ -111,6 +111,7 @@ class angCalLogClass {
|
||||
float v;
|
||||
infile.getline(line,1000); \
|
||||
if (sscanf(line,"%g %s",&v, datafname)<2) return -1; \
|
||||
printf("scanned %s to %f %s",line,v,datafname);
|
||||
threshold=v; \
|
||||
if (infile.bad() || infile.eof()) \
|
||||
return -1; \
|
||||
|
Binary file not shown.
@ -5,13 +5,16 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string.h>
|
||||
|
||||
using namespace std;
|
||||
class badChannelCorrections{
|
||||
|
||||
public:
|
||||
|
||||
static int readBadChannelCorrectionFile(string fname, int &nbad, int *badlist){ ifstream infile(fname.c_str()); int nb=-1; if (infile.is_open()) {nb=readBadChannelCorrectionFile(infile,nbad,badlist); infile.close();}; return nb;};
|
||||
|
||||
|
||||
|
||||
static int readBadChannelCorrectionFile(ifstream &infile, int &nbad, int *badlist, int moff=0){ \
|
||||
int interrupt=0; \
|
||||
|
@ -310,8 +310,7 @@ int defaultDataReadyFunc(detectorData* d, void* p) {
|
||||
printf("Filename %s\n",d->fileName);
|
||||
printf("Number of points %d (%d)\n",d->npoints,d->npy);
|
||||
for(int i=0;i<d->npoints;i++){
|
||||
printf("%d-[%f]:%f\n",i,*(d->angles+(i*sizeof(double))),*(d->values+(i*sizeof(double))));
|
||||
fflush(stdout);
|
||||
printf("%d-[%f]:%f\n",i,(d->angles)[i],(d->values)[i]);
|
||||
}
|
||||
printf("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU Finished \n");
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user