mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
moench server first draft
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@509 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
c5b3f10669
commit
61a1356bc3
@ -172,7 +172,8 @@ enum detectorType {
|
||||
EIGER, /**< eiger */
|
||||
GOTTHARD, /**< gotthard */
|
||||
PICASSO, /**< picasso */
|
||||
AGIPD /**< agipd */
|
||||
AGIPD, /**< agipd */
|
||||
MOENCH /**< moench */
|
||||
};
|
||||
|
||||
/* /\** */
|
||||
|
@ -26,12 +26,13 @@ const enum detectorType myDetectorType=GOTTHARD;
|
||||
const enum detectorType myDetectorType=EIGER;
|
||||
#elif PICASSOD
|
||||
const enum detectorType myDetectorType=PICASSO;
|
||||
#elif MOENCHD
|
||||
const enum detectorType myDetectorType=MOENCH;
|
||||
#else
|
||||
const enum detectorType myDetectorType=GENERIC;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
extern int nModX;
|
||||
extern int nModY;
|
||||
extern int dataBytes;
|
||||
|
@ -6,10 +6,10 @@
|
||||
CROSS = bfin-uclinux-
|
||||
CC = $(CROSS)gcc
|
||||
|
||||
CFLAGS += -Wall -DMCB_FUNCS -DDACS_INT -DDEBUG #-DVERBOSE #-DVERYVERBOSE #-DVIRTUAL #-DDACS_INT_CSERVER
|
||||
CFLAGS += -Wall -DMOENCHD -DMCB_FUNCS -DDACS_INT -DDEBUG #-DVERBOSE #-DVERYVERBOSE #-DVIRTUAL #-DDACS_INT_CSERVER
|
||||
|
||||
|
||||
PROGS= gotthardDetectorServer
|
||||
PROGS= moenchDetectorServer
|
||||
INSTDIR= /tftpboot
|
||||
INSTMODE= 0777
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
DESTDIR ?= ./
|
||||
|
||||
CC = gcc
|
||||
CFLAGS += -Wall -DMCB_FUNCS -DDACS_INT -DDEBUG -DVIRTUAL
|
||||
CFLAGS += -Wall -DMOENCH -DMCB_FUNCS -DDACS_INT -DDEBUG -DVIRTUAL
|
||||
|
||||
|
||||
PROGS= $(DESTDIR)/gotthardVirtualServer
|
||||
|
@ -26,7 +26,6 @@ const int nChans=NCHAN;
|
||||
const int nChips=NCHIP;
|
||||
const int nDacs=NDAC;
|
||||
const int nAdcs=NADC;
|
||||
const enum detectorType myDetectorType=GOTTHARD;
|
||||
enum detectorSettings thisSettings;
|
||||
|
||||
int sChan, sChip, sMod, sDac, sAdc;
|
||||
|
@ -8,13 +8,13 @@
|
||||
|
||||
// Hardware definitions
|
||||
|
||||
#define NCHAN 128
|
||||
#define NCHIP 10
|
||||
#define NCHAN 160*160
|
||||
#define NCHIP 1
|
||||
#define NMAXMODX 1
|
||||
#define NMAXMODY 1
|
||||
#define NMAXMOD NMAXMODX*NMAXMODY
|
||||
#define NDAC 8
|
||||
#define NADC 5
|
||||
#define NADC 1
|
||||
|
||||
#define NCHANS NCHAN*NCHIP*NMAXMOD
|
||||
#define NDACS NDAC*NMAXMOD
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "mcb_funcs.h"
|
||||
#include "trimming_funcs.h"
|
||||
#include "registers_g.h"
|
||||
#include "svnInfoGotthard.h"
|
||||
#include "svnInfoMoench.h"
|
||||
|
||||
#define FIFO_DATA_REG_OFF 0x50<<11
|
||||
#define CONTROL_REG 0x24<<11
|
||||
@ -17,12 +17,23 @@
|
||||
|
||||
int (*flist[256])(int);
|
||||
|
||||
#ifdef MCB_FUNCS
|
||||
extern const enum detectorType myDetectorType;
|
||||
#endif
|
||||
#ifndef MCB_FUNCS
|
||||
|
||||
//defined in the detector specific file
|
||||
#ifdef MYTHEND
|
||||
const enum detectorType myDetectorType=MYTHEN;
|
||||
#elif GOTTHARDD
|
||||
const enum detectorType myDetectorType=GOTTHARD;
|
||||
#elif EIGERD
|
||||
const enum detectorType myDetectorType=EIGER;
|
||||
#elif PICASSOD
|
||||
const enum detectorType myDetectorType=PICASSO;
|
||||
#elif MOENCHD
|
||||
const enum detectorType myDetectorType=MOENCH;
|
||||
#else
|
||||
const enum detectorType myDetectorType=GENERIC;
|
||||
#endif
|
||||
|
||||
|
||||
extern int nModX;
|
||||
extern int nModY;
|
||||
extern int dataBytes;
|
||||
@ -46,7 +57,7 @@ int digitalTestBit = 0;
|
||||
|
||||
int init_detector( int b) {
|
||||
#ifndef PICASSOD
|
||||
printf("This is a GOTTHARD detector with %d chips per module\n", NCHIP);
|
||||
printf("This is a MOENCH detector with %d chips per module\n", NCHIP);
|
||||
#else
|
||||
printf("This is a PICASSO detector with %d chips per module\n", NCHIP);
|
||||
#endif
|
||||
@ -63,7 +74,7 @@ int init_detector( int b) {
|
||||
#endif
|
||||
testFpga();
|
||||
testRAM();
|
||||
//gotthard specific
|
||||
//moench specific
|
||||
setPhaseShiftOnce();
|
||||
|
||||
prepareADC();
|
||||
@ -1569,7 +1580,7 @@ int get_threshold_energy(int file_des) {
|
||||
int n;
|
||||
int imod;
|
||||
|
||||
strcpy(mess,"cannot set threshold for gotthard");
|
||||
strcpy(mess,"cannot set threshold for moench");
|
||||
|
||||
n = receiveDataOnly(file_des,&imod,sizeof(imod));
|
||||
if (n < 0)
|
||||
@ -1590,7 +1601,7 @@ int set_threshold_energy(int file_des) {
|
||||
int arg[3];
|
||||
int n;
|
||||
|
||||
strcpy(mess,"cannot set threshold for gotthard");
|
||||
strcpy(mess,"cannot set threshold for moench");
|
||||
|
||||
n = receiveDataOnly(file_des,&arg,sizeof(arg));
|
||||
if (n < 0)
|
||||
@ -2053,7 +2064,7 @@ int set_timer(int file_des) {
|
||||
retval=setGates(tns);
|
||||
break;
|
||||
case PROBES_NUMBER:
|
||||
sprintf(mess,"can't set timer for gotthard\n");
|
||||
sprintf(mess,"can't set timer for moench\n");
|
||||
ret=FAIL;
|
||||
break;
|
||||
case CYCLES_NUMBER:
|
||||
@ -2317,7 +2328,7 @@ int set_speed(int file_des) {
|
||||
receiveDataOnly(file_des,&arg,sizeof(arg));
|
||||
receiveDataOnly(file_des,&val,sizeof(val));
|
||||
|
||||
sprintf(mess,"can't set speed variable for gotthard\n");
|
||||
sprintf(mess,"can't set speed variable for moench\n");
|
||||
|
||||
|
||||
sendDataOnly(file_des,&ret,sizeof(ret));
|
||||
@ -2337,7 +2348,7 @@ int set_readout_flags(int file_des) {
|
||||
|
||||
receiveDataOnly(file_des,&arg,sizeof(arg));
|
||||
|
||||
sprintf(mess,"can't set readout flags for gotthard\n");
|
||||
sprintf(mess,"can't set readout flags for moench\n");
|
||||
|
||||
sendDataOnly(file_des,&ret,sizeof(ret));
|
||||
sendDataOnly(file_des,mess,sizeof(mess));
|
||||
@ -2355,7 +2366,7 @@ int execute_trimming(int file_des) {
|
||||
int ret=FAIL;
|
||||
enum trimMode mode;
|
||||
|
||||
sprintf(mess,"can't set execute trimming for gotthard\n");
|
||||
sprintf(mess,"can't set execute trimming for moench\n");
|
||||
|
||||
receiveDataOnly(file_des,&mode,sizeof(mode));
|
||||
receiveDataOnly(file_des,arg,sizeof(arg));
|
||||
|
@ -477,7 +477,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
|
||||
/** returns detector type string from detector type index
|
||||
\param t string can be Mythen, Pilatus, Eiger, Gotthard, Agipd, Unknown
|
||||
\returns MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, GENERIC
|
||||
\returns MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, MÖNCH, GENERIC
|
||||
*/
|
||||
static string getDetectorType(detectorType t){\
|
||||
switch (t) {\
|
||||
@ -486,12 +486,13 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
case EIGER: return string("Eiger"); \
|
||||
case GOTTHARD: return string("Gotthard"); \
|
||||
case AGIPD: return string("Agipd"); \
|
||||
case MOENCH: return string("Mönch"); \
|
||||
default: return string("Unknown"); \
|
||||
}};
|
||||
|
||||
/** returns detector type index from detector type string
|
||||
\param type can be MYTHEN, PILATUS, EIGER, GOTTHARD, AGIPD, GENERIC
|
||||
\returns Mythen, Pilatus, Eiger, Gotthard, Agipd, Unknown
|
||||
\returns Mythen, Pilatus, Eiger, Gotthard, Agipd, Mönch, Unknown
|
||||
*/
|
||||
static detectorType getDetectorType(string const type){\
|
||||
if (type=="Mythen") return MYTHEN;\
|
||||
@ -499,6 +500,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
|
||||
if (type=="Eiger") return EIGER; \
|
||||
if (type=="Gotthard") return GOTTHARD; \
|
||||
if (type=="Agipd") return AGIPD; \
|
||||
if (type=="Mönch") return MOENCH; \
|
||||
return GENERIC;};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user