CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/DQMOffline/L1Trigger/src/L1ExtraRecoDQM.cc

Go to the documentation of this file.
00001 
00017 // this class header
00018 #include "DQMOffline/L1Trigger/interface/L1ExtraRecoDQM.h"
00019 
00020 // system include files
00021 #include <iostream>
00022 #include <iomanip>
00023 #include <memory>
00024 #include <string>
00025 
00026 // user include files
00027 #include "FWCore/Framework/interface/MakerMacros.h"
00028 
00029 // constructor
00030 L1ExtraRecoDQM::L1ExtraRecoDQM(const edm::ParameterSet& paramSet) :
00031             //
00032             m_retrieveL1Extra(
00033                     paramSet.getParameter<edm::ParameterSet> (
00034                             "L1ExtraInputTags")),
00035             m_dirName(
00036                     paramSet.getUntrackedParameter("DirName",
00037                             std::string("L1T/L1ExtraRecoDQM"))),
00038             //
00039             m_nrBxInEventGmt(paramSet.getParameter<int> ("NrBxInEventGmt")),
00040             m_nrBxInEventGct(paramSet.getParameter<int> ("NrBxInEventGct")),
00041             //
00042             m_dbe(0), m_resetModule(true), m_currentRun(-99),
00043             //
00044             m_nrEvJob(0), m_nrEvRun(0)
00045 
00046 {
00047 
00048     //
00049     if ((m_nrBxInEventGmt > 0) && ((m_nrBxInEventGmt % 2) == 0)) {
00050         m_nrBxInEventGmt = m_nrBxInEventGmt - 1;
00051 
00052         edm::LogInfo("L1ExtraRecoDQM")
00053                 << "\nWARNING: Number of bunch crossing to be monitored for GMT rounded to: "
00054                 << m_nrBxInEventGmt
00055                 << "\n         The number must be an odd number!\n"
00056                 << std::endl;
00057     }
00058 
00059     if ((m_nrBxInEventGct > 0) && ((m_nrBxInEventGct % 2) == 0)) {
00060         m_nrBxInEventGct = m_nrBxInEventGct - 1;
00061 
00062         edm::LogInfo("L1ExtraRecoDQM")
00063                 << "\nWARNING: Number of bunch crossing to be monitored for GCT rounded to: "
00064                 << m_nrBxInEventGct
00065                 << "\n         The number must be an odd number!\n"
00066                 << std::endl;
00067     }
00068 
00069     m_dbe = edm::Service<DQMStore>().operator->();
00070     if (m_dbe == 0) {
00071         edm::LogInfo("L1ExtraRecoDQM") << "\n Unable to get DQMStore service.";
00072     } else {
00073 
00074         if (paramSet.getUntrackedParameter<bool> ("DQMStore", false)) {
00075             m_dbe->setVerbose(0);
00076         }
00077 
00078         m_dbe->setCurrentFolder(m_dirName);
00079 
00080     }
00081 
00082 }
00083 
00084 // destructor
00085 L1ExtraRecoDQM::~L1ExtraRecoDQM() {
00086 
00087     // empty
00088 
00089 }
00090 
00091 //
00092 void L1ExtraRecoDQM::beginJob() {
00093 
00094 }
00095 
00096 void L1ExtraRecoDQM::beginRun(const edm::Run& iRun,
00097         const edm::EventSetup& evSetup) {
00098 
00099     m_nrEvRun = 0;
00100 
00101     DQMStore* dbe = 0;
00102     dbe = edm::Service<DQMStore>().operator->();
00103 
00104     // clean up directory
00105     if (dbe) {
00106         dbe->setCurrentFolder(m_dirName);
00107         if (dbe->dirExists(m_dirName)) {
00108             dbe->rmdir(m_dirName);
00109         }
00110         dbe->setCurrentFolder(m_dirName);
00111     }
00112 
00113 }
00114 
00115 void L1ExtraRecoDQM::beginLuminosityBlock(const edm::LuminosityBlock& iLumi,
00116         const edm::EventSetup& evSetup) {
00117 
00118     //
00119 
00120 
00121 }
00122 
00123 
00124 //
00125 void L1ExtraRecoDQM::analyze(const edm::Event& iEvent,
00126         const edm::EventSetup& evSetup) {
00127 
00128     ++m_nrEvJob;
00129     ++m_nrEvRun;
00130 
00131     //
00132     m_retrieveL1Extra.retrieveL1ExtraObjects(iEvent, evSetup);
00133 
00134 }
00135 
00136 // end section
00137 void L1ExtraRecoDQM::endLuminosityBlock(const edm::LuminosityBlock& iLumi,
00138         const edm::EventSetup& evSetup) {
00139 
00140     // empty
00141 
00142 }
00143 
00144 void L1ExtraRecoDQM::endRun(const edm::Run& run, const edm::EventSetup& evSetup) {
00145 
00146     //
00147 
00148 }
00149 
00150 void L1ExtraRecoDQM::endJob() {
00151 
00152     edm::LogInfo("L1ExtraRecoDQM")
00153             << "\n\nTotal number of events analyzed in this job: " << m_nrEvJob
00154             << "\n" << std::endl;
00155 
00156     return;
00157 }
00158 
00159 //define this as a plug-in
00160 DEFINE_FWK_MODULE( L1ExtraRecoDQM);