CMS 3D CMS Logo

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

#include <TrackerDetIdSelector.h>

Public Types

enum  OP {
  OP::GREATER, OP::GREATER_EQUAL, OP::EQUAL, OP::LESS_EQUAL,
  OP::LESS, OP::NOT_EQUAL, OP::AND, OP::OR
}
 

Public Member Functions

 BinaryOP (OP op, ExpressionAST const &left, ExpressionAST const &right)
 
int evaluate (const DetId &detId, const TrackerTopology &trackerTopology) const
 

Public Attributes

ExpressionAST left
 
enum BinaryOP::OP op
 
ExpressionAST right
 

Detailed Description

Definition at line 68 of file TrackerDetIdSelector.h.

Member Enumeration Documentation

enum BinaryOP::OP
strong
Enumerator
GREATER 
GREATER_EQUAL 
EQUAL 
LESS_EQUAL 
LESS 
NOT_EQUAL 
AND 
OR 

Definition at line 70 of file TrackerDetIdSelector.h.

71  {
72  GREATER, GREATER_EQUAL, EQUAL, LESS_EQUAL, LESS, NOT_EQUAL, AND, OR
73  } op;
bool AND(const TrackBaseRef &track, const RecoTauQualityCuts::TrackQCutFuncCollection &cuts)
enum BinaryOP::OP op

Constructor & Destructor Documentation

BinaryOP::BinaryOP ( OP  op,
ExpressionAST const &  left,
ExpressionAST const &  right 
)
inline

Definition at line 77 of file TrackerDetIdSelector.h.

77  :
78  op(op),
79  left(left),
80  right(right)
81  {
82  }
ExpressionAST left
ExpressionAST right
enum BinaryOP::OP op

Member Function Documentation

int BinaryOP::evaluate ( const DetId detId,
const TrackerTopology trackerTopology 
) const
inline

Definition at line 84 of file TrackerDetIdSelector.h.

References reco::tau::qcuts::AND(), and ExpressionAST::evaluate().

Referenced by Accessor::operator()().

85  {
86  switch(op)
87  {
88  case OP::GREATER:
89  return left.evaluate(detId,trackerTopology) > right.evaluate(detId,trackerTopology);
90  case OP::GREATER_EQUAL:
91  return left.evaluate(detId,trackerTopology) >= right.evaluate(detId,trackerTopology);
92  case OP::EQUAL:
93  return left.evaluate(detId,trackerTopology) == right.evaluate(detId,trackerTopology);
94  case OP::LESS_EQUAL:
95  return left.evaluate(detId,trackerTopology) <= right.evaluate(detId,trackerTopology);
96  case OP::LESS:
97  return left.evaluate(detId,trackerTopology) < right.evaluate(detId,trackerTopology);
98  case OP::NOT_EQUAL:
99  return left.evaluate(detId,trackerTopology) != right.evaluate(detId,trackerTopology);
100  case OP::AND:
101  return left.evaluate(detId,trackerTopology) && right.evaluate(detId,trackerTopology);
102  case OP::OR:
103  return left.evaluate(detId,trackerTopology) || right.evaluate(detId,trackerTopology);
104  }
105  return 0;
106  }
ExpressionAST left
ExpressionAST right
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
enum BinaryOP::OP op

Member Data Documentation

ExpressionAST BinaryOP::left
enum BinaryOP::OP BinaryOP::op

Referenced by WalkAST::operator()().

ExpressionAST BinaryOP::right