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
reco::parser::ExpressionLazyVar Class Reference

#include <ExpressionVar.h>

Inheritance diagram for reco::parser::ExpressionLazyVar:
reco::parser::ExpressionBase

Public Member Functions

 ExpressionLazyVar (const std::vector< LazyInvoker > &methods)
 
double value (const edm::ObjectWithDict &) const override
 
 ~ExpressionLazyVar () override
 
- Public Member Functions inherited from reco::parser::ExpressionBase
virtual ~ExpressionBase ()
 

Private Attributes

std::vector< LazyInvokermethods_
 
std::vector< edm::ObjectWithDictobjects_
 

Detailed Description

Same as ExpressionVar but with lazy resolution of object methods using the dynamic type of the object, and not the one fixed at compile time

Definition at line 58 of file ExpressionVar.h.

Constructor & Destructor Documentation

ExpressionLazyVar::ExpressionLazyVar ( const std::vector< LazyInvoker > &  methods)

Definition at line 191 of file ExpressionVar.cc.

191 : methods_(methods) {}
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:60
ExpressionLazyVar::~ExpressionLazyVar ( )
override

Definition at line 193 of file ExpressionVar.cc.

193 {}

Member Function Documentation

double ExpressionLazyVar::value ( const edm::ObjectWithDict o) const
overridevirtual

Implements reco::parser::ExpressionBase.

Definition at line 195 of file ExpressionVar.cc.

References Exhume::I, methods_, class-composition::o, objects_, runTheMatrix::ret, and hgcalPerformanceValidation::val.

Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), average.Average::average(), Types.string::configValue(), Types.FileInPath::configValue(), Mixins.UsingBlock::dumpPython(), Mixins.UsingBlock::insertInto(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), and Types.vstring::insertInto().

195  {
197  std::vector<LazyInvoker>::const_iterator I = methods_.begin();
198  std::vector<LazyInvoker>::const_iterator E = methods_.end() - 1;
199  for (; I < E; ++I) {
200  val = I->invoke(val, objects_);
201  }
202  double ret = I->invokeLast(val, objects_);
203  for (std::vector<edm::ObjectWithDict>::reverse_iterator RI = objects_.rbegin(), RE = objects_.rend(); RI != RE;
204  ++RI) {
205  RI->destruct(false);
206  }
207  objects_.clear();
208  return ret;
209 }
tuple ret
prodAgent to be discontinued
const std::complex< double > I
Definition: I.h:8
std::vector< edm::ObjectWithDict > objects_
Definition: ExpressionVar.h:61
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:60

Member Data Documentation

std::vector<LazyInvoker> reco::parser::ExpressionLazyVar::methods_
private

Definition at line 60 of file ExpressionVar.h.

Referenced by value().

std::vector<edm::ObjectWithDict> reco::parser::ExpressionLazyVar::objects_
mutableprivate

Definition at line 61 of file ExpressionVar.h.

Referenced by value().