File indexing completed on 2023-03-17 11:16:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "FWCore/Utilities/interface/Exception.h"
0015
0016 #include "PhysicsTools/MVAComputer/interface/VarProcessor.h"
0017 #include "PhysicsTools/MVAComputer/interface/Calibration.h"
0018
0019 using namespace PhysicsTools;
0020
0021 namespace {
0022
0023 class ProcCount : public VarProcessor {
0024 public:
0025 typedef VarProcessor::Registry::Registry<ProcCount, Calibration::ProcCount> Registry;
0026
0027 ProcCount(const char *name, const Calibration::ProcCount *calib, const MVAComputer *computer);
0028 ~ProcCount() override {}
0029
0030 void configure(ConfIterator iter, unsigned int n) override;
0031 void eval(ValueIterator iter, unsigned int n) const override;
0032 };
0033
0034 ProcCount::Registry registry("ProcCount");
0035
0036 ProcCount::ProcCount(const char *name, const Calibration::ProcCount *calib, const MVAComputer *computer)
0037 : VarProcessor(name, calib, computer) {}
0038
0039 void ProcCount::configure(ConfIterator iter, unsigned int n) {
0040 while (iter)
0041 iter++(Variable::FLAG_ALL) << Variable::FLAG_NONE;
0042 }
0043
0044 void ProcCount::eval(ValueIterator iter, unsigned int n) const {
0045 while (iter) {
0046 unsigned int count = iter.size();
0047 iter(count);
0048 iter++;
0049 }
0050 }
0051
0052 }