HLTExoticaValidator

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
#ifndef HLTriggerOffline_Exotica_HLTExoticaValidator_H
#define HLTriggerOffline_Exotica_HLTExoticaValidator_H

/** \class HLTExoticaValidator
 *  Generate histograms for trigger efficiencies Exotica related
 *  Documentation available on the CMS TWiki:
 *  https://twiki.cern.ch/twiki/bin/view/CMS/EXOTICATriggerValidation
 *
 *  \author  Thiago R. Fernandez Perez Tomei
 *           Based and adapted from:
 *           J. Duarte Campderros code from HLTriggerOffline/Higgs and
 *           J. Klukas, M. Vander Donckt and J. Alcaraz code
 *           from the HLTriggerOffline/Muon package.
 */

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "HLTriggerOffline/Exotica/interface/HLTExoticaSubAnalysis.h"

#include <cstring>
#include <vector>

struct EVTColContainer;

/// The HLTExoticaValidator module is the main module of the
/// package. It books a vector of auxiliary classes
/// (HLTExoticaSubAnalysis), where each of those takes care
/// of one single analysis. Each of those, in turn, books a
/// vector if HLTExoticaPlotters to make plots for each
/// HLT path
class HLTExoticaValidator : public DQMOneEDAnalyzer<> {
public:
  /// Constructor and destructor
  HLTExoticaValidator(const edm::ParameterSet &);
  ~HLTExoticaValidator() override;

protected:
  /// Method called by the framework to book histograms.
  void bookHistograms(DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup) override;

private:
  void beginJob() override;
  /// Method called by the framework just before dqmBeginRun()
  void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override;
  /// Method called for each event.
  void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override;
  void dqmEndRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override;
  void endJob() override;

  /// Copy (to be modified) of the input ParameterSet from configuration file.
  edm::ParameterSet _pset;
  /// The names of the subanalyses
  std::vector<std::string> _analysisnames;

  /// The instances of the class which do the real work
  std::vector<HLTExoticaSubAnalysis> _analyzers;

  /// Centralized point of access to all collections used
  EVTColContainer *_collections;
};

#endif