CMS 3D CMS Logo

List of all members | Public Member Functions
triggerExpression::OperatorXor Class Reference

#include <TriggerExpressionOperators.h>

Inheritance diagram for triggerExpression::OperatorXor:
triggerExpression::BinaryOperator triggerExpression::Evaluator

Public Member Functions

void dump (std::ostream &out, bool const ignoreMasks=false) const override
 
bool operator() (const Data &data) const override
 
 OperatorXor (Evaluator *arg1, Evaluator *arg2)
 
- Public Member Functions inherited from triggerExpression::BinaryOperator
 BinaryOperator (Evaluator *arg1, Evaluator *arg2)
 
void init (const Data &data) override
 
void mask (Evaluator const &arg) override
 
std::vector< std::string > patterns () const override
 
- Public Member Functions inherited from triggerExpression::Evaluator
virtual void disableMasks ()
 
virtual void enableMasks ()
 
 Evaluator ()=default
 
virtual bool masksEnabled () const
 
virtual std::vector< std::pair< std::string, unsigned int > > triggers () const
 
virtual ~Evaluator ()=default
 

Additional Inherited Members

- Protected Attributes inherited from triggerExpression::BinaryOperator
std::unique_ptr< Evaluatorm_arg1
 
std::unique_ptr< Evaluatorm_arg2
 

Detailed Description

Definition at line 115 of file TriggerExpressionOperators.h.

Constructor & Destructor Documentation

◆ OperatorXor()

triggerExpression::OperatorXor::OperatorXor ( Evaluator arg1,
Evaluator arg2 
)
inline

Definition at line 117 of file TriggerExpressionOperators.h.

117 : BinaryOperator(arg1, arg2) {}
BinaryOperator(Evaluator *arg1, Evaluator *arg2)

Member Function Documentation

◆ dump()

void triggerExpression::OperatorXor::dump ( std::ostream &  out,
bool const  ignoreMasks = false 
) const
inlineoverridevirtual

Implements triggerExpression::Evaluator.

Definition at line 126 of file TriggerExpressionOperators.h.

References triggerExpression::BinaryOperator::m_arg1, triggerExpression::BinaryOperator::m_arg2, and MillePedeFileConverter_cfg::out.

126  {
127  out << '(';
128  m_arg1->dump(out, ignoreMasks);
129  out << " XOR ";
130  m_arg2->dump(out, ignoreMasks);
131  out << ')';
132  }

◆ operator()()

bool triggerExpression::OperatorXor::operator() ( const Data data) const
inlineoverridevirtual

Implements triggerExpression::Evaluator.

Definition at line 119 of file TriggerExpressionOperators.h.

References data, and diffTwoXMLs::r2.

119  {
120  // force the execution of both arguments, otherwise prescalers won't work properly
121  bool r1 = (*m_arg1)(data);
122  bool r2 = (*m_arg2)(data);
123  return r1 xor r2;
124  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80