CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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() (Nil i) const
 
int operator() (const int &i) const
 
int operator() (const std::string &s) const
 
int operator() (const ExpressionAST &ast) const
 
int operator() (const BinaryOP &binaryOP) const
 
int operator() (const UnaryOP &unaryOP) const
 

Private Attributes

const DetId_detId
 
const TrackerTopology_trackerTopology
 

Detailed Description

Definition at line 134 of file TrackerDetIdSelector.h.

Constructor & Destructor Documentation

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

Definition at line 140 of file TrackerDetIdSelector.h.

141  : _detId(detId), _trackerTopology(trackerTopology) {}
const DetId & _detId
const TrackerTopology & _trackerTopology

Member Function Documentation

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

Definition at line 143 of file TrackerDetIdSelector.h.

References Exception.

143  {
144  throw cms::Exception("FastSimulation/TrackingRecHitProducer/TrackerDetIdSelector",
145  "while evaluating a DetId selection a symbol was not set");
146  }
int Accessor::operator() ( const int &  i) const
inline

Definition at line 147 of file TrackerDetIdSelector.h.

References mps_fire::i.

147 { return i; }
int Accessor::operator() ( const std::string &  s) const
inline

Definition at line 148 of file TrackerDetIdSelector.h.

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

148  {
149  TrackerDetIdSelector::StringFunctionMap::const_iterator it = TrackerDetIdSelector::functionTable.find(s);
150  int value = 0;
151  if (it != TrackerDetIdSelector::functionTable.cend()) {
152  value = (it->second)(_trackerTopology, _detId);
153  //std::cout<<"attr="<<s<<", value="<<value<<std::endl;
154  } else {
155  //std::cout<<"attr="<<s<<" unknown"<<std::endl;
156  std::string msg =
157  "error while parsing DetId selection: named identifier '" + s + "' not known. Possible values are: ";
159  msg += pair.first + ",";
160  }
161  throw cms::Exception("FastSimulation/TrackingRecHitProducer/TrackerDetIdSelector", msg);
162  }
163  return value;
164  }
static const StringFunctionMap functionTable
const DetId & _detId
tuple msg
Definition: mps_check.py:285
const TrackerTopology & _trackerTopology
int Accessor::operator() ( const ExpressionAST ast) const
inline

Definition at line 165 of file TrackerDetIdSelector.h.

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

165 { return ast.evaluate(_detId, _trackerTopology); }
const DetId & _detId
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
const TrackerTopology & _trackerTopology
int Accessor::operator() ( const BinaryOP binaryOP) const
inline

Definition at line 166 of file TrackerDetIdSelector.h.

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

166 { return binaryOP.evaluate(_detId, _trackerTopology); }
const DetId & _detId
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const
const TrackerTopology & _trackerTopology
int Accessor::operator() ( const UnaryOP unaryOP) const
inline

Definition at line 167 of file TrackerDetIdSelector.h.

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

167 { return unaryOP.evaluate(_detId, _trackerTopology); }
const DetId & _detId
const TrackerTopology & _trackerTopology
int evaluate(const DetId &detId, const TrackerTopology &trackerTopology) const

Member Data Documentation

const DetId& Accessor::_detId
private

Definition at line 136 of file TrackerDetIdSelector.h.

Referenced by operator()().

const TrackerTopology& Accessor::_trackerTopology
private

Definition at line 137 of file TrackerDetIdSelector.h.

Referenced by operator()().