Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:52

0001 #ifndef HLTriggerOffline_Exotica_HLTExoticaValidator_H
0002 #define HLTriggerOffline_Exotica_HLTExoticaValidator_H
0003 
0004 /** \class HLTExoticaValidator
0005  *  Generate histograms for trigger efficiencies Exotica related
0006  *  Documentation available on the CMS TWiki:
0007  *  https://twiki.cern.ch/twiki/bin/view/CMS/EXOTICATriggerValidation
0008  *
0009  *  \author  Thiago R. Fernandez Perez Tomei
0010  *           Based and adapted from:
0011  *           J. Duarte Campderros code from HLTriggerOffline/Higgs and
0012  *           J. Klukas, M. Vander Donckt and J. Alcaraz code
0013  *           from the HLTriggerOffline/Muon package.
0014  */
0015 
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/Frameworkfwd.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 
0020 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0021 #include "DQMServices/Core/interface/DQMStore.h"
0022 
0023 #include "HLTriggerOffline/Exotica/interface/HLTExoticaSubAnalysis.h"
0024 
0025 #include <cstring>
0026 #include <vector>
0027 
0028 struct EVTColContainer;
0029 
0030 /// The HLTExoticaValidator module is the main module of the
0031 /// package. It books a vector of auxiliary classes
0032 /// (HLTExoticaSubAnalysis), where each of those takes care
0033 /// of one single analysis. Each of those, in turn, books a
0034 /// vector if HLTExoticaPlotters to make plots for each
0035 /// HLT path
0036 class HLTExoticaValidator : public DQMOneEDAnalyzer<> {
0037 public:
0038   /// Constructor and destructor
0039   HLTExoticaValidator(const edm::ParameterSet &);
0040   ~HLTExoticaValidator() override;
0041 
0042 protected:
0043   /// Method called by the framework to book histograms.
0044   void bookHistograms(DQMStore::IBooker &iBooker, const edm::Run &iRun, const edm::EventSetup &iSetup) override;
0045 
0046 private:
0047   void beginJob() override;
0048   /// Method called by the framework just before dqmBeginRun()
0049   void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override;
0050   /// Method called for each event.
0051   void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override;
0052   void dqmEndRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override;
0053   void endJob() override;
0054 
0055   /// Copy (to be modified) of the input ParameterSet from configuration file.
0056   edm::ParameterSet _pset;
0057   /// The names of the subanalyses
0058   std::vector<std::string> _analysisnames;
0059 
0060   /// The instances of the class which do the real work
0061   std::vector<HLTExoticaSubAnalysis> _analyzers;
0062 
0063   /// Centralized point of access to all collections used
0064   EVTColContainer *_collections;
0065 };
0066 
0067 #endif