Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:43:48

0001 // -*- C++ -*-
0002 //
0003 // Package:    LogMessageMonitor
0004 // Class:      LogMessageMonitor
0005 //
0006 /**\class LogMessageMonitor LogMessageMonitor.cc DQM/LogMonitor/src/LogMessageMonitor.cc
0007 
0008  Description: [one line class summary]
0009 
0010  Implementation:
0011      [Notes on implementation]
0012 */
0013 //
0014 // Original Author:  Mia Tosi,40 3-B32,+41227671609,
0015 //         Created:  Thu Mar  8 14:34:13 CET 2012
0016 //
0017 //
0018 
0019 // system include files
0020 #include <memory>
0021 
0022 // user include files
0023 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0024 #include "FWCore/Utilities/interface/EDGetToken.h"
0025 #include "FWCore/Framework/interface/ConsumesCollector.h"
0026 #include "FWCore/Framework/interface/Frameworkfwd.h"
0027 
0028 #include "FWCore/Framework/interface/Event.h"
0029 #include "FWCore/Framework/interface/EventSetup.h"
0030 #include "FWCore/Framework/interface/MakerMacros.h"
0031 
0032 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0033 
0034 #include "DataFormats/Common/interface/ErrorSummaryEntry.h"
0035 
0036 #include <vector>
0037 #include <string>
0038 #include <map>
0039 
0040 class GenericTriggerEventFlag;
0041 
0042 class GetLumi;
0043 
0044 //
0045 // class declaration
0046 //
0047 
0048 class LogMessageMonitor : public DQMOneEDAnalyzer<> {
0049 public:
0050   explicit LogMessageMonitor(const edm::ParameterSet&);
0051   ~LogMessageMonitor() override;
0052 
0053   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0054 
0055 private:
0056   //      virtual void beginJob() ;
0057   void analyze(const edm::Event&, const edm::EventSetup&) override;
0058   void endJob() override;
0059 
0060   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0061 
0062   // ----------member data ---------------------------
0063   edm::EDGetTokenT<std::vector<edm::ErrorSummaryEntry> > errorToken_;
0064 
0065   std::string histname;  //for naming the histograms according to algorithm used
0066 
0067   DQMStore* dqmStore_;
0068   edm::ParameterSet conf_;
0069 
0070   std::map<std::string, int> modulesMap;
0071 
0072   // from parameters
0073   std::string pluginsMonName_;
0074   std::vector<std::string> modules_vector_;
0075   std::vector<std::string> categories_vector_;
0076 
0077   GetLumi* lumiDetails_;
0078   GenericTriggerEventFlag* genTriggerEventFlag_;
0079 
0080   // MEs
0081   std::vector<MonitorElement*> ModulesErrorsVsBXlumi;
0082   std::vector<MonitorElement*> ModulesWarningsVsBXlumi;
0083 
0084   MonitorElement* CategoriesVsModules;
0085 
0086   bool doWarningsPlots_;
0087   bool doPUmonitoring_;
0088 };