CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TValidationEventFilter.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1TValidationEventFilter
4 // Class: L1TValidationEventFilter
5 //
12 //
13 // Original Author: Jim Brooke
14 // Created:
15 //
16 //
17 
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
24 
30 
31 #include <string>
32 #include <iostream>
33 
37 
38 
39 //
40 // class declaration
41 //
42 
44 public:
46  virtual ~L1TValidationEventFilter();
47 
48 private:
49  virtual void beginJob() override ;
50  virtual bool filter(edm::Event&, const edm::EventSetup&) override;
51  virtual void endJob() override ;
52 
53  // ----------member data ---------------------------
54 
55  int period_;
56 
57  // edm::EDGetTokenT<FEDRawDataCollection> token_;
58 
59 };
60 
61 
62 //
63 // constructors and destructor
64 //
66  period_( iConfig.getUntrackedParameter<int>("period", 107) )
67 {
68  //now do what ever initialization is needed
69 
70 }
71 
72 
74 {
75 
76  // do anything here that needs to be done at desctruction time
77  // (e.g. close files, deallocate resources etc.)
78 
79 }
80 
81 
82 //
83 // member functions
84 //
85 
86 // ------------ method called on each new Event ------------
87 bool
89 {
90  using namespace edm;
91 
92  return ((iEvent.id().event() % period_)==0);
93 
94 }
95 
96 // ------------ method called once each job just before starting event loop ------------
97 void
99 {
100 
101 }
102 
103 // ------------ method called once each job just after ending the event loop ------------
104 void
106 
107 }
108 
109 //define this as a plug-in
EventNumber_t event() const
Definition: EventID.h:41
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
int iEvent
Definition: GenABIO.cc:230
virtual void endJob() override
L1TValidationEventFilter(const edm::ParameterSet &)
virtual bool filter(edm::Event &, const edm::EventSetup &) override
virtual void beginJob() override
edm::EventID id() const
Definition: EventBase.h:60