CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LSNumberFilter.cc
Go to the documentation of this file.
1 //#include "FWCore/Framework/interface/Frameworkfwd.h"
3 
9 
12 
13 
14 
15 //
16 // class declaration
17 //
18 
19 
20 
21 class LSNumberFilter : public edm::EDFilter {
22 public:
23  explicit LSNumberFilter(const edm::ParameterSet&);
25 
26 private:
27 
28  virtual void beginJob() override ;
29  virtual bool filter(edm::Event&, const edm::EventSetup&) override;
30  virtual void endJob() override ;
31 
32  unsigned int minLS;
33 };
34 
35 
36 
38  minLS(iConfig.getUntrackedParameter<unsigned>("minLS",21))
39 {}
40 
41 
43 {
44 
45  // do anything here that needs to be done at desctruction time
46  // (e.g. close files, deallocate resources etc.)
47 
48 }
49 
50 
51 //
52 // member functions
53 //
54 
55 // ------------ method called on each new Event ------------
57  const edm::EventSetup& iSetup) {
58 
59  if(iEvent.luminosityBlock() < minLS) return false;
60 
61  return true;
62 
63 }
64 
65 // ------------ method called once each job just before starting event loop ------------
66 void
68 {}
69 
70 // ------------ method called once each job just after ending the event loop ------------
71 void
73 }
74 
75 //define this as a plug-in
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
virtual void beginJob() override
unsigned int minLS
virtual void endJob() override
int iEvent
Definition: GenABIO.cc:230
LSNumberFilter(const edm::ParameterSet &)
virtual bool filter(edm::Event &, const edm::EventSetup &) override