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 20 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 27 of file TrackerDetIdSelector.h.

Constructor & Destructor Documentation

◆ ExpressionAST() [1/2]

ExpressionAST::ExpressionAST ( )
inline

Definition at line 29 of file TrackerDetIdSelector.h.

29 : expr(Nil()) {}

◆ ExpressionAST() [2/2]

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

Definition at line 32 of file TrackerDetIdSelector.h.

32 : expr(expr) {}

Member Function Documentation

◆ evaluate()

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

Definition at line 211 of file TrackerDetIdSelector.h.

211  {
212  return boost::apply_visitor(Accessor(detId, trackerTopology), this->expr);
213 }

References expr.

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

◆ operator!()

ExpressionAST & ExpressionAST::operator! ( )

Definition at line 123 of file TrackerDetIdSelector.cc.

123  {
125  return *this;
126 }

References expr, and UnaryOP::NEG.

Member Data Documentation

◆ expr

Type ExpressionAST::expr

Definition at line 38 of file TrackerDetIdSelector.h.

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

Nil
Definition: TrackerDetIdSelector.h:18
UnaryOP
Definition: TrackerDetIdSelector.h:80
UnaryOP::OP::NEG
Accessor
Definition: TrackerDetIdSelector.h:110
ExpressionAST::expr
Type expr
Definition: TrackerDetIdSelector.h:38