File indexing completed on 2024-04-06 12:18:29
0001 #ifndef TriggerResultsFilterFromDB_h
0002 #define TriggerResultsFilterFromDB_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <vector>
0019 #include <string>
0020
0021 #include "FWCore/Framework/interface/ESWatcher.h"
0022 #include "FWCore/Framework/interface/stream/EDFilter.h"
0023 #include "CondFormats/DataRecord/interface/AlCaRecoTriggerBitsRcd.h"
0024 #include "HLTrigger/HLTcore/interface/TriggerExpressionData.h"
0025
0026
0027 namespace edm {
0028 class ConfigurationDescriptions;
0029 }
0030 namespace triggerExpression {
0031 class Evaluator;
0032 }
0033
0034
0035
0036
0037
0038 class TriggerResultsFilterFromDB : public edm::stream::EDFilter<> {
0039 public:
0040 explicit TriggerResultsFilterFromDB(const edm::ParameterSet &);
0041 ~TriggerResultsFilterFromDB() override;
0042 static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
0043 bool filter(edm::Event &, const edm::EventSetup &) override;
0044
0045 private:
0046
0047 void pathsFromSetup(const edm::Event &, const edm::EventSetup &setup);
0048
0049
0050 void parse(const std::string &expression);
0051 void parse(const std::vector<std::string> &expressions);
0052
0053
0054 std::string m_eventSetupPathsKey;
0055 edm::ESWatcher<AlCaRecoTriggerBitsRcd> m_eventSetupWatcher;
0056 edm::ESGetToken<AlCaRecoTriggerBits, AlCaRecoTriggerBitsRcd> const m_alcaRecoTriggerBitsRcdToken;
0057
0058
0059 triggerExpression::Evaluator *m_expression;
0060
0061
0062 triggerExpression::Data m_eventCache;
0063 };
0064
0065 #endif