CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
 VariableComputerTest (const CachingVariable::CachingVariableFactoryArg &arg)
 
 ~VariableComputerTest ()
 
- Public Member Functions inherited from VariableComputer
void assign (std::string var, double &value) const
 
void declare (std::string var)
 
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)
 
virtual ~VariableComputer ()
 

Additional Inherited Members

- Protected Attributes inherited from VariableComputer
const
CachingVariable::CachingVariableFactoryArg
arg_
 
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)

Definition at line 93 of file CachingVariable.cc.

References VariableComputer::declare().

93  : VariableComputer(arg){
94  declare("toto");
95  declare("tutu");
96  declare("much");
97 }
VariableComputer(const CachingVariable::CachingVariableFactoryArg &arg)
void declare(std::string var)
VariableComputerTest::~VariableComputerTest ( )
inline

Definition at line 172 of file CachingVariable.h.

172 {};

Member Function Documentation

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

Implements VariableComputer.

Definition at line 99 of file CachingVariable.cc.

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

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