QMuonBuffer.hh
00001 #ifndef __QMUONBUFFER_HH_
00002 #define __QMUONBUFFER_HH_
00003
00004 #include <sys/time.h>
00005 #include <sys/shm.h>
00006 #include <sys/ipc.h>
00007
00008 #define NCHANNELS 16
00009 #define NEVENTSSHM 1000
00010 #define READSIZE 2 + NCHANNELS
00011
00012
00013
00014 struct datum_t{
00015 short channel;
00016 short value;
00017 short underThrOverFlow;
00018
00019
00020
00021 short validDatum;
00022
00023
00024 };
00025
00026 struct event_t{
00027 time_t startTimeSec;
00028
00029 time_t clockTimeTenthsMs;
00030 datum_t charge[NCHANNELS];
00031 datum_t time[NCHANNELS];
00032 size_t eventNumber;
00033 };
00034 struct shmbuffer_t{
00035 unsigned long long p_read;
00036 unsigned long long p_write;
00037 event_t data[NEVENTSSHM];
00038 };
00039
00040
00041
00042
00043 #endif
00044