CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DQM/L1TMonitor/interface/L1TGT.h

Go to the documentation of this file.
00001 #ifndef L1TGT_H
00002 #define L1TGT_H
00003 
00018 // system include files
00019 #include <memory>
00020 #include <unistd.h>
00021 #include <vector>
00022 #include <utility>
00023 
00024 // user include files
00025 #include "FWCore/Framework/interface/Frameworkfwd.h"
00026 #include "FWCore/Framework/interface/EDAnalyzer.h"
00027 
00028 #include "FWCore/Framework/interface/Event.h"
00029 #include "FWCore/Framework/interface/MakerMacros.h"
00030 
00031 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00032 
00033 #include "DQMServices/Core/interface/DQMStore.h"
00034 #include "DQMServices/Core/interface/MonitorElement.h"
00035 #include "FWCore/ServiceRegistry/interface/Service.h"
00036 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00037 
00038 //
00039 // class declaration
00040 //
00041 
00042 class L1TGT: public edm::EDAnalyzer {
00043 
00044 public:
00045 
00046     // constructor
00047     L1TGT(const edm::ParameterSet& ps);
00048 
00049     // destructor
00050     virtual ~L1TGT();
00051 
00052 private:
00053 
00054     virtual void beginJob();
00055     virtual void beginRun(const edm::Run&, const edm::EventSetup&);
00056     virtual void beginLuminosityBlock(const edm::LuminosityBlock&,
00057             const edm::EventSetup&);
00058 
00059     virtual void analyze(const edm::Event&, const edm::EventSetup&);
00060 
00062     virtual void endLuminosityBlock(const edm::LuminosityBlock&,
00063             const edm::EventSetup&);
00064     virtual void endRun(const edm::Run&, const edm::EventSetup&);
00065 
00066     virtual void endJob();
00067 
00068 private:
00069 
00071     void bookHistograms();
00072 
00073     bool isActive(int word, int bit);
00074     // Active boards DAQ record bit number:
00075     // 0 FDL
00076     // 1 PSB_0 9 Techn.Triggers for FDL
00077     // 2 PSB_1 13 Calo data for GTL
00078     // 3 PSB_2 14 Calo data for GTL
00079     // 4 PSB_3 15 Calo data for GTL
00080     // 5 PSB_4 19 M/Q bits for GMT
00081     // 6 PSB_5 20 M/Q bits for GMT
00082     // 7 PSB_6 21 M/Q bits for GMT
00083     // 8 GMT
00084     enum activeDAQ {
00085         FDL = 0, PSB9, PSB13, PSB14, PSB15, PSB19, PSB20, PSB21, GMT
00086     };
00087     // Active boards EVM record bit number:
00088     // 0 TCS
00089     // 1 FDL
00090     enum activeEVM {
00091         TCS, FDLEVM
00092     };
00093 
00094 private:
00095 
00097 
00099     edm::InputTag gtSource_;
00100 
00102     edm::InputTag gtEvmSource_;
00103 
00105     bool verbose_;
00106 
00108     std::string outputFile_;
00109 
00110 private:
00111 
00112     MonitorElement* algo_bits;
00113     MonitorElement* algo_bits_corr;
00114     MonitorElement* tt_bits;
00115     MonitorElement* tt_bits_corr;
00116     MonitorElement* algo_tt_bits_corr;
00117     MonitorElement* algo_bits_lumi;
00118     MonitorElement* tt_bits_lumi;
00119     MonitorElement* event_type;
00120 
00121     MonitorElement* event_number;
00122     MonitorElement* event_lumi;
00123     MonitorElement* trigger_number;
00124     MonitorElement* trigger_lumi;
00125     MonitorElement* evnum_trignum_lumi;
00126     MonitorElement* orbit_lumi;
00127     MonitorElement* setupversion_lumi;
00128 
00129     MonitorElement* gtfe_bx;
00130     MonitorElement* dbx_module;
00131 
00132     MonitorElement* BST_MasterStatus;
00133     MonitorElement* BST_turnCountNumber;
00134     MonitorElement* BST_lhcFillNumber;
00135     MonitorElement* BST_beamMode;
00136     MonitorElement* BST_beamMomentum;
00137     MonitorElement* BST_intensityBeam1;
00138     MonitorElement* BST_intensityBeam2;
00139     MonitorElement* gpsfreq;
00140     MonitorElement* gpsfreqwide;
00141     MonitorElement* gpsfreqlum;
00142 
00143     MonitorElement* m_monL1PrescaleFactorSet;
00144     MonitorElement* m_monL1PfIndicesPerLs;
00145 
00146     MonitorElement* m_monOrbitNrDiffTcsFdlEvm;
00147     MonitorElement* m_monLsNrDiffTcsFdlEvm;
00148     // maximum difference in orbit number, luminosity number
00149     // histogram range: -(MaxOrbitNrDiffTcsFdlEvm+1), (MaxOrbitNrDiffTcsFdlEvm+1)
00150     //   if value is greater than the maximum difference, fill an entry in the last but one bin
00151     //   if value is smaller than the negative value of maximum difference, fill an entry
00152     //     in the second bin
00153     //   if no value can be retrieved for TCS, fill an entry in the first bin
00154     //   if no value can be retrieved for FDL, fill an entry in the last bin
00155     static const int MaxOrbitNrDiffTcsFdlEvm;
00156     static const int MaxLsNrDiffTcsFdlEvm;
00157 
00158     MonitorElement* m_monOrbitNrDiffTcsFdlEvmLs;
00159     MonitorElement* m_monLsNrDiffTcsFdlEvmLs;
00160 
00161     //MonitorElement* m_monDiffEvmDaqFdl;
00162 
00163 private:
00164 
00166 
00167     DQMStore* m_dbe;
00168 
00170     int m_nrEvJob;
00171     int m_nrEvRun;
00172 
00174     std::string m_histFolder;
00175 
00176     boost::uint64_t preGps_;
00177     boost::uint64_t preOrb_;
00178 
00180     int m_previousLS;
00181     int m_previousPfIndex;
00182 
00183     std::vector<std::pair<int,int> > m_pairLsNumberPfIndex;
00184     typedef std::vector<std::pair<int, int> >::const_iterator CItVecPair;
00185 
00186 
00187 };
00188 
00189 #endif