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() (int n) const
 
void operator() (std::string str) const
 
void operator() (ExpressionAST const &ast) const
 
void operator() (BinaryOP const &expr) 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

typedef void WalkAST::result_type

Definition at line 157 of file TrackerDetIdSelector.h.

Constructor & Destructor Documentation

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

Definition at line 155 of file TrackerDetIdSelector.h.

155 : _acc(detId, trackerTopology) {}

Member Function Documentation

void WalkAST::operator() ( ) const
inline

Definition at line 159 of file TrackerDetIdSelector.h.

159 {}
void WalkAST::operator() ( int  n) const
inline

Definition at line 160 of file TrackerDetIdSelector.h.

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

160  {
161  std::cout << n;
162  std::cout << " [" << _acc(n) << "] ";
163  }
void WalkAST::operator() ( std::string  str) const
inline

Definition at line 164 of file TrackerDetIdSelector.h.

References gather_cfg::cout, and str.

164  {
165  std::cout << str;
166  std::cout << " [" << _acc(str) << "] ";
167  }
#define str(s)
void WalkAST::operator() ( ExpressionAST const &  ast) const
inline

Definition at line 168 of file TrackerDetIdSelector.h.

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

168  {
169  boost::apply_visitor(*this, ast.expr);
170  std::cout << " [=" << _acc(ast) << "] ";
171  }
void WalkAST::operator() ( BinaryOP const &  expr) const
inline

Definition at line 173 of file TrackerDetIdSelector.h.

References BinaryOP::AND, gather_cfg::cout, BinaryOP::EQUAL, ExpressionAST::expr, BinaryOP::GREATER, BinaryOP::GREATER_EQUAL, BinaryOP::left, BinaryOP::LESS, BinaryOP::LESS_EQUAL, BinaryOP::NOT_EQUAL, BinaryOP::op, BinaryOP::OR, and BinaryOP::right.

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  }
void WalkAST::operator() ( UnaryOP const &  expr) const
inline

Definition at line 206 of file TrackerDetIdSelector.h.

References gather_cfg::cout, ExpressionAST::expr, UnaryOP::NEG, UnaryOP::op, and UnaryOP::subject.

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  }

Member Data Documentation

Accessor WalkAST::_acc

Definition at line 153 of file TrackerDetIdSelector.h.