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

Constructor & Destructor Documentation

◆ Accessor()

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

Definition at line 122 of file TrackerDetIdSelector.h.

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

Member Function Documentation

◆ operator()() [1/6]

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

Definition at line 148 of file TrackerDetIdSelector.h.

148 { 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 147 of file TrackerDetIdSelector.h.

147 { 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 129 of file TrackerDetIdSelector.h.

129 { return i; }

References mps_fire::i.

◆ operator()() [4/6]

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

Definition at line 130 of file TrackerDetIdSelector.h.

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

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

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

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

◆ operator()() [6/6]

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

Definition at line 125 of file TrackerDetIdSelector.h.

125  {
126  throw cms::Exception("FastSimulation/TrackingRecHitProducer/TrackerDetIdSelector",
127  "while evaluating a DetId selection a symbol was not set");
128  }

References Exception.

Member Data Documentation

◆ _detId

const DetId& Accessor::_detId
private

Definition at line 118 of file TrackerDetIdSelector.h.

Referenced by operator()().

◆ _trackerTopology

const TrackerTopology& Accessor::_trackerTopology
private

Definition at line 119 of file TrackerDetIdSelector.h.

Referenced by operator()().

mps_fire.i
i
Definition: mps_fire.py:355
Accessor::_detId
const DetId & _detId
Definition: TrackerDetIdSelector.h:118
mps_check.msg
tuple msg
Definition: mps_check.py:285
BinaryOP::evaluate
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
Definition: TrackerDetIdSelector.h:63
ExpressionAST::evaluate
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
Definition: TrackerDetIdSelector.h:280
alignCSCRings.s
s
Definition: alignCSCRings.py:92
UnaryOP::evaluate
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
Definition: TrackerDetIdSelector.h:91
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
value
Definition: value.py:1
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:246
Accessor::_trackerTopology
const TrackerTopology & _trackerTopology
Definition: TrackerDetIdSelector.h:119
TrackerDetIdSelector::functionTable
const static StringFunctionMap functionTable
Definition: TrackerDetIdSelector.h:108