00001 #ifndef HLTrigReport_h 00002 #define HLTrigReport_h 00003 00017 #include "FWCore/Framework/interface/Event.h" 00018 #include "FWCore/Framework/interface/EDAnalyzer.h" 00019 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00020 00021 #include "FWCore/Framework/interface/TriggerNames.h" 00022 #include<vector> 00023 #include<string> 00024 00025 // 00026 // class declaration 00027 // 00028 00029 class HLTrigReport : public edm::EDAnalyzer { 00030 00031 public: 00032 explicit HLTrigReport(const edm::ParameterSet&); 00033 ~HLTrigReport(); 00034 virtual void endJob(); 00035 00036 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00037 00038 private: 00039 00040 edm::InputTag hlTriggerResults_; // Input tag for TriggerResults 00041 edm::TriggerNames triggerNames_; // TriggerNames class 00042 00043 unsigned int nEvents_; // number of events processed 00044 00045 unsigned int nWasRun_; // # where at least one HLT was run 00046 unsigned int nAccept_; // # of accepted events 00047 unsigned int nErrors_; // # where at least one HLT had error 00048 00049 std::vector<unsigned int> hlWasRun_; // # where HLT[i] was run 00050 std::vector<unsigned int> hlAccept_; // # of events accepted by HLT[i] 00051 std::vector<unsigned int> hlErrors_; // # of events with error in HLT[i] 00052 00053 std::vector<std::string> hlNames_; // name of each HLT algorithm 00054 bool init_; // vectors initialised or not 00055 00056 }; 00057 00058 #endif //HLTrigReport_h