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 169 of file CachingVariable.h.

Constructor & Destructor Documentation

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

Definition at line 90 of file CachingVariable.cc.

References VariableComputer::declare().

90  : VariableComputer(arg, iC){
91  declare("toto", iC);
92  declare("tutu", iC);
93  declare("much", iC);
94 }
VariableComputer(const CachingVariable::CachingVariableFactoryArg &arg, edm::ConsumesCollector &iC)
void declare(std::string var, edm::ConsumesCollector &iC)
VariableComputerTest::~VariableComputerTest ( )
inlineoverride

Definition at line 172 of file CachingVariable.h.

References bookConverter::compute(), and iEvent.

172 {};

Member Function Documentation

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

Implements VariableComputer.

Definition at line 96 of file CachingVariable.cc.

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

96  {
97  //does some mumbo jumbo with the event.
98  // computes a bunch of doubles
99  double toto = 3;
100  double tutu = 4;
101 
102  //set the variables value (which do as if they had been cached)
103  assign("toto",toto);
104  assign("tutu",tutu);
105  doesNotCompute("much");
106 }
void assign(std::string var, double &value) const
void doesNotCompute() const