#ifndef SLS_DETECTOR_DEFS_H #define SLS_DETECTOR_DEFS_H #ifdef __CINT__ #define MYROOT #define __cplusplus #endif #include /** default maximum string length */ #define MAX_STR_LENGTH 1000 /** 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 typedef double double32_t; typedef float float32_t; typedef int int32_t; typedef char mystring[MAX_STR_LENGTH]; typedef double mysteps[MAX_SCAN_STEPS]; #ifdef DACS_INT 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" #define MAX_FRAMES_PER_FILE 20000 #define SHORT_MAX_FRAMES_PER_FILE 100000 #define MOENCH_MAX_FRAMES_PER_FILE 1000 /** \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$ */ /** get flag form most functions */ #define GET_FLAG -1 #ifdef __cplusplus /** @short class containing all the structures, constants and enum definitions */ class slsDetectorDefs { 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; /**