DQMCorrelationClient

MEPSet

OutputMEPSet

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
#ifndef DQMCORRELATIONCLIENT_H
#define DQMCORRELATIONCLIENT_H

//Framework
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/Registry.h"

//DQM
#include "DQMServices/Core/interface/DQMEDHarvester.h"
#include "DQMServices/Core/interface/DQMStore.h"

struct MEPSet {
  std::string name;
  std::string folder;
  bool profileX;
};

struct OutputMEPSet {
  std::string name;
  std::string folder;
  bool doXaxis;
  int nbinsX;
  double xminX;
  double xmaxX;
  bool doYaxis;
  int nbinsY;
  double xminY;
  double xmaxY;
};

class DQMCorrelationClient : public DQMEDHarvester {
public:
  DQMCorrelationClient(const edm::ParameterSet& ps);
  ~DQMCorrelationClient() override = default;
  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
  static void fillMePSetDescription(edm::ParameterSetDescription& pset);
  static void fillOutputMePSetDescription(edm::ParameterSetDescription& pset);

protected:
  void beginJob() override;
  void dqmEndLuminosityBlock(DQMStore::IBooker&,
                             DQMStore::IGetter&,
                             edm::LuminosityBlock const&,
                             edm::EventSetup const&) override;      //performed in the endLumi
  void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;  //performed in the endJob

private:
  static MEPSet getHistoPSet(edm::ParameterSet pset);
  static OutputMEPSet getOutputHistoPSet(edm::ParameterSet pset);

  TH1* getTH1(MonitorElement* me, bool profileX);
  void setAxisTitle(MonitorElement* meX, MonitorElement* meY);

  //private variables

  //variables from config file
  bool me1onX_;

  // Histograms
  MonitorElement* correlation_;

  MEPSet meXpset_;
  MEPSet meYpset_;
  OutputMEPSet mepset_;
};

#endif  // DQMCORRELATIONCLIENT_H