Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HLTrigger_HLTcore_TriggerExpressionPathReader_h
0002 #define HLTrigger_HLTcore_TriggerExpressionPathReader_h
0003 
0004 #include "HLTrigger/HLTcore/interface/TriggerExpressionEvaluator.h"
0005 
0006 namespace triggerExpression {
0007 
0008   class PathReader : public Evaluator {
0009   public:
0010     PathReader(const std::string& pattern)
0011         : m_pattern{pattern}, m_triggers{}, m_triggersAfterMasking{}, m_initialised{false} {}
0012 
0013     bool operator()(const Data& data) const override;
0014 
0015     void init(const Data& data) override;
0016 
0017     std::vector<std::string> patterns() const override { return {m_pattern}; }
0018 
0019     void dump(std::ostream& out, bool const ignoreMasks = false) const override;
0020 
0021     void mask(Evaluator const& eval) override;
0022 
0023     std::vector<std::pair<std::string, unsigned int>> triggers() const override { return m_triggers; }
0024     std::vector<std::pair<std::string, unsigned int>> triggersAfterMasking() const { return m_triggersAfterMasking; }
0025 
0026   private:
0027     std::string m_pattern;
0028     std::vector<std::pair<std::string, unsigned int>> m_triggers;
0029     std::vector<std::pair<std::string, unsigned int>> m_triggersAfterMasking;
0030     bool m_initialised;
0031   };
0032 
0033 }  // namespace triggerExpression
0034 
0035 #endif  // HLTrigger_HLTcore_TriggerExpressionPathReader_h