ARA ROOT v3.3 Software

AraEvent/araIcrrStructures.h

Go to the documentation of this file.
00001 
00013 #ifndef ARA_STRUCTURES_H
00014 #define ARA_STRUCTURES_H
00015 #include "araIcrrDefines.h"
00016 
00017 #define ARA_STRUCTURES_VERSION 1
00018 
00019 //Enumerations
00020 
00022 //Structures
00024 
00026 
00032 typedef struct {
00033     unsigned short numBytes;
00034     unsigned char verId;
00035   //    unsigned int checksum;
00036 } IcrrGenericHeader_t;
00037 
00039 
00043 typedef struct {
00045 
00052   unsigned char trigType;     
00053   unsigned short ppsNum;      
00054   unsigned short deadTime1;   
00055   unsigned short deadTime2;   
00056   unsigned short trigPattern; // trigger pattern: bits 0-8 - facet triggers | bit 9 - deep L1 | bit 10 - shallow L1 | bit 11 - unused | bit 12 - global trigger
00057   unsigned short rovdd[3];    // [0] - LSW of Rb clock counter | [1] - MSW of Rb clock counter | [2] - DAC voltage for LAB C
00058   unsigned short rcoCount[3]; // RCO counter for LAB chips
00059 } IcrrTriggerMonitorStruct_t;
00060 
00062 
00066 typedef struct {
00068 
00071     unsigned char chanId;   // chan+9*LAB3
00073 
00079     unsigned char chipIdFlag; // Bits 0,1 chipNum; Bit 3 hitBus wrap; 4-7 hitBusOff
00081 
00085     unsigned char firstHitbus; // If wrappedHitbus=0 data runs, lastHitbus+1
00087 
00091     unsigned char lastHitbus; //to firstHitbus-1 inclusive
00092 
00093 } AraRawIcrrRFChannelHeader_t;
00094 
00096 
00099 typedef struct {
00100     AraRawIcrrRFChannelHeader_t header;
00101     unsigned short data[MAX_NUMBER_SAMPLES_LAB3];
00102 } IcrrRFChannelFull_t;
00103 
00105 
00108 typedef struct {
00109     AraRawIcrrRFChannelHeader_t header;
00110     short xMax;
00111     short xMin;
00112     float mean; 
00113     float rms; 
00114     short data[MAX_NUMBER_SAMPLES_LAB3]; 
00115 } IcrrRFChannelPedSubbed_t;
00116 
00118 
00121 typedef struct {
00122   unsigned short temp[8]; 
00123 } IcrrTemperatureDataStruct_t;
00124 
00126 
00129 typedef struct {
00130   unsigned short discone[8]; 
00131   unsigned short batwing[8]; 
00132 } IcrrRFPowerDataStruct_t;
00133 
00135 
00138 typedef struct {
00139   unsigned short dac[6][4]; 
00140 } IcrrDACDataStruct_t;
00141 
00143 
00146 typedef struct {    
00147   unsigned short discone[8];
00148   unsigned short batPlus[8];
00149   unsigned short batMinus[8];
00150   unsigned short trigL1[12];
00151   unsigned short global;
00152 } IcrrSimpleScalerStruct_t;
00153 
00154 
00155 
00157 
00160 typedef struct {
00161     unsigned char chanId;   
00162     unsigned short chipEntries;
00163     float pedMean[MAX_NUMBER_SAMPLES_LAB3];
00164     float pedRMS[MAX_NUMBER_SAMPLES_LAB3]; 
00165 } LabChipChannelPedStruct_t;
00166 
00167 
00168 
00170 
00174 typedef struct {
00175   unsigned int unixTime;       
00176   unsigned int unixTimeUs;     
00177 
00179 
00185   int gpsSubTime;    
00186   unsigned int eventNumber;    
00187   unsigned short calibStatus;   
00188   unsigned char priority; 
00189 
00190 
00199   unsigned char errorFlag; 
00200   //unsigned char surfSlipFlag; ///< Sync Slip between SURF 2-9 and SURF 1
00201   
00202 } IcrrEventHeader_t;
00203 
00204 
00205 
00206 
00208 
00211 typedef struct {    
00212   IcrrTemperatureDataStruct_t temp;
00213   IcrrRFPowerDataStruct_t rfPow;
00214   IcrrDACDataStruct_t dac;
00215   IcrrSimpleScalerStruct_t scaler;
00216 } IcrrHkDataStruct_t;
00217 
00218 typedef struct {
00219   unsigned int unixTime;
00220   unsigned int unixTimeUs;
00221   unsigned int eventNumber;
00222   unsigned int errorFlag;
00223 } IcrrHkDataHeader_t;
00224 
00226 
00229 typedef struct {
00230     IcrrGenericHeader_t gHdr;
00231     unsigned int unixTimeStart;
00232     unsigned int unixTimeEnd;
00233     LabChipChannelPedStruct_t chan[NUM_DIGITIZED_ICRR_CHANNELS];
00234 } FullLabChipPedStruct_t;
00235 
00236 
00238 // On-board structs
00240 
00242 
00245 typedef struct {
00246   IcrrGenericHeader_t gHdr;
00247   IcrrEventHeader_t hd;
00248   //  unsigned int eventNumber;    /* Global event number */
00249   IcrrRFChannelFull_t channel[NUM_DIGITIZED_ICRR_CHANNELS];
00250   IcrrTriggerMonitorStruct_t trig;
00251   IcrrHkDataStruct_t hk;
00252 } IcrrEventBody_t;
00253 
00255 
00259 typedef struct {
00260   IcrrGenericHeader_t gHdr;
00261   IcrrHkDataHeader_t hd;
00262   IcrrTriggerMonitorStruct_t trig;
00263   IcrrHkDataStruct_t hk;
00264 } IcrrHkBody_t;
00265 
00266 
00268 
00271 typedef struct {
00272   IcrrGenericHeader_t gHdr;
00273   unsigned int eventNumber;    /* Global event number */
00274   unsigned int whichPeds; 
00275   IcrrRFChannelPedSubbed_t channel[NUM_DIGITIZED_ICRR_CHANNELS];
00276   IcrrHkDataStruct_t hk;
00277 } IcrrPedSubbedEventBody_t;
00278 
00279 
00280 //This stuff is just for legacy will be deprecated
00281 //typedef struct IcrrRFChannelFull_t  RFChannelFull_t;
00282 //typedef struct IcrrRFChannelPedSubbed_t RFChannelPedSubbed_t;
00283 //typedef struct IcrrTemperatureDataStruct_t TemperatureDataStruct_t;
00284 //typedef struct IcrrRFPowerDataStruct_t RFPowerDataStruct_t;
00285 //typedef struct IcrrDACDataStruct_t DACDataStruct_t;
00286 //typedef struct IcrrSimpleScalerStruct_t  SimpleScalerStruct_t;
00287 typedef IcrrEventHeader_t AraEventHeader_t;
00288 typedef IcrrEventBody_t AraEventBody_t;
00289 typedef IcrrHkBody_t AraHkBody_t;
00290 //typedef struct IcrrPedSubbedEventBody_t PedSubbedEventBody_t;
00291 
00292 
00293 
00294 #endif /* ARA_STRUCTURES_H */

Generated on Tue Sep 11 19:51:09 2012 for ARA ROOT v3.3 Software by doxygen 1.4.7