Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:36

0001 #ifndef DQMCORRELATIONCLIENT_H
0002 #define DQMCORRELATIONCLIENT_H
0003 
0004 //Framework
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 #include "FWCore/Utilities/interface/InputTag.h"
0007 #include "FWCore/ServiceRegistry/interface/Service.h"
0008 
0009 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0010 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0011 #include "FWCore/ParameterSet/interface/Registry.h"
0012 
0013 //DQM
0014 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0015 #include "DQMServices/Core/interface/DQMStore.h"
0016 
0017 struct MEPSet {
0018   std::string name;
0019   std::string folder;
0020   bool profileX;
0021 };
0022 
0023 struct OutputMEPSet {
0024   std::string name;
0025   std::string folder;
0026   bool doXaxis;
0027   int nbinsX;
0028   double xminX;
0029   double xmaxX;
0030   bool doYaxis;
0031   int nbinsY;
0032   double xminY;
0033   double xmaxY;
0034 };
0035 
0036 class DQMCorrelationClient : public DQMEDHarvester {
0037 public:
0038   DQMCorrelationClient(const edm::ParameterSet& ps);
0039   ~DQMCorrelationClient() override = default;
0040   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0041   static void fillMePSetDescription(edm::ParameterSetDescription& pset);
0042   static void fillOutputMePSetDescription(edm::ParameterSetDescription& pset);
0043 
0044 protected:
0045   void beginJob() override;
0046   void dqmEndLuminosityBlock(DQMStore::IBooker&,
0047                              DQMStore::IGetter&,
0048                              edm::LuminosityBlock const&,
0049                              edm::EventSetup const&) override;      //performed in the endLumi
0050   void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;  //performed in the endJob
0051 
0052 private:
0053   static MEPSet getHistoPSet(edm::ParameterSet pset);
0054   static OutputMEPSet getOutputHistoPSet(edm::ParameterSet pset);
0055 
0056   TH1* getTH1(MonitorElement* me, bool profileX);
0057   void setAxisTitle(MonitorElement* meX, MonitorElement* meY);
0058 
0059   //private variables
0060 
0061   //variables from config file
0062   bool me1onX_;
0063 
0064   // Histograms
0065   MonitorElement* correlation_;
0066 
0067   MEPSet meXpset_;
0068   MEPSet meYpset_;
0069   OutputMEPSet mepset_;
0070 };
0071 
0072 #endif  // DQMCORRELATIONCLIENT_H