#ifndef _UTHBOOK_ #define NHIST 2000 #define MAXI2 65536 #define NORMAL_I2 0x01 #define PACKED_I2 0x11 #define NORMAL_I4 0x02 #define PACKED_I4 0x12 #define NORMAL_F 0x03 #define PACKED_F 0x13 // RR maximum length of the title #define MAX_TITLE_LENGTH 256 // RR the shared segment, and header containing offsets of all Uthists extern unsigned long *uthistOffsetArray; // address pointer to ensire the same mapping location extern void *addr; // RR pathname of shared mem location extern const char* shmPath; // RR number of hists in shared memory extern int indexOfEndOfMem; // RR shared memory extern int shm; // RR the size of the shared memory block extern int shared_seg_size; // RR boolean which denotes if shared memory is being used or not extern bool usingSharedMemory; #ifdef VXWORKS typedef int hvar; /* use integers only; data in BOS bank can be I*2 or I*4 */ #define HZERO 0 #else typedef float hvar; #define HZERO 0.001 #endif typedef struct uthisti { int entries; /* total number of entries */ int ifi2_book; /* set to 1 in booking if I2 permitted */ int ifi2_fill; /* set to 1 in filling if I2 permitted */ int nbinx; int xmin; int xmax; int xunderflow; int xoverflow; int nbiny; int ymin; int ymax; int yunderflow; int yoverflow; int nwtitle; // RR changed to fixed size 256 char title[MAX_TITLE_LENGTH]; int dx; int dy; // RR Needs to be changed to offset from beginning of struct int *buf; int **buf2; } UThisti; typedef struct uthistf { int entries; /* total number of entries */ int ifi2_book; /* set to 1 in booking if I2 permitted */ int ifi2_fill; /* set to 1 in filling if I2 permitted */ int nbinx; float xmin; float xmax; float xunderflow; float xoverflow; int nbiny; float ymin; float ymax; float yunderflow; float yoverflow; int nwtitle; // RR changed to fixed size 256 char title[MAX_TITLE_LENGTH]; float dx; float dy; // RR Needs to be changed to offset from beginning of struct float *buf; float **buf2; } UThistf; #ifdef VXWORKS typedef UThisti hstr; #else typedef UThistf hstr; #endif /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! double all prototypes because of unknown problem in ROOT *.h, namely construction #ifdef __cplusplus extern "C" { #endif .......... .......... .......... #ifdef __cplusplus } #endif does not work !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ #ifdef __cplusplus extern "C" { #include "Uthbook_fun.h" } #else #include "Uthbook_fun.h" #endif #define _UTHBOOK_ #endif