00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <stdarg.h>
00012 #include <vector>
00013 #include "cheetah/peakfinders.h"
00014
00015
00016 #ifndef CHEETAHEVENT_H
00017 #define CHEETAHEVENT_H
00018
00019
00020
00021
00022
00023
00024
00025
00026 class cEventData {
00027
00028 public:
00029
00030 cGlobal *pGlobal;
00031 int busy;
00032 long threadNum;
00033 long frameNumber;
00034 long frameNumberIncludingSkipped;
00035 long frameNum;
00036 uint stackSlice;
00037 bool writeFlag;
00038
00039
00040 cPixelDetectorEvent detector[MAX_DETECTORS];
00041
00042
00043 float epicsPvFloatValues[MAX_EPICS_PVS];
00044
00045
00046 cTOFDetectorEvent tofDetector[MAX_TOF_DETECTORS];
00047 int TOFPresent;
00048
00049
00050 int pulnixFail;
00051 int pulnixWidth, pulnixHeight;
00052 unsigned short *pulnixImage;
00053
00054
00055 int specFail;
00056 int specWidth, specHeight;
00057 unsigned short *specImage;
00058
00059
00060 int energySpectrumExist;
00061 double *energySpectrum1D;
00062
00063
00064 int FEEspec_present;
00065 uint32_t *FEEspec_hproj;
00066 uint32_t *FEEspec_vproj;
00067 long FEEspec_hproj_size;
00068 long FEEspec_vproj_size;
00069
00070
00071
00072
00073 int hit;
00074 int powderClass;
00075
00076
00077
00078 int nProtons;
00079
00080
00081 tPeakList peaklist;
00082
00083
00084
00085 int nPeaks;
00086 int nHot;
00087 float peakResolution;
00088 float peakResolutionA;
00089 float peakDensity;
00090 float peakNpix;
00091 float peakTotal;
00092
00093
00094
00095
00096 int seconds;
00097 int nanoSeconds;
00098 unsigned fiducial;
00099 char timeString[1024];
00100 char eventname[1024];
00101 char eventStamp[1024];
00102 char eventSubdir[1024];
00103
00104 bool beamOn;
00105 unsigned runNumber;
00106
00107 double photonEnergyeV;
00108 double wavelengthA;
00109
00110 double gmd;
00111 double gmd1;
00112 double gmd2;
00113 double gmd11;
00114 double gmd12;
00115 double gmd21;
00116 double gmd22;
00117
00118 int pumpLaserOn;
00119 int pumpLaserCode;
00120 double pumpLaserDelay;
00121
00122
00123 double samplePos[3];
00124
00125
00126 double sampleVoltage[1];
00127
00128 double fEbeamCharge;
00129 double fEbeamL3Energy;
00130 double fEbeamLTUPosX;
00131 double fEbeamLTUPosY;
00132 double fEbeamLTUAngX;
00133 double fEbeamLTUAngY;
00134 double fEbeamPkCurrBC2;
00135
00136 double phaseCavityTime1;
00137 double phaseCavityTime2;
00138 double phaseCavityCharge1;
00139 double phaseCavityCharge2;
00140
00141
00142 int threadID;
00143 int useThreads;
00144
00145 } ;
00146
00147 #define ERROR(...) cheetahError(__FILE__, __LINE__, __VA_ARGS__)
00148
00149 #define DEBUGL1_ONLY if(global->debugLevel >= 1)
00150 #define DEBUGL2_ONLY if(global->debugLevel >= 2)
00151
00152 #define DEBUG1(...) if(global->debugLevel >= 1) cheetahDebug(__FILE__, __LINE__, __VA_ARGS__)
00153 #define DEBUG2(...) if(global->debugLevel >= 2) cheetahDebug(__FILE__, __LINE__, __VA_ARGS__)
00154 #define DEBUG3(...) if(global->debugLevel >= 3) cheetahDebug(__FILE__, __LINE__, __VA_ARGS__)
00155
00156 #define DEBUG(...) cheetahDebug(__FILE__, __LINE__, __VA_ARGS__)
00157
00158 void cheetahError(const char *filename, int line, const char *format, ...);
00159 void cheetahDebug(const char *filename, int line, const char *format, ...);
00160
00161 #define STATUS(...) fprintf(stderr, __VA_ARGS__)
00162 #define INFO(...) fprintf(stdout, __VA_ARGS__)
00163
00164 #endif
00165