#include <Logic.h>
|
| virtual void | print (std::ostream &, size_t indSize, size_t indLevel) const override |
Definition at line 65 of file Logic.h.
◆ NodeType
◆ LogicLeaf() [1/2]
| TrigConf::LogicLeaf::LogicLeaf |
( |
| ) |
|
|
delete |
◆ LogicLeaf() [2/2]
| TrigConf::LogicLeaf::LogicLeaf |
( |
const std::string & | content | ) |
|
Definition at line 46 of file Logic.cxx.
46 :
48{
50}
void setContent(const std::string &content)
◆ ~LogicLeaf()
| virtual TrigConf::LogicLeaf::~LogicLeaf |
( |
| ) |
|
|
overridevirtualdefault |
◆ elements()
| std::map< std::string, bool > TrigConf::LogicLeaf::elements |
( |
| ) |
const |
|
overridevirtual |
◆ elementsCount()
| std::map< std::string, unsigned int > TrigConf::LogicLeaf::elementsCount |
( |
| ) |
const |
|
overridevirtual |
◆ evaluate() [1/2]
| bool TrigConf::LogicLeaf::evaluate |
( |
const std::map< std::string, bool > & | elements | ) |
const |
|
overridevirtual |
Implements TrigConf::Logic.
Definition at line 64 of file Logic.cxx.
64 {
65 auto stateForThisLeaf = elementsState.find(
m_content);
66 if( stateForThisLeaf == elementsState.end() ) {
67 throw LogicParsingException(std::string(
"Can't evaluate logic ") +
m_content +
" as it is missing in the state map");
68 }
69 return negate() ? !stateForThisLeaf->second : stateForThisLeaf->second;
70}
◆ evaluate() [2/2]
| bool TrigConf::LogicLeaf::evaluate |
( |
const std::map< std::string, unsigned int > & | elementsCount | ) |
const |
|
overridevirtual |
Implements TrigConf::Logic.
Definition at line 74 of file Logic.cxx.
74 {
77 throw LogicParsingException(std::string(
"Can't evaluate logic ") +
m_content +
" as " +
m_name +
" is missing in the counts map");
78 }
79 bool pass = stateForThisLeaf->second >=
m_count;
80 return negate() ? !pass : pass;
81}
std::map< std::string, unsigned int > elementsCount() const override
◆ expression()
| const std::string & TrigConf::Logic::expression |
( |
| ) |
const |
|
inherited |
◆ negate()
| bool TrigConf::Logic::negate |
( |
| ) |
const |
|
inherited |
◆ nodeType()
| NodeType TrigConf::Logic::nodeType |
( |
| ) |
const |
|
inlineinherited |
◆ print() [1/2]
| void TrigConf::Logic::print |
( |
std::ostream & | o = std::cout | ) |
const |
|
inherited |
Definition at line 37 of file Logic.cxx.
37 {
41 }
43}
void print(std::ostream &=std::cout) const
◆ print() [2/2]
| void TrigConf::LogicLeaf::print |
( |
std::ostream & | o, |
|
|
size_t | indSize, |
|
|
size_t | indLevel ) const |
|
overrideprivatevirtual |
◆ setContent()
| void TrigConf::LogicLeaf::setContent |
( |
const std::string & | content | ) |
|
Definition at line 54 of file Logic.cxx.
54 {
56 std::smatch sm;
57 std::regex_match(content, sm,
re);
59 m_count = sm[2].length() > 0 ?
static_cast<unsigned int>(std::stoul(sm[2])) : 1;
60}
const boost::regex re(r_e)
◆ setExpression()
| void TrigConf::Logic::setExpression |
( |
const std::string & | expr | ) |
|
|
inherited |
◆ setNegate()
| void TrigConf::Logic::setNegate |
( |
bool | negate = true | ) |
|
|
inherited |
◆ m_content
| std::string TrigConf::LogicLeaf::m_content { "" } |
|
private |
◆ m_count
| unsigned int TrigConf::LogicLeaf::m_count { 1 } |
|
private |
◆ m_expression
| std::string TrigConf::Logic::m_expression { "" } |
|
privateinherited |
◆ m_name
| std::string TrigConf::LogicLeaf::m_name { "" } |
|
private |
◆ m_negate
| bool TrigConf::Logic::m_negate { false } |
|
privateinherited |
◆ m_nodeType
The documentation for this class was generated from the following files: