CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTDynamicPrescaler.cc
Go to the documentation of this file.
5 
6 class HLTDynamicPrescaler : public HLTFilter {
7 public:
10 
11  bool filter(edm::Event & event, edm::EventSetup const & setup);
12  void endJob();
13 
14 private:
15  unsigned int m_count; // event counter
16  unsigned int m_scale; // accept one event every m_scale, which will change dynamically
17 };
18 
20  m_count(0),
21  m_scale(1) {
22 }
23 
25 }
26 
28  ++m_count;
29 
30  if (m_count % m_scale)
31  return false;
32 
33  if (m_count == m_scale * 10)
34  m_scale = m_count;
35 
36  return true;
37 }
38 
40 }
41 
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool filter(edm::Event &event, edm::EventSetup const &setup)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
HLTDynamicPrescaler(edm::ParameterSet const &configuration)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")