CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DQM/HcalMonitorTasks/interface/HcalEEUSMonitor.h

Go to the documentation of this file.
00001 #ifndef GUARD_DQM_HCALMONITORTASKS_HCALEEUSMONITOR_H
00002 #define GUARD_DQM_HCALMONITORTASKS_HCALEEUSMONITOR_H
00003 
00004 #define  NUMSPIGS 15
00005 #define  NUMFEDS  32
00006 #define  NUMCHANS 24
00007 
00008 
00009 #include "DQM/HcalMonitorTasks/interface/HcalBaseMonitor.h"
00010 #include "DQMServices/Core/interface/DQMStore.h"
00011 #include "DQMServices/Core/interface/MonitorElement.h"
00012 #include "EventFilter/HcalRawToDigi/interface/HcalUnpacker.h"
00013 // The following are needed for using pedestals in fC:
00014 #include "CondFormats/HcalObjects/interface/HcalPedestal.h"
00015 #include "CondFormats/HcalObjects/interface/HcalPedestalWidth.h"
00016 
00017 // Raw data stuff
00018 #include "DQM/HcalMonitorTasks/interface/HcalBaseMonitor.h"
00019 #include "EventFilter/HcalRawToDigi/interface/HcalUnpacker.h"
00020 #include "EventFilter/HcalRawToDigi/interface/HcalHTRData.h"
00021 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
00022 #include "DataFormats/FEDRawData/interface/FEDNumbering.h"
00023 #include "DataFormats/FEDRawData/interface/FEDTrailer.h"
00024 
00025 // Use for stringstream
00026 #include <iostream>
00027 #include <iomanip>
00028 #include <cmath>
00029 
00037 class HcalEEUSMonitor:  public HcalBaseMonitor {
00038  public:
00039   HcalEEUSMonitor();
00040   ~HcalEEUSMonitor();
00041 
00042   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap);
00043   void setup(const edm::ParameterSet& ps, DQMStore* dbe);
00044   void reset();
00045   void clearME();
00046 
00047   // processEvent routine -- specifies what inputs are looked at each event
00048   void processEvent(const FEDRawDataCollection& rawraw,
00049                     const HcalUnpackerReport& report,
00050                     const HcalElectronicsMap& emap
00051                     //const ZDCRecHitCollection& zdcHits
00052                     );
00053   // Check Raw Data each event
00054   void processEvent_RawData(const FEDRawDataCollection& rawraw,
00055                             const HcalUnpackerReport& report,
00056                             const HcalElectronicsMap& emap);
00057 
00058  private:
00059   
00060   int ievt_;
00061   MonitorElement* meEVT_;
00062 
00063   std::vector <int> fedUnpackList_;
00064   int firstFED_;
00065 
00066 
00067   //Jason's MEs
00068 
00069   MonitorElement* meEECorrel_;
00070   MonitorElement* meEEPerSpigot_;
00071   MonitorElement* meEEThisEvent_;
00072 
00073   //Jason's Variables
00074 
00075   bool EEthisEvent [NUMSPIGS * NUMFEDS];  //Bookkeeping: which spigots EE
00076   int numEEthisEvent;
00077   //Francesco's MEs
00078 
00079   MonitorElement* meNormFractSpigs_US0_EE0_;
00080   MonitorElement* meEEFractSpigs_US0_EE1_;
00081   MonitorElement* meUSFractSpigs_US1_EE0_;
00082   MonitorElement* meUSFractSpigs_US1_EE1_;
00083 
00084   MonitorElement* meRawDataLength2_US0_EE0_;
00085   MonitorElement* meRawDataLength2_US0_EE1_;
00086   MonitorElement* meRawDataLength2_US1_EE0_;
00087   MonitorElement* meRawDataLength2_US1_EE1_;
00088 
00089   //---------
00090   //Francesco's Variables
00091   uint64_t UScount[NUMFEDS][NUMSPIGS];
00092   uint64_t US0EE0count[NUMFEDS][NUMSPIGS];
00093   uint64_t US0EE1count[NUMFEDS][NUMSPIGS];
00094   uint64_t US1EE0count[NUMFEDS][NUMSPIGS];
00095   uint64_t US1EE1count[NUMFEDS][NUMSPIGS];
00096 
00097   //Ted's MEs
00098   //Ted's Variables
00099 
00100   //Jared's MEs
00101 
00102   MonitorElement* meNumberEETriggered_;//[NUMFEDS];
00103   MonitorElement* meNumberNETriggered_;//[NUMFEDS];
00104   MonitorElement* meNumberTriggered_;//[NUMFEDS];
00105 
00106   //Jared's Variables
00107   uint32_t consecutiveEETriggers[NUMFEDS][NUMSPIGS];
00108   uint32_t consecutiveNETriggers[NUMFEDS][NUMSPIGS];
00109   uint32_t consecutiveTriggers[NUMFEDS][NUMSPIGS];
00110   int dccOrN;
00111   int prevOrN;
00112   int prevWasEE[NUMFEDS][NUMSPIGS];
00113 }; // class HcalEEUSMonitor
00114 
00115 #endif