CMS 3D CMS Logo

PhysicsTools::Interceptor Class Reference

Inheritance diagram for PhysicsTools::Interceptor:

PhysicsTools::VarProcessor PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::Factory

List of all members.

Public Types

typedef
VarProcessor::Registry::Registry
< Interceptor,
Calibration::Interceptor
Registry

Public Member Functions

virtual void configure (ConfIterator iter, unsigned int n)
 virtual configure method, implemented in actual processor
virtual void eval (ValueIterator iter, unsigned int n) const
 virtual evaluation method, implemented in actual processor
 Interceptor (const char *name, const Calibration::Interceptor *calib, const MVAComputer *computer)
virtual ~Interceptor ()

Private Attributes

Calibration::Interceptorinterceptor
std::vector< double > * values


Detailed Description

Definition at line 26 of file Interceptor.cc.


Member Typedef Documentation

typedef VarProcessor::Registry::Registry<Interceptor, Calibration::Interceptor> PhysicsTools::Interceptor::Registry

Reimplemented from PhysicsTools::VarProcessor.

Definition at line 29 of file Interceptor.cc.


Constructor & Destructor Documentation

PhysicsTools::Interceptor::Interceptor ( const char *  name,
const Calibration::Interceptor calib,
const MVAComputer computer 
)

Definition at line 46 of file Interceptor.cc.

00048                                                       :
00049         VarProcessor(name, calib, computer),
00050         interceptor(const_cast<Calibration::Interceptor*>(calib)),
00051         values(0)
00052 {
00053 }

PhysicsTools::Interceptor::~Interceptor (  )  [virtual]

Definition at line 55 of file Interceptor.cc.

References values.

00056 {
00057         delete[] values;
00058 }


Member Function Documentation

void PhysicsTools::Interceptor::configure ( ConfIterator  iter,
unsigned int  n 
) [virtual]

virtual configure method, implemented in actual processor

Implements PhysicsTools::VarProcessor.

Definition at line 60 of file Interceptor.cc.

References PhysicsTools::VarProcessor::computer, PhysicsTools::Calibration::Interceptor::configure(), PhysicsTools::Variable::FLAG_NONE, flags, i, interceptor, and values.

00061 {
00062         std::vector<Variable::Flags> flags;
00063         for(ConfIterator iter2 = iter; iter2; iter2++)
00064                 flags.push_back(*iter2);
00065 
00066         flags = interceptor->configure(computer, n, flags);
00067         if (flags.size() != n)
00068                 return;
00069 
00070         for(unsigned int i = 0; i < n; i++)
00071                 iter++(flags[i]);
00072 
00073         iter << Variable::FLAG_NONE;
00074 
00075         values = new std::vector<double>[n];
00076 }

void PhysicsTools::Interceptor::eval ( ValueIterator  iter,
unsigned int  n 
) const [virtual]

virtual evaluation method, implemented in actual processor

Implements PhysicsTools::VarProcessor.

Definition at line 78 of file Interceptor.cc.

References PhysicsTools::VarProcessor::ValueIterator::begin(), edmNew::copy(), PhysicsTools::VarProcessor::ValueIterator::end(), i, PhysicsTools::Calibration::Interceptor::intercept(), interceptor, iter, PhysicsTools::VarProcessor::ValueIterator::size(), and values.

00079 {
00080         std::vector<double> *var = values;
00081 
00082         for(unsigned int i = 0; i < n; i++) {
00083                 var->resize(iter.size());
00084                 std::copy(iter.begin(), iter.end(), var->begin());
00085                 iter++;
00086                 var++;
00087         }
00088 
00089         interceptor->intercept(values);
00090 
00091         iter(0.0);
00092 }


Member Data Documentation

Calibration::Interceptor* PhysicsTools::Interceptor::interceptor [private]

Definition at line 40 of file Interceptor.cc.

Referenced by configure(), and eval().

std::vector<double>* PhysicsTools::Interceptor::values [private]

Definition at line 41 of file Interceptor.cc.

Referenced by configure(), eval(), and ~Interceptor().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:50:08 2009 for CMSSW by  doxygen 1.5.4