#include #include #include using namespace RAT; void ClassifierCutProc::SetD( const std::string& param, const double value ) { if( param == "value" ) fValue = value; else throw ParamUnknown( param ); } void ClassifierCutProc::SetS( const std::string& param, const std::string& value ) { if( param == "classifier" ) fClassifier = value; else if( param == "classification" ) fClassification = value; else throw ParamUnknown( param ); } Processor::Result ClassifierCutProc::DSEvent( DS::Run&, DS::Entry& ds ) { if( ds.GetEVCount() != 1 ) return Processor::FAIL; try { if( ds.GetEV(0).GetClassifierResult( fClassifier ).GetClassification( fClassification ) <= fValue ) return Processor::OKTRUE; else return Processor::OKFALSE; } catch( DS::DataNotFound& ) { return Processor::FAIL; } }