CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EDFilter.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: __subsys__/__pkgname__
4 // Class: __class__
5 //
13 //
14 // Original Author: __author__
15 // Created: __date__
16 //
17 //
18 
19 
20 // system include files
21 #include <memory>
22 
23 // user include files
26 
29 
32 
33 //
34 // class declaration
35 //
36 
37 class __class__ : public edm::stream::EDFilter<> {
38  public:
39  explicit __class__(const edm::ParameterSet&);
40  ~__class__();
41 
42  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
43 
44  private:
45  virtual void beginStream(edm::StreamID) override;
46  virtual bool filter(edm::Event&, const edm::EventSetup&) override;
47  virtual void endStream() override;
48 
49  //virtual void beginRun(edm::Run const&, edm::EventSetup const&) override;
50  //virtual void endRun(edm::Run const&, edm::EventSetup const&) override;
51  //virtual void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
52  //virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
53 
54  // ----------member data ---------------------------
55 };
56 
57 //
58 // constants, enums and typedefs
59 //
60 
61 //
62 // static data member definitions
63 //
64 
65 //
66 // constructors and destructor
67 //
69 {
70  //now do what ever initialization is needed
71 
72 }
73 
74 
76 {
77 
78  // do anything here that needs to be done at destruction time
79  // (e.g. close files, deallocate resources etc.)
80 
81 }
82 
83 
84 //
85 // member functions
86 //
87 
88 // ------------ method called on each new Event ------------
89 bool
91 {
92  using namespace edm;
93 #ifdef THIS_IS_AN_EVENT_EXAMPLE
95  iEvent.getByLabel("example",pIn);
96 #endif
97 
98 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
99  ESHandle<SetupData> pSetup;
100  iSetup.get<SetupRecord>().get(pSetup);
101 #endif
102  return true;
103 }
104 
105 // ------------ method called once each stream before processing any runs, lumis or events ------------
106 void
108 {
109 }
110 
111 // ------------ method called once each stream after processing all runs, lumis and events ------------
112 void
114 }
115 
116 // ------------ method called when starting to processes a run ------------
117 /*
118 void
119 __class__::beginRun(edm::Run const&, edm::EventSetup const&)
120 {
121 }
122 */
123 
124 // ------------ method called when ending the processing of a run ------------
125 /*
126 void
127 __class__::endRun(edm::Run const&, edm::EventSetup const&)
128 {
129 }
130 */
131 
132 // ------------ method called when starting to processes a luminosity block ------------
133 /*
134 void
135 __class__::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
136 {
137 }
138 */
139 
140 // ------------ method called when ending the processing of a luminosity block ------------
141 /*
142 void
143 __class__::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
144 {
145 }
146 */
147 
148 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
149 void
151  //The following says we do not know what parameters are allowed so do no validation
152  // Please change this to state exactly what you do use, even if it is no parameters
154  desc.setUnknown();
155  descriptions.addDefault(desc);
156 }
157 //define this as a plug-in
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EDAnalyzer.cc:146
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
__class__()
Definition: Skeleton.cc:30
int iEvent
Definition: GenABIO.cc:230
void addDefault(ParameterSetDescription const &psetDescription)
virtual void endStream() override
Definition: EDFilter.cc:113
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
const T & get() const
Definition: EventSetup.h:56
virtual ~__class__()
Definition: EDAnalyzer.cc:89
virtual bool filter(edm::Event &, const edm::EventSetup &) override
Definition: EDFilter.cc:90
virtual void beginStream(edm::StreamID) override
Definition: EDFilter.cc:107