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

◆ OP

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;

Constructor & Destructor Documentation

◆ BinaryOP()

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) {}

Member Function Documentation

◆ evaluate()

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

Definition at line 63 of file TrackerDetIdSelector.h.

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  }

References AND, EQUAL, ExpressionAST::evaluate(), GREATER, GREATER_EQUAL, left, LESS, LESS_EQUAL, NOT_EQUAL, op, OR, right, and trackerTopology_cfi::trackerTopology.

Referenced by Accessor::operator()().

Member Data Documentation

◆ left

ExpressionAST BinaryOP::left

◆ op

enum BinaryOP::OP BinaryOP::op

Referenced by evaluate().

◆ right

ExpressionAST BinaryOP::right
BinaryOP::OP::LESS
BinaryOP::OP::LESS_EQUAL
ExpressionAST::evaluate
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
Definition: TrackerDetIdSelector.h:280
BinaryOP::OP::OR
BinaryOP::OP::AND
BinaryOP::op
enum BinaryOP::OP op
BinaryOP::OP::GREATER_EQUAL
BinaryOP::right
ExpressionAST right
Definition: TrackerDetIdSelector.h:59
reco::tau::qcuts::AND
bool AND(const TrackBaseRef &track, const RecoTauQualityCuts::TrackQCutFuncCollection &cuts)
Definition: RecoTauQualityCuts.cc:268
BinaryOP::OP::GREATER
trackerTopology_cfi.trackerTopology
trackerTopology
Definition: trackerTopology_cfi.py:3
BinaryOP::left
ExpressionAST left
Definition: TrackerDetIdSelector.h:58
BinaryOP::OP::NOT_EQUAL
BinaryOP::OP::EQUAL