|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TrigConf_LogicExpression
6 #define TrigConf_LogicExpression
24 class LogicExpression;
25 typedef std::vector<std::shared_ptr<LogicExpression>>
LogicV_t;
32 static const char kAND =
'&';
33 static const char kOR =
'|';
34 static const char kNOT =
'!';
51 virtual int parse(
const std::string& expr,
bool enclosed=
false);
52 virtual std::string
logicRep()
const;
57 m_SubLogics.emplace_back(std::make_shared<LogicExpression>(sub));
93 #endif // TrigConf_LogicExpression
virtual std::string logicRep() const
virtual int parse(const std::string &expr, bool enclosed=false)
const LogicV_t & subLogics() const
std::vector< std::shared_ptr< LogicExpression > > LogicV_t
void setElement(const std::string &e)
virtual ~LogicExpression()=default
destructor
Forward iterator to traverse the main components of the trigger configuration.
bool isPlaceHolder() const
void addSubLogic(const LogicExpression &sub)
LogicExpression(std::ostream &o=std::cout)
constructor
static const char kNOT
NOT of a sub-logic. (only one sub-logic)
static const char kELEMENT
simple element.
static std::string extractElementName(const std::string &expr)
static const char kOR
OR of sub-logics.
static const char kCLOSE
')' is a valid symbol, but not allowed as a state.
const std::shared_ptr< LogicExpression > subLogic(int i) const
const std::string & element() const
static const char kAND
AND of sub-logics.
int totalNumberOfElements() const
void printError(const std::string &message, int i)
std::ostream & m_ostream
output stream for all messages
static bool isValidElementChar(char c)
static const char kOPEN
empty logic but may have sub-logics.
void print(const std::string &indent="")