AveragedSurfHk.h
1 
9 #ifndef AVERAGEDSURFHK_H
10 #define AVERAGEDSURFHK_H
11 
12 //Includes
13 #include <TObject.h>
14 #include "AnitaConventions.h"
15 #include "simpleStructs.h"
16 
17 
19 
23 class AveragedSurfHk: public TObject
24 {
25  public:
26  AveragedSurfHk();
27  ~AveragedSurfHk();
28 
29  AveragedSurfHk(Int_t trun, Int_t trealTime, AveragedSurfHkStruct_t *surfPtr);
30  AveragedSurfHk(Int_t trun, Int_t trealTime, AveragedSurfHkStructVer30_t *surfPtr);
31  AveragedSurfHk(Int_t trun, Int_t trealTime, AveragedSurfHkStructVer14_t *surfPtr);
32  AveragedSurfHk(Int_t trun, Int_t trealTime, AveragedSurfHkStructVer13_t *surfPtr);
33  AveragedSurfHk(Int_t trun, Int_t trealTime, AveragedSurfHkStructVer12_t *surfPtr);
34 
35  Int_t run;
36  UInt_t realTime;
37  UInt_t payloadTime;
38  UShort_t numHks;
39  UShort_t deltaT;
40  UInt_t hadError;
41  UShort_t globalThreshold;
42  UShort_t reserved;
43  UShort_t scalerGoals[3];
44  UShort_t upperWords[ACTIVE_SURFS];
45  UShort_t avgScaler[ACTIVE_SURFS][SCALERS_PER_SURF];
46  UShort_t rmsScaler[ACTIVE_SURFS][SCALERS_PER_SURF];
47  UShort_t avgL1[ACTIVE_SURFS][L1S_PER_SURF];
48  UShort_t rmsL1[ACTIVE_SURFS][L1S_PER_SURF];
49  UShort_t avgThresh[ACTIVE_SURFS][SCALERS_PER_SURF];
50  UShort_t rmsThresh[ACTIVE_SURFS][SCALERS_PER_SURF];
51 
52  UShort_t avgRFPower[ACTIVE_SURFS][RFCHAN_PER_SURF];
53  UShort_t rmsRFPower[ACTIVE_SURFS][RFCHAN_PER_SURF];
54  UShort_t surfTrigBandMask[ACTIVE_SURFS];
55  Int_t intFlag;
56 
57  Int_t isBandMasked(int surf, int scl)
58  { return (surfTrigBandMask[surf]&(1<<scl));}
59  Int_t getL1Scaler(int phi, AnitaPol::AnitaPol_t pol, AnitaRing::AnitaRing_t ring);
67  int getSurfScaler(int phi, AnitaRing::AnitaRing_t ring, AnitaTrigPol::AnitaTrigPol_t pol, Int_t &surf, Int_t &scl);
68  Int_t getScalerGoal(int surf, int scl);
69  Double_t getRFPowerInK(int surf, int chan);
70  Double_t getRMSRFPowerInK(int surf, int chan);
71  // Double_t getMeasuredRFPowerInK(int surf, int chan); ///< Returns the pseudo-calibrated RF power in K.
72  // Double_t getMeasuredRMSRFPowerInK(int surf, int chan); ///< Returns the pseudo-calibrated RF power in K.
73  ClassDef(AveragedSurfHk,40);
74 };
75 
76 
77 #endif //AVERAGEDSURFHK_H
Double_t getRMSRFPowerInK(int surf, int chan)
Returns the pseudo-calibrated RF power in K.
UShort_t rmsThresh[12][12]
The rms threhsold value per channel.
UInt_t payloadTime
Basically unixTime.
Int_t isBandMasked(int surf, int scl)
Was the given band masked off (1 is band excluded from trigger, 0 is band included) ...
UShort_t reserved
Reserved for future expansion.
Int_t getLogicalIndex(int phi, AnitaRing::AnitaRing_t ring, AnitaTrigPol::AnitaTrigPol_t pol)
Get logical index for phi-ring-pol.
UShort_t avgThresh[12][12]
The mean threshold value per channel.
Int_t getL1ScalerRMS(int phi, AnitaPol::AnitaPol_t pol, AnitaRing::AnitaRing_t ring)
Get L1 scaler for given phi-ring.
Int_t getL1Scaler(int phi, AnitaPol::AnitaPol_t pol, AnitaRing::AnitaRing_t ring)
Returns the L1 scaler value for given phi-ring-pol.
UShort_t rmsScaler[12][12]
The rms scaler value per channel.
UShort_t scalerGoals[3]
The scaler goals for the four bands.
Int_t getThreshold(int phi, AnitaRing::AnitaRing_t ring, AnitaTrigPol::AnitaTrigPol_t pol)
Get threhsold for given phi-ring-pol.
Int_t getScalerRMS(int phi, AnitaRing::AnitaRing_t ring, AnitaTrigPol::AnitaTrigPol_t pol)
Get scaler RMS for given phi-ring-pol.
AveragedSurfHk()
Default constructor.
enum AnitaRing::EAnitaRing AnitaRing_t
Ring enumeration.
UShort_t surfTrigBandMask[12]
The mask showing whcih bands were excluded from the trigger.
enum AnitaTrigPol::EAnitaTrigPol AnitaTrigPol_t
Polarisation enumeration.
Int_t getThresholdRMS(int phi, AnitaRing::AnitaRing_t ring, AnitaTrigPol::AnitaTrigPol_t pol)
Get threhsold RMS for given phi-ring-pol.
Int_t getScalerGoal(int surf, int scl)
Get scaler goal for given surf-scaler.
UInt_t hadError
Flag for errors.
Average Surf Hk – Telemetered.
UShort_t rmsRFPower[12][8]
The rms RF power value per channel.
UShort_t avgRFPower[12][8]
The mean RF power value per channel.
UShort_t rmsL1[12][6]
The rms scaler value per channel.
UShort_t numHks
Number of SURF Hk reads that are included in average.
~AveragedSurfHk()
Default destructor.
UShort_t deltaT
Time span of the averaging.
Double_t getRFPowerInK(int surf, int chan)
Returns the pseudo-calibrated RF power in K.
Int_t run
Assigned offline.
UShort_t globalThreshold
Global trheshold (if in global threshold mode)
UShort_t avgL1[12][6]
The mean scaler value per channel.
Int_t intFlag
Only used if this is interpolated data.
UShort_t upperWords[12]
The upper words – contains debugging info.
int getSurfScaler(int phi, AnitaRing::AnitaRing_t ring, AnitaTrigPol::AnitaTrigPol_t pol, Int_t &surf, Int_t &scl)
Get surf and scaler for phi-ring-pol.
Int_t getScaler(int phi, AnitaRing::AnitaRing_t ring, AnitaTrigPol::AnitaTrigPol_t pol)
Get scaler for given phi-ring-pol.
UInt_t realTime
Basically unixTime.
enum AnitaPol::EAnitaPol AnitaPol_t
Polarisation enumeration.
UShort_t avgScaler[12][12]
The mean scaler value per channel.
AveragedSurfHk – The Averaged SURF Housekeeping data.