Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SCALERSRAW_H
00009 #define SCALERSRAW_H
00010
00011 #include <ostream>
00012 #include <vector>
00013
00021 #pragma pack(push)
00022 #pragma pack(4)
00023
00026
00027 class ScalersRaw
00028 {
00029 public:
00030 enum
00031 {
00032 N_L1_TRIGGERS_v1 = 128,
00033 N_L1_TEST_TRIGGERS_v1 = 64,
00034 N_LUMI_OCC_v1 = 2,
00035 N_BX_v2 = 4,
00036 N_BX_v6 = 8,
00037 N_SPARE_v5 = 3,
00038 I_SPARE_PILEUP_v7 = 0,
00039 I_SPARE_PILEUPRMS_v7 = 1,
00040 I_SPARE_BUNCHLUMI_v8 = 2,
00041 I_SPARE_SPARE_v8 = 3,
00042 SCALERS_FED_ID = 735
00043 };
00044 };
00045
00046 struct TriggerScalersRaw_v1
00047 {
00048 unsigned int collectionTimeSpecial_sec;
00049 unsigned int collectionTimeSpecial_nsec;
00050 unsigned int ORBIT_NUMBER;
00051 unsigned int LUMINOSITY_SEGMENT;
00052 unsigned short BC_ERRORS;
00053
00054 unsigned int collectionTimeSummary_sec;
00055 unsigned int collectionTimeSummary_nsec;
00056 unsigned int TRIGGER_NR;
00057 unsigned int EVENT_NR;
00058 unsigned int FINOR_DISTRIBUTED;
00059 unsigned int CAL_TRIGGER;
00060 unsigned int RANDOM_TRIGGER;
00061 unsigned int TEST_TRIGGER;
00062 unsigned int FINOR_GENERATED;
00063 unsigned int FINOR_IN_INVALID_BC;
00064 unsigned long long DEADTIME;
00065 unsigned long long LOST_FINOR;
00066 unsigned long long DEADTIMEA;
00067 unsigned long long LOST_FINORA;
00068 unsigned long long PRIV_DEADTIMEA;
00069 unsigned long long PTCSTATUS_DEADTIMEA;
00070 unsigned long long THROTTLE_DEADTIMEA;
00071 unsigned long long CALIBRATION_DEADTIMEA;
00072 unsigned long long TIMESLOT_DEADTIMEA;
00073 unsigned int NR_OF_RESETS;
00074
00075 unsigned int collectionTimeDetails_sec;
00076 unsigned int collectionTimeDetails_nsec;
00077 unsigned int ALGO_RATE[ScalersRaw::N_L1_TRIGGERS_v1];
00078 unsigned int TEST_RATE[ScalersRaw::N_L1_TEST_TRIGGERS_v1];
00079 };
00080
00081 struct TriggerScalersRaw_v3
00082 {
00083 unsigned int collectionTime_sec;
00084 unsigned int collectionTime_nsec;
00085 unsigned int lumiSegmentNr;
00086 unsigned int lumiSegmentOrbits;
00087 unsigned int orbitNr;
00088 unsigned int gtResets;
00089 unsigned int bunchCrossingErrors;
00090 unsigned long long gtTriggers;
00091 unsigned long long gtEvents;
00092 float gtTriggersRate;
00093 float gtEventsRate;
00094 int prescaleIndexAlgo;
00095 int prescaleIndexTech;
00096
00097 unsigned int collectionTimeLumiSeg_sec;
00098 unsigned int collectionTimeLumiSeg_nsec;
00099 unsigned int lumiSegmentNrLumiSeg;
00100 unsigned long long triggersPhysicsGeneratedFDL;
00101 unsigned long long triggersPhysicsLost;
00102 unsigned long long triggersPhysicsLostBeamActive;
00103 unsigned long long triggersPhysicsLostBeamInactive;
00104 unsigned long long l1AsPhysics;
00105 unsigned long long l1AsRandom;
00106 unsigned long long l1AsTest;
00107 unsigned long long l1AsCalibration;
00108 unsigned long long deadtime;
00109 unsigned long long deadtimeBeamActive;
00110 unsigned long long deadtimeBeamActiveTriggerRules;
00111 unsigned long long deadtimeBeamActiveCalibration;
00112 unsigned long long deadtimeBeamActivePrivateOrbit;
00113 unsigned long long deadtimeBeamActivePartitionController;
00114 unsigned long long deadtimeBeamActiveTimeSlot;
00115
00116 unsigned int gtAlgoCounts[ScalersRaw::N_L1_TRIGGERS_v1];
00117 unsigned int gtTechCounts[ScalersRaw::N_L1_TEST_TRIGGERS_v1];
00118 };
00119
00120 struct LumiScalersRaw_v1
00121 {
00122 unsigned int collectionTime_sec;
00123 unsigned int collectionTime_nsec;
00124 float DeadtimeNormalization;
00125 float Normalization;
00126
00127 float LumiFill;
00128 float LumiRun;
00129 float LiveLumiFill;
00130 float LiveLumiRun;
00131 float InstantLumi;
00132 float InstantLumiErr;
00133 unsigned char InstantLumiQlty;
00134
00135 float LumiETFill;
00136 float LumiETRun;
00137 float LiveLumiETFill;
00138 float LiveLumiETRun;
00139 float InstantETLumi;
00140 float InstantETLumiErr;
00141 unsigned char InstantETLumiQlty;
00142
00143 float LumiOccFill[ScalersRaw::N_LUMI_OCC_v1];
00144 float LumiOccRun[ScalersRaw::N_LUMI_OCC_v1];
00145 float LiveLumiOccFill[ScalersRaw::N_LUMI_OCC_v1];
00146 float LiveLumiOccRun[ScalersRaw::N_LUMI_OCC_v1];
00147 float InstantOccLumi[ScalersRaw::N_LUMI_OCC_v1];
00148 float InstantOccLumiErr[ScalersRaw::N_LUMI_OCC_v1];
00149 unsigned char InstantOccLumiQlty[ScalersRaw::N_LUMI_OCC_v1];
00150 float lumiNoise[ScalersRaw::N_LUMI_OCC_v1];
00151
00152 unsigned int sectionNumber;
00153 unsigned int startOrbit;
00154 unsigned int numOrbits;
00155 };
00156
00157 struct BeamSpotOnlineRaw_v4
00158 {
00159 unsigned int collectionTime_sec;
00160 unsigned int collectionTime_nsec;
00161 float x;
00162 float y;
00163 float z;
00164 float dxdz;
00165 float dydz;
00166 float err_x;
00167 float err_y;
00168 float err_z;
00169 float err_dxdz;
00170 float err_dydz;
00171 float width_x;
00172 float width_y;
00173 float sigma_z;
00174 float err_width_x;
00175 float err_width_y;
00176 float err_sigma_z;
00177 };
00178
00179 struct DcsStatusRaw_v4
00180 {
00181 unsigned int collectionTime_sec;
00182 unsigned int collectionTime_nsec;
00183 unsigned int ready;
00184 float magnetCurrent;
00185 float magnetTemperature;
00186 };
00187
00188 struct ScalersEventRecordRaw_v1
00189 {
00190 unsigned long long header;
00191 int version;
00192 struct TriggerScalersRaw_v1 trig;
00193 struct LumiScalersRaw_v1 lumi;
00194 unsigned int filler;
00195 unsigned long long trailer;
00196 };
00197
00198 struct ScalersEventRecordRaw_v2
00199 {
00200 unsigned long long header;
00201 int version;
00202 struct TriggerScalersRaw_v1 trig;
00203 struct LumiScalersRaw_v1 lumi;
00204 unsigned int filler;
00205 unsigned long long bx[ScalersRaw::N_BX_v2];
00206 unsigned long long trailer;
00207 };
00208
00209 struct ScalersEventRecordRaw_v3
00210 {
00211 unsigned long long header;
00212 int version;
00213 struct TriggerScalersRaw_v3 trig;
00214 struct LumiScalersRaw_v1 lumi;
00215 unsigned int filler;
00216 unsigned long long bx[ScalersRaw::N_BX_v2];
00217 unsigned long long trailer;
00218 };
00219
00220 struct ScalersEventRecordRaw_v4
00221 {
00222 unsigned long long header;
00223 int version;
00224 struct TriggerScalersRaw_v3 trig;
00225 struct LumiScalersRaw_v1 lumi;
00226 struct BeamSpotOnlineRaw_v4 beamSpotOnline;
00227 struct DcsStatusRaw_v4 dcsStatus;
00228 unsigned long long bx[ScalersRaw::N_BX_v2];
00229 unsigned long long trailer;
00230 };
00231
00232
00233 struct ScalersEventRecordRaw_v5
00234 {
00235 unsigned long long header;
00236 int version;
00237 struct TriggerScalersRaw_v3 trig;
00238 struct LumiScalersRaw_v1 lumi;
00239 struct BeamSpotOnlineRaw_v4 beamSpotOnline;
00240 struct DcsStatusRaw_v4 dcsStatus;
00241 unsigned int lastOrbitCounter0;
00242 unsigned int lastTestEnable;
00243 unsigned int lastResync;
00244 unsigned int lastStart;
00245 unsigned int lastEventCounter0;
00246 unsigned int lastHardReset;
00247 unsigned long long spare[ScalersRaw::N_SPARE_v5];
00248 unsigned long long bx[ScalersRaw::N_BX_v2];
00249 unsigned long long trailer;
00250 };
00251
00252 struct ScalersEventRecordRaw_v6
00253 {
00254 unsigned long long header;
00255 int version;
00256 struct TriggerScalersRaw_v3 trig;
00257 struct LumiScalersRaw_v1 lumi;
00258 struct BeamSpotOnlineRaw_v4 beamSpotOnline;
00259 struct DcsStatusRaw_v4 dcsStatus;
00260 unsigned int lastOrbitCounter0;
00261 unsigned int lastTestEnable;
00262 unsigned int lastResync;
00263 unsigned int lastStart;
00264 unsigned int lastEventCounter0;
00265 unsigned int lastHardReset;
00266 unsigned long long spare[ScalersRaw::N_SPARE_v5];
00267 unsigned long long bx[ScalersRaw::N_BX_v6];
00268 unsigned long long trailer;
00269 };
00270
00271 #pragma pack(pop)
00272
00273 #endif