File indexing completed on 2023-03-17 11:09:22
0001 #ifndef HLTStreamFilter_h
0002 #define HLTStreamFilter_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/stream/EDFilter.h"
0017 #include "FWCore/Utilities/interface/StreamID.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0020 #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"
0021
0022 #include <string>
0023 #include <utility>
0024
0025
0026
0027
0028
0029 class HLTStreamFilter : public edm::stream::EDFilter<> {
0030 public:
0031 explicit HLTStreamFilter(const edm::ParameterSet& config);
0032 static void makeHLTFilterDescription(edm::ParameterSetDescription& desc);
0033 ~HLTStreamFilter() override;
0034
0035 private:
0036 bool filter(edm::Event& event, const edm::EventSetup& setup) final;
0037
0038
0039 virtual bool hltFilter(edm::Event& event,
0040 const edm::EventSetup& setup,
0041 trigger::TriggerFilterObjectWithRefs& filterobject) = 0;
0042
0043 private:
0044 const bool saveTags_;
0045
0046 public:
0047 bool saveTags() const { return saveTags_; }
0048
0049 public:
0050 int path(edm::Event const&) const;
0051 int module(edm::Event const&) const;
0052 std::pair<int, int> pmid(edm::Event const&) const;
0053 const std::string* pathName(edm::Event const&) const;
0054 const std::string* moduleLabel() const;
0055 };
0056
0057 #endif