CMS 3D CMS Logo

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_
 

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 62 of file ExpressionVar.h.

Constructor & Destructor Documentation

◆ ExpressionLazyVar()

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

Definition at line 206 of file ExpressionVar.cc.

206 : methods_(methods) {}
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:64

◆ ~ExpressionLazyVar()

ExpressionLazyVar::~ExpressionLazyVar ( )
override

Definition at line 208 of file ExpressionVar.cc.

208 {}

Member Function Documentation

◆ value()

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

Implements reco::parser::ExpressionBase.

Definition at line 210 of file ExpressionVar.cc.

References Exhume::I, methods_, EcalTangentSkim_cfg::o, runTheMatrix::ret, and heppy_batch::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().

210  {
212  std::vector<StorageManager> storage;
213  storage.reserve(methods_.size());
214 
215  std::vector<LazyInvoker>::const_iterator I = methods_.begin();
216  std::vector<LazyInvoker>::const_iterator E = methods_.end() - 1;
217  for (; I < E; ++I) {
218  val = I->invoke(val, storage);
219  }
220  double ret = I->invokeLast(val, storage);
221  while (not storage.empty()) {
222  storage.pop_back();
223  }
224  return ret;
225 }
ret
prodAgent to be discontinued
const std::complex< double > I
Definition: I.h:8
std::vector< LazyInvoker > methods_
Definition: ExpressionVar.h:64

Member Data Documentation

◆ methods_

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

Definition at line 64 of file ExpressionVar.h.

Referenced by value().