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

Member Typedef Documentation

◆ result_type

typedef void WalkAST::result_type

Definition at line 157 of file TrackerDetIdSelector.h.

Constructor & Destructor Documentation

◆ WalkAST()

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

Definition at line 155 of file TrackerDetIdSelector.h.

155 : _acc(detId, trackerTopology) {}

Member Function Documentation

◆ operator()() [1/6]

void WalkAST::operator() ( ) const
inline

Definition at line 159 of file TrackerDetIdSelector.h.

159 {}

◆ operator()() [2/6]

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

Definition at line 173 of file TrackerDetIdSelector.h.

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

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

168  {
169  boost::apply_visitor(*this, ast.expr);
170  std::cout << " [=" << _acc(ast) << "] ";
171  }

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

◆ operator()() [4/6]

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

Definition at line 160 of file TrackerDetIdSelector.h.

160  {
161  std::cout << n;
162  std::cout << " [" << _acc(n) << "] ";
163  }

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

◆ operator()() [5/6]

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

Definition at line 164 of file TrackerDetIdSelector.h.

164  {
165  std::cout << str;
166  std::cout << " [" << _acc(str) << "] ";
167  }

References _acc, gather_cfg::cout, and str.

◆ operator()() [6/6]

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

Definition at line 206 of file TrackerDetIdSelector.h.

206  {
207  switch (expr.op) {
208  case UnaryOP::OP::NEG:
209  std::cout << " !(";
210  break;
211  }
212  boost::apply_visitor(*this, expr.subject.expr);
213  std::cout << ')';
214  }

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

Member Data Documentation

◆ _acc

Accessor WalkAST::_acc

Definition at line 153 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:48
BinaryOP::OP::GREATER_EQUAL
UnaryOP::OP::NEG
BinaryOP::OP::GREATER
jets_cff.expr
expr
Definition: jets_cff.py:449
WalkAST::_acc
Accessor _acc
Definition: TrackerDetIdSelector.h:153
BinaryOP::OP::NOT_EQUAL
BinaryOP::OP::EQUAL