CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DataFormats/Scalers/interface/ScalersRaw.h

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