CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Accessor Class Reference

#include <TrackerDetIdSelector.h>

Inheritance diagram for Accessor:

Public Member Functions

 Accessor (const DetId &detId, const TrackerTopology &trackerTopology)
 
int operator() (const BinaryOP &binaryOP) const
 
int operator() (const ExpressionAST &ast) const
 
int operator() (const int &i) const
 
int operator() (const std::string &s) const
 
int operator() (const UnaryOP &unaryOP) const
 
int operator() (Nil i) const
 

Private Attributes

const DetId_detId
 
const TrackerTopology_trackerTopology
 

Detailed Description

Definition at line 110 of file TrackerDetIdSelector.h.

Constructor & Destructor Documentation

◆ Accessor()

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

Definition at line 116 of file TrackerDetIdSelector.h.

117  : _detId(detId), _trackerTopology(trackerTopology) {}

Member Function Documentation

◆ operator()() [1/6]

int Accessor::operator() ( const BinaryOP binaryOP) const
inline

Definition at line 142 of file TrackerDetIdSelector.h.

142 { return binaryOP.evaluate(_detId, _trackerTopology); }

References _detId, _trackerTopology, and BinaryOP::evaluate().

◆ operator()() [2/6]

int Accessor::operator() ( const ExpressionAST ast) const
inline

Definition at line 141 of file TrackerDetIdSelector.h.

141 { return ast.evaluate(_detId, _trackerTopology); }

References _detId, _trackerTopology, and ExpressionAST::evaluate().

◆ operator()() [3/6]

int Accessor::operator() ( const int &  i) const
inline

Definition at line 123 of file TrackerDetIdSelector.h.

123 { return i; }

References mps_fire::i.

◆ operator()() [4/6]

int Accessor::operator() ( const std::string &  s) const
inline

Definition at line 124 of file TrackerDetIdSelector.h.

124  {
125  TrackerDetIdSelector::StringFunctionMap::const_iterator it = TrackerDetIdSelector::functionTable.find(s);
126  int value = 0;
127  if (it != TrackerDetIdSelector::functionTable.cend()) {
128  value = (it->second)(_trackerTopology, _detId);
129  //std::cout<<"attr="<<s<<", value="<<value<<std::endl;
130  } else {
131  //std::cout<<"attr="<<s<<" unknown"<<std::endl;
132  std::string msg =
133  "error while parsing DetId selection: named identifier '" + s + "' not known. Possible values are: ";
135  msg += pair.first + ",";
136  }
137  throw cms::Exception("FastSimulation/TrackingRecHitProducer/TrackerDetIdSelector", msg);
138  }
139  return value;
140  }

References _detId, _trackerTopology, Exception, TrackerDetIdSelector::functionTable, mps_check::msg, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

◆ operator()() [5/6]

int Accessor::operator() ( const UnaryOP unaryOP) const
inline

Definition at line 143 of file TrackerDetIdSelector.h.

143 { return unaryOP.evaluate(_detId, _trackerTopology); }

References _detId, _trackerTopology, and UnaryOP::evaluate().

◆ operator()() [6/6]

int Accessor::operator() ( Nil  i) const
inline

Definition at line 119 of file TrackerDetIdSelector.h.

119  {
120  throw cms::Exception("FastSimulation/TrackingRecHitProducer/TrackerDetIdSelector",
121  "while evaluating a DetId selection a symbol was not set");
122  }

References Exception.

Member Data Documentation

◆ _detId

const DetId& Accessor::_detId
private

Definition at line 112 of file TrackerDetIdSelector.h.

Referenced by operator()().

◆ _trackerTopology

const TrackerTopology& Accessor::_trackerTopology
private

Definition at line 113 of file TrackerDetIdSelector.h.

Referenced by operator()().

mps_fire.i
i
Definition: mps_fire.py:428
Accessor::_detId
const DetId & _detId
Definition: TrackerDetIdSelector.h:112
mps_check.msg
tuple msg
Definition: mps_check.py:285
BinaryOP::evaluate
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
Definition: TrackerDetIdSelector.h:57
ExpressionAST::evaluate
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
Definition: TrackerDetIdSelector.h:211
alignCSCRings.s
s
Definition: alignCSCRings.py:92
UnaryOP::evaluate
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
Definition: TrackerDetIdSelector.h:85
value
Definition: value.py:1
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:245
Accessor::_trackerTopology
const TrackerTopology & _trackerTopology
Definition: TrackerDetIdSelector.h:113
TrackerDetIdSelector::functionTable
const static StringFunctionMap functionTable
Definition: TrackerDetIdSelector.h:102