|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TRIGCONFDATA_LOGIC_H
6 #define TRIGCONFDATA_LOGIC_H
45 virtual bool evaluate(
const std::map<std::string,bool> & elementsState)
const = 0;
48 virtual std::map<std::string, bool>
elements()
const = 0;
51 void print(std::ostream & = std::cout)
const;
53 virtual void print(std::ostream &,
size_t indSize,
size_t indLevel)
const = 0;
76 std::map<std::string, bool>
elements()
const override;
77 std::map<std::string, unsigned int>
elementsCount()
const override;
80 virtual void print(std::ostream &,
size_t indSize,
size_t indLevel)
const override;
93 const std::vector<std::unique_ptr<Logic>> &
subLogics()
const;
96 virtual void print(std::ostream &,
size_t indSize,
size_t indLevel)
const override;
97 std::vector<std::unique_ptr<Logic>>
m_subs;
104 LogicAND(std::unique_ptr<Logic>&& left);
106 bool evaluate(
const std::map<std::string, bool> & elementsState)
const override;
108 std::map<std::string, bool>
elements()
const override;
109 std::map<std::string, unsigned int>
elementsCount()
const override;
116 LogicOR(std::unique_ptr<Logic>&& left);
118 bool evaluate(
const std::map<std::string,bool> & elementsState)
const override;
120 std::map<std::string, bool>
elements()
const override;
121 std::map<std::string, unsigned int>
elementsCount()
const override;
void setContent(const std::string &content)
bool evaluate(const std::map< std::string, bool > &elements) const override
virtual void print(std::ostream &, size_t indSize, size_t indLevel) const override
std::vector< std::unique_ptr< Logic > > m_subs
std::map< std::string, bool > elements() const override
const std::vector< std::unique_ptr< Logic > > & subLogics() const
std::map< std::string, bool > elements() const override
void setExpression(const std::string &)
virtual void print(std::ostream &, size_t indSize, size_t indLevel) const =0
virtual ~LogicAND() override=default
std::map< std::string, unsigned int > elementsCount() const override
virtual void print(std::ostream &, size_t indSize, size_t indLevel) const override
std::map< std::string, bool > elements() const override
virtual bool evaluate(const std::map< std::string, bool > &elementsState) const =0
void setNegate(bool negate=true)
Forward iterator to traverse the main components of the trigger configuration.
virtual ~LogicOR() override=default
virtual bool evaluate(const std::map< std::string, unsigned int > &elementsCount) const =0
LogicParsingException(const std::string &error)
const std::string & msg() const
const std::string & expression() const
virtual std::map< std::string, bool > elements() const =0
std::map< std::string, unsigned int > elementsCount() const override
virtual ~LogicOPS() override=default
virtual std::map< std::string, unsigned int > elementsCount() const =0
Class to hold the logic structure representing a logical expression and evaluate it for a given state...
virtual ~LogicLeaf() override=default
std::map< std::string, unsigned int > elementsCount() const override
void print(std::ostream &=std::cout) const
LogicOPS(NodeType nodeType)
NodeType nodeType() const
std::vector< std::unique_ptr< Logic > > takeSubLogics()
void addSubLogic(std::unique_ptr< Logic > &&right)
bool evaluate(const std::map< std::string, bool > &elementsState) const override
bool evaluate(const std::map< std::string, bool > &elementsState) const override
LogicParsingException()=delete