CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLTDynamicPrescaler.cc
Go to the documentation of this file.
7 
9 public:
11  ~HLTDynamicPrescaler() override;
12  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
13  bool filter(edm::Event& event, edm::EventSetup const& setup) override;
14 
15 private:
16  unsigned int m_count; // event counter
17  unsigned int m_scale; // accept one event every m_scale, which will change dynamically
18 };
19 
21 
23 
26  desc.add<bool>("saveTags", false);
27  descriptions.add("hltDynamicPrescaler", desc);
28 }
29 
31  ++m_count;
32 
33  if (m_count % m_scale)
34  return false;
35 
36  if (m_count == m_scale * 10)
37  m_scale = m_count;
38 
39  return true;
40 }
41 
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
~HLTDynamicPrescaler() override
bool filter(edm::Event &event, edm::EventSetup const &setup) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HLTDynamicPrescaler(edm::ParameterSet const &configuration)