CMS 3D CMS Logo

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