#include #include #include using namespace RAT; void SecondaryNhitsProc::SetI( const std::string& param, const int value ) { if( param == "nhit" ) if( value >= 0 ) fMaxNHits = value; else throw ParamInvalid( param, "nhit value must be >= 0" ); else throw ParamUnknown( param ); } Processor::Result SecondaryNhitsProc::DSEvent( DS::Run&, DS::Entry& ds ) { if( ds.GetEVCount()<2 || (ds.GetEVCount() > 1 && ds.GetEV( 1 ).GetNhits() <= fMaxNHits) ) // No secondary or secondary hits are <= set value return Processor::OKTRUE; else return Processor::OKFALSE; }