Common base class for variable processors. More...
#include <VarProcessor.h>
Classes | |
class | Config |
Helper class for discriminator computer set-up procedure. More... | |
class | ConfigCtx |
class | ConfIterator |
Iterator to loop over the input/output variable configuration. More... | |
struct | Dummy |
class | LoopCtx |
Hold context information for looping processors. More... | |
struct | ValueIterator |
Public Types | |
enum | LoopStatus { kStop, kNext, kReset, kSkip } |
typedef Dummy * | PluginFunctionPrototype() |
Public Member Functions | |
void | configure (ConfigCtx &config) |
called from the discriminator computer to configure processor More... | |
void | deriv (double *input, int *conf, double *output, int *outConf, int *loop, LoopCtx &ctx, unsigned int offset, unsigned int in, unsigned int out, std::vector< double > &deriv) const |
run the processor evaluation pass on this processor and compute derivatives More... | |
void | eval (double *input, int *conf, double *output, int *outConf, int *loop, LoopCtx &loopCtx, unsigned int offset) const |
run the processor evaluation pass on this processor More... | |
virtual LoopStatus | loop (double *output, int *outConf, unsigned int nOutput, LoopCtx &ctx, unsigned int &nOffset) const |
virtual | ~VarProcessor () |
Public Member Functions inherited from PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::Factory | |
template<> | |
VarProcessor * | create (const char *name, const Calibration::VarProcessor *calib, const MVAComputer *parent) |
template<> | |
TrainProcessor * | create (const char *, const AtomicId *, MVATrainer *) |
template<> | |
TrainProcessor * | create (const char *name, const AtomicId *id, MVATrainer *trainer) |
template<> | |
VarProcessor * | create (const char *, const Calibration::VarProcessor *, const MVAComputer *) |
Protected Types | |
typedef ProcessRegistry< VarProcessor, Calibration::VarProcessor, const MVAComputer > | Registry |
Protected Member Functions | |
virtual void | configure (ConfIterator iter, unsigned int n)=0 |
virtual configure method, implemented in actual processor More... | |
virtual ConfigCtx::Context * | configureLoop (ConfigCtx::Context *ctx, ConfigCtx::iterator begin, ConfigCtx::iterator cur, ConfigCtx::iterator end) |
virtual loop configure method More... | |
virtual std::vector< double > | deriv (ValueIterator iter, unsigned int n) const |
virtual derivative evaluation method, implemented in actual processor More... | |
virtual void | eval (ValueIterator iter, unsigned int n) const =0 |
virtual evaluation method, implemented in actual processor More... | |
VarProcessor (const char *name, const Calibration::VarProcessor *calib, const MVAComputer *computer) | |
Protected Attributes | |
const MVAComputer * | computer |
Private Attributes | |
BitSet | inputVars |
bit set to select the input variables to be passed to this processor More... | |
unsigned int | nInputVars |
Additional Inherited Members | |
Static Public Member Functions inherited from PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::Factory | |
static Base_t * | create (const char *name, const CalibBase_t *calib, Parent_t *parent=0) |
Common base class for variable processors.
This base class for variable processors manages the common interface to the global discriminator class and how the individual variable processors are interconnected.
Definition at line 36 of file VarProcessor.h.
typedef Dummy* PhysicsTools::VarProcessor::PluginFunctionPrototype() |
Definition at line 140 of file VarProcessor.h.
|
protected |
Definition at line 298 of file VarProcessor.h.
|
virtual |
Definition at line 47 of file VarProcessor.cc.
References inputVars, and nInputVars.
|
protected |
Definition at line 38 of file VarProcessor.cc.
void PhysicsTools::VarProcessor::configure | ( | ConfigCtx & | config | ) |
called from the discriminator computer to configure processor
Definition at line 53 of file VarProcessor.cc.
References PhysicsTools::VarProcessor::ConfigCtx::begin(), mps_alisetup::config, configureLoop(), PhysicsTools::VarProcessor::ConfigCtx::ctx, PhysicsTools::VarProcessor::ConfigCtx::end(), inputVars, PhysicsTools::BitSet::iter(), PhysicsTools::VarProcessor::ConfigCtx::loop, loop(), nInputVars, PhysicsTools::VarProcessor::ConfigCtx::size(), and PhysicsTools::BitSet::size().
Referenced by PhysicsTools::MVAComputer::setup().
|
protectedpure virtual |
virtual configure method, implemented in actual processor
Implemented in PhysicsTools::Interceptor.
|
protectedvirtual |
virtual loop configure method
Definition at line 87 of file VarProcessor.cc.
References PhysicsTools::VarProcessor::ConfigCtx::VarProcessor.
Referenced by configure().
void PhysicsTools::VarProcessor::deriv | ( | double * | input, |
int * | conf, | ||
double * | output, | ||
int * | outConf, | ||
int * | loop, | ||
LoopCtx & | ctx, | ||
unsigned int | offset, | ||
unsigned int | in, | ||
unsigned int | out, | ||
std::vector< double > & | deriv | ||
) | const |
run the processor evaluation pass on this processor and compute derivatives
Definition at line 121 of file VarProcessor.cc.
References PhysicsTools::VarProcessor::ConfigCtx::begin(), gather_cfg::cout, PhysicsTools::VarProcessor::ConfigCtx::ctx, relativeConstraints::empty, PhysicsTools::VarProcessor::ConfigCtx::end(), eval(), lumiContext::fill, mps_fire::i, recoMuon::in, input, inputVars, createfilelist::int, PhysicsTools::BitSet::iter(), gen::k, PhysicsTools::VarProcessor::ConfigCtx::loop, funct::m, makeMuonMisalignmentScenario::matrix, gen::n, nInputVars, PFRecoTauDiscriminationByIsolation_cfi::offset, MillePedeFileConverter_cfg::out, convertSQLitetoXML_cfg::output, AlCaHLTBitMon_ParallelJobs::p, lumiQueryAPI::q, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::registerProcess(), PhysicsTools::VarProcessor::ConfigCtx::size(), AlCaHLTBitMon_QueryRunRegistry::string, edm::typeDemangle(), and PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::unregisterProcess().
Referenced by eval(), and PhysicsTools::MVAComputer::DerivContext::eval().
|
inlineprotectedvirtual |
virtual derivative evaluation method, implemented in actual processor
Definition at line 315 of file VarProcessor.h.
|
inline |
run the processor evaluation pass on this processor
Definition at line 117 of file VarProcessor.h.
References deriv(), recoMuon::in, input, inputVars, PhysicsTools::BitSet::iter(), loop(), nInputVars, PFRecoTauDiscriminationByIsolation_cfi::offset, MillePedeFileConverter_cfg::out, and convertSQLitetoXML_cfg::output.
Referenced by deriv(), and PhysicsTools::MVAComputer::EvalContext::eval().
|
protectedpure virtual |
virtual evaluation method, implemented in actual processor
Implemented in PhysicsTools::Interceptor.
|
inlinevirtual |
Definition at line 132 of file VarProcessor.h.
References kStop.
Referenced by configure(), and eval().
|
protected |
Definition at line 320 of file VarProcessor.h.
Referenced by PhysicsTools::Interceptor::configure().
|
private |
bit set to select the input variables to be passed to this processor
Definition at line 324 of file VarProcessor.h.
Referenced by configure(), deriv(), eval(), and ~VarProcessor().
|
private |
Definition at line 325 of file VarProcessor.h.
Referenced by configure(), deriv(), eval(), and ~VarProcessor().