#ifndef SLS_DETECTOR_DEFS_H #define SLS_DETECTOR_DEFS_H #ifdef __CINT__ #define MYROOT #define __cplusplus #endif //#include #include "sls_receiver_defs.h" /** default maximum string length */ #define MAX_SCAN_STEPS 2000 /** maxmimum number of modules per controller*/ #define MAXMODS 24 /** maxmimum number of detectors ina multidetector structure*/ #define MAXDET 100 /** header length for data :gotthard*/ #define HEADERLENGTH 12 /** maximum rois */ #define MAX_ROIS 100 /** maximum unit size of program sent to detector */ #define MAX_FPGAPROGRAMSIZE (2 * 1024 *1024) #define MAX_SCAN_LEVELS 2 typedef char mystring[MAX_STR_LENGTH]; typedef double mysteps[MAX_SCAN_STEPS]; #ifndef DACS_FLOAT typedef int dacs_t; #else typedef float dacs_t; #endif #define DEFAULT_DET_MAC "00:aa:bb:cc:dd:ee" #define DEFAULT_DET_IP "129.129.202.46" /** \file sls_detector_defs.h This file contains all the basic definitions common to the slsDetector class and to the server programs running on the detector * @author Anna Bergamaschi * @version 0.1alpha (any string) * @see slsDetector $Revision: 824 $ */ /** get flag form most functions */ #define GET_FLAG -1 #ifdef __cplusplus /** @short class containing all the structures, constants and enum definitions */ class slsDetectorDefs: public virtual slsReceiverDefs{ public: slsDetectorDefs(){}; #endif enum {startScript, scriptBefore, headerBefore, headerAfter,scriptAfter, stopScript, enCalLog, angCalLog, MAX_ACTIONS}; /** @short structure for a detector channel should not be used by unexperienced users \see ::channelRegisterBit */ typedef struct { int chan; /**< is the channel number */ int chip; /**< is the chip number */ int module; /**< is the module number */ int64_t reg; /**< is the is the channel register (e.g. trimbits, calibration enable, comparator enable...) */ } sls_detector_channel; /** @short structure for a detector chip should not be used by unexperienced users \see ::chipRegisterBit ::channelRegisterBit */ typedef struct { int chip; /**< is the chip number */ int module; /**< is the module number */ int nchan; /**< is the number of channels in the chip */ int reg; /**