CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SimpleEventFilter.cc
Go to the documentation of this file.
2 #include <iostream>
3 
4 //
5 // -- Constructor
6 //
8  nInterval_ = pset.getUntrackedParameter<int>( "EventsToSkip", 10 );
9  verbose_ = pset.getUntrackedParameter<bool>( "DebugOn", false );
10  nEvent_ = 0;
11 }
12 //
13 // -- Destructor
14 //
16 }
17 
19  nEvent_++;
20  bool ret = true;
21  if (nEvent_ % nInterval_ != 0) ret = false;
22  if ( verbose_ && !ret) std::cout << ">>> filtering event" << nEvent_ << std::endl;
23  return ret;
24 }
25 
28 
29 
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
SimpleEventFilter(const edm::ParameterSet &)
bool filter(edm::Event &, edm::EventSetup const &)
tuple cout
Definition: gather_cfg.py:121
volatile std::atomic< bool > shutdown_flag false