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

57 { GREATER, GREATER_EQUAL, EQUAL, LESS_EQUAL, LESS, NOT_EQUAL, AND, OR } 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 61 of file TrackerDetIdSelector.h.

61 : op(op), left(left), right(right) {}
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 63 of file TrackerDetIdSelector.h.

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

Referenced by Accessor::operator()().

63  {
64  switch (op) {
65  case OP::GREATER:
66  return left.evaluate(detId, trackerTopology) > right.evaluate(detId, trackerTopology);
67  case OP::GREATER_EQUAL:
68  return left.evaluate(detId, trackerTopology) >= right.evaluate(detId, trackerTopology);
69  case OP::EQUAL:
70  return left.evaluate(detId, trackerTopology) == right.evaluate(detId, trackerTopology);
71  case OP::LESS_EQUAL:
72  return left.evaluate(detId, trackerTopology) <= right.evaluate(detId, trackerTopology);
73  case OP::LESS:
74  return left.evaluate(detId, trackerTopology) < right.evaluate(detId, trackerTopology);
75  case OP::NOT_EQUAL:
76  return left.evaluate(detId, trackerTopology) != right.evaluate(detId, trackerTopology);
77  case OP::AND:
78  return left.evaluate(detId, trackerTopology) && right.evaluate(detId, trackerTopology);
79  case OP::OR:
80  return left.evaluate(detId, trackerTopology) || right.evaluate(detId, trackerTopology);
81  }
82  return 0;
83  }
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