CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
ExpressionAST Struct Reference

#include <TrackerDetIdSelector.h>

Public Types

typedef boost::variant< Nil, int, std::string, boost::recursive_wrapper< ExpressionAST >, boost::recursive_wrapper< BinaryOP >, boost::recursive_wrapper< UnaryOP > > Type
 

Public Member Functions

int evaluate (const DetId &detId, const TrackerTopology &trackerTopology) const
 
 ExpressionAST ()
 
template<typename Expr >
 ExpressionAST (Expr const &expr)
 
ExpressionASToperator! ()
 

Public Attributes

Type expr
 

Detailed Description

Definition at line 26 of file TrackerDetIdSelector.h.

Member Typedef Documentation

◆ Type

typedef boost::variant<Nil, int, std::string, boost::recursive_wrapper<ExpressionAST>, boost::recursive_wrapper<BinaryOP>, boost::recursive_wrapper<UnaryOP> > ExpressionAST::Type

Definition at line 33 of file TrackerDetIdSelector.h.

Constructor & Destructor Documentation

◆ ExpressionAST() [1/2]

ExpressionAST::ExpressionAST ( )
inline

Definition at line 35 of file TrackerDetIdSelector.h.

35 : expr(Nil()) {}

◆ ExpressionAST() [2/2]

template<typename Expr >
ExpressionAST::ExpressionAST ( Expr const &  expr)
inline

Definition at line 38 of file TrackerDetIdSelector.h.

38 : expr(expr) {}

Member Function Documentation

◆ evaluate()

int ExpressionAST::evaluate ( const DetId detId,
const TrackerTopology trackerTopology 
) const

Definition at line 280 of file TrackerDetIdSelector.h.

280  {
281  return boost::apply_visitor(Accessor(detId, trackerTopology), this->expr);
282 }

References expr.

Referenced by BinaryOP::evaluate(), UnaryOP::evaluate(), Accessor::operator()(), and TrackerDetIdSelector::passSelection().

◆ operator!()

ExpressionAST & ExpressionAST::operator! ( )

Definition at line 117 of file TrackerDetIdSelector.cc.

117  {
119  return *this;
120 }

References expr, and UnaryOP::NEG.

Member Data Documentation

◆ expr

Type ExpressionAST::expr

Definition at line 44 of file TrackerDetIdSelector.h.

Referenced by evaluate(), operator!(), and WalkAST::operator()().

Nil
Definition: TrackerDetIdSelector.h:24
UnaryOP
Definition: TrackerDetIdSelector.h:86
UnaryOP::OP::NEG
Accessor
Definition: TrackerDetIdSelector.h:116
ExpressionAST::expr
Type expr
Definition: TrackerDetIdSelector.h:44