ProcessingCut.cc

00001 #include "ProcessingCut.hh"
00002  
00003 ProcessingCut::ProcessingCut(const std::string& cut_name, 
00004                              const std::string helptext) :
00005   ParameterList(cut_name, helptext), _cut_name(cut_name)
00006 {
00007   RegisterParameter("default_pass", default_pass = true, 
00008                     "Do we require all channels to pass for the event to pass (false) or only one (true)?");
00009 }
00010 
00011 
00012 bool ProcessingCut::Process(EventDataPtr event)
00013 {
00014   bool pass_once = false;
00015   for(size_t i=0; i < event->channels.size(); i++){
00016     bool pass = ProcessChannel(&(event->channels[i]));
00017     if( pass && default_pass ) return true;
00018     if( !pass && !default_pass ) return false;
00019     if(pass) pass_once = true;
00020   }
00021   return pass_once;
00022 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1