Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:53:24

0001 #ifndef HLTCOMPARATOR_H
0002 #define HLTCOMPARATOR_H
0003 // Original Author: James Jackson
0004 
0005 #include "FWCore/Framework/interface/one/EDFilter.h"
0006 #include "FWCore/Framework/interface/Event.h"
0007 #include "FWCore/Framework/interface/Frameworkfwd.h"
0008 #include "FWCore/Framework/interface/MakerMacros.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 
0011 #include "DataFormats/Common/interface/TriggerResults.h"
0012 
0013 class TH1F;
0014 
0015 class HltComparator : public edm::one::EDFilter<edm::one::SharedResources> {
0016 public:
0017   explicit HltComparator(const edm::ParameterSet &);
0018   ~HltComparator() override;
0019 
0020 private:
0021   edm::EDGetTokenT<edm::TriggerResults> hltOnlineResults_;
0022   edm::EDGetTokenT<edm::TriggerResults> hltOfflineResults_;
0023 
0024   std::vector<std::string> onlineActualNames_;
0025   std::vector<std::string> offlineActualNames_;
0026   std::vector<unsigned int> onlineToOfflineBitMappings_;
0027 
0028   std::vector<TH1F *> comparisonHists_;
0029   std::map<unsigned int, std::map<std::string, unsigned int>> triggerComparisonErrors_;
0030 
0031   bool init_;
0032   bool verbose_;
0033   bool verbose() const { return verbose_; }
0034 
0035   std::vector<std::string> skipPathList_;
0036   std::vector<std::string> usePathList_;
0037 
0038   unsigned int numTriggers_;
0039 
0040   void beginJob() override;
0041   bool filter(edm::Event &, const edm::EventSetup &) override;
0042   void endJob() override;
0043   void initialise(const edm::TriggerResults &, const edm::TriggerResults &, edm::Event &e);
0044   std::string formatResult(const unsigned int);
0045 };
0046 
0047 #endif  // HLTCOMPARATOR_HH