CMS 3D CMS Logo

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

#include <TrackerDetIdSelector.h>

Public Types

typedef void result_type
 

Public Member Functions

void operator() () const
 
void operator() (BinaryOP const &expr) const
 
void operator() (ExpressionAST const &ast) const
 
void operator() (int n) const
 
void operator() (std::string str) const
 
void operator() (UnaryOP const &expr) const
 
 WalkAST (const DetId &detId, const TrackerTopology &trackerTopology)
 

Public Attributes

Accessor _acc
 

Detailed Description

Definition at line 146 of file TrackerDetIdSelector.h.

Member Typedef Documentation

◆ result_type

typedef void WalkAST::result_type

Definition at line 151 of file TrackerDetIdSelector.h.

Constructor & Destructor Documentation

◆ WalkAST()

WalkAST::WalkAST ( const DetId detId,
const TrackerTopology trackerTopology 
)
inline

Definition at line 149 of file TrackerDetIdSelector.h.

149 : _acc(detId, trackerTopology) {}

Member Function Documentation

◆ operator()() [1/6]

void WalkAST::operator() ( ) const
inline

Definition at line 153 of file TrackerDetIdSelector.h.

153 {}

◆ operator()() [2/6]

void WalkAST::operator() ( BinaryOP const &  expr) const
inline

Definition at line 167 of file TrackerDetIdSelector.h.

167  {
168  std::cout << "(";
169  boost::apply_visitor(*this, expr.left.expr);
170  switch (expr.op) {
172  std::cout << " > ";
173  break;
175  std::cout << " >= ";
176  break;
177  case BinaryOP::OP::EQUAL:
178  std::cout << " == ";
179  break;
181  std::cout << " <= ";
182  break;
183  case BinaryOP::OP::LESS:
184  std::cout << " < ";
185  break;
187  std::cout << " != ";
188  break;
189  case BinaryOP::OP::AND:
190  std::cout << " && ";
191  break;
192  case BinaryOP::OP::OR:
193  std::cout << " || ";
194  break;
195  }
196  boost::apply_visitor(*this, expr.right.expr);
197  std::cout << ')';
198  }

References BinaryOP::AND, gather_cfg::cout, BinaryOP::EQUAL, jets_cff::expr, BinaryOP::GREATER, BinaryOP::GREATER_EQUAL, BinaryOP::LESS, BinaryOP::LESS_EQUAL, BinaryOP::NOT_EQUAL, and BinaryOP::OR.

◆ operator()() [3/6]

void WalkAST::operator() ( ExpressionAST const &  ast) const
inline

Definition at line 162 of file TrackerDetIdSelector.h.

162  {
163  boost::apply_visitor(*this, ast.expr);
164  std::cout << " [=" << _acc(ast) << "] ";
165  }

References _acc, gather_cfg::cout, and ExpressionAST::expr.

◆ operator()() [4/6]

void WalkAST::operator() ( int  n) const
inline

Definition at line 154 of file TrackerDetIdSelector.h.

154  {
155  std::cout << n;
156  std::cout << " [" << _acc(n) << "] ";
157  }

References _acc, gather_cfg::cout, and dqmiodumpmetadata::n.

◆ operator()() [5/6]

void WalkAST::operator() ( std::string  str) const
inline

Definition at line 158 of file TrackerDetIdSelector.h.

158  {
159  std::cout << str;
160  std::cout << " [" << _acc(str) << "] ";
161  }

References _acc, gather_cfg::cout, and str.

◆ operator()() [6/6]

void WalkAST::operator() ( UnaryOP const &  expr) const
inline

Definition at line 200 of file TrackerDetIdSelector.h.

200  {
201  switch (expr.op) {
202  case UnaryOP::OP::NEG:
203  std::cout << " !(";
204  break;
205  }
206  boost::apply_visitor(*this, expr.subject.expr);
207  std::cout << ')';
208  }

References gather_cfg::cout, jets_cff::expr, and UnaryOP::NEG.

Member Data Documentation

◆ _acc

Accessor WalkAST::_acc

Definition at line 147 of file TrackerDetIdSelector.h.

Referenced by operator()().

BinaryOP::OP::LESS
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
gather_cfg.cout
cout
Definition: gather_cfg.py:144
BinaryOP::OP::LESS_EQUAL
BinaryOP::OP::OR
BinaryOP::OP::AND
str
#define str(s)
Definition: TestProcessor.cc:51
BinaryOP::OP::GREATER_EQUAL
UnaryOP::OP::NEG
BinaryOP::OP::GREATER
jets_cff.expr
expr
Definition: jets_cff.py:485
WalkAST::_acc
Accessor _acc
Definition: TrackerDetIdSelector.h:147
BinaryOP::OP::NOT_EQUAL
BinaryOP::OP::EQUAL