CMS 3D CMS Logo

List of all members | Public Member Functions
VariableComputerTest Class Reference

#include <CachingVariable.h>

Inheritance diagram for VariableComputerTest:
VariableComputer

Public Member Functions

void compute (const edm::Event &iEvent) const override
 
 VariableComputerTest (const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
 
 ~VariableComputerTest () override
 
- Public Member Functions inherited from VariableComputer
void assign (std::string var, double &value) const
 
void declare (std::string var, edm::ConsumesCollector &iC)
 
void doesNotCompute () const
 
void doesNotCompute (std::string var) const
 
const std::string & name () const
 
bool notSeenThisEventAlready (const edm::Event &iEvent) const
 
 VariableComputer (const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
 
virtual ~VariableComputer ()
 

Additional Inherited Members

- Protected Attributes inherited from VariableComputer
const CachingVariable::CachingVariableFactoryArgarg_
 
edm::Event::CacheIdentifier_t eventCacheID_ = 0
 
std::map< std::string, const ComputedVariable * > iCompute_
 
std::string method_
 
std::string name_
 
std::string separator_
 

Detailed Description

Definition at line 174 of file CachingVariable.h.

Constructor & Destructor Documentation

◆ VariableComputerTest()

VariableComputerTest::VariableComputerTest ( const CachingVariable::CachingVariableFactoryArg arg,
edm::ConsumesCollector iC 
)

Definition at line 101 of file CachingVariable.cc.

103  : VariableComputer(arg, iC) {
104  declare("toto", iC);
105  declare("tutu", iC);
106  declare("much", iC);
107 }

References VariableComputer::declare().

◆ ~VariableComputerTest()

VariableComputerTest::~VariableComputerTest ( )
inlineoverride

Definition at line 177 of file CachingVariable.h.

177 {};

Member Function Documentation

◆ compute()

void VariableComputerTest::compute ( const edm::Event iEvent) const
overridevirtual

Implements VariableComputer.

Definition at line 109 of file CachingVariable.cc.

109  {
110  //does some mumbo jumbo with the event.
111  // computes a bunch of doubles
112  double toto = 3;
113  double tutu = 4;
114 
115  //set the variables value (which do as if they had been cached)
116  assign("toto", toto);
117  assign("tutu", tutu);
118  doesNotCompute("much");
119 }

References VariableComputer::assign(), and VariableComputer::doesNotCompute().

VariableComputer::doesNotCompute
void doesNotCompute() const
Definition: CachingVariable.cc:79
VariableComputer::VariableComputer
VariableComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
Definition: CachingVariable.cc:44
VariableComputer::assign
void assign(std::string var, double &value) const
Definition: CachingVariable.cc:66
VariableComputer::declare
void declare(std::string var, edm::ConsumesCollector &iC)
Definition: CachingVariable.cc:55
funct::arg
A arg
Definition: Factorize.h:36