CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalHPDFilter.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalHPDFilter
4 // Class: HcalHPDFilter
5 //
13 //
14 // Original Author: Efe Yazgan
15 // Created: Thu Jul 24 10:31:07 CEST 2008
16 // $Id: HcalHPDFilter.cc,v 1.2 2009/12/18 00:03:10 wmtan Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
27 
30 
32 
34 
35 //
36 // class declaration
37 //
38 
39 class HcalHPDFilter : public edm::EDFilter {
40  public:
41  explicit HcalHPDFilter(const edm::ParameterSet&);
43 
44  private:
45  virtual void beginJob() override ;
46  virtual bool filter(edm::Event&, const edm::EventSetup&) override;
47  virtual void endJob() override ;
48 
49  // ----------member data ---------------------------
50 };
51 
52 //
53 // constants, enums and typedefs
54 //
55 
56 //
57 // static data member definitions
58 //
59 
60 //
61 // constructors and destructor
62 //
64 {
65  //now do what ever initialization is needed
66 
67 }
68 
69 
71 {
72 
73 }
74 
75 
76 //
77 // member functions
78 //
79 
80 // ------------ method called on each new Event ------------
81 bool
83 {
84  using namespace edm;
85 
87  iEvent.getByLabel("hbhereco", hbhe);
88  const HBHERecHitCollection Hithbhe = *(hbhe.product());
89 
90  for (HBHERecHitCollection::const_iterator hhit=Hithbhe.begin(); hhit!=Hithbhe.end(); hhit++) {
91  if (hhit->energy() > 5.) return true;
92  }
93  return false;
94 }
95 
96 // ------------ method called once each job just before starting event loop ------------
97 void
99 {
100 }
101 
102 // ------------ method called once each job just after ending the event loop ------------
103 void
105 }
106 
107 //define this as a plug-in
virtual void beginJob() override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< HBHERecHit >::const_iterator const_iterator
int iEvent
Definition: GenABIO.cc:230
virtual bool filter(edm::Event &, const edm::EventSetup &) override
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
HcalHPDFilter(const edm::ParameterSet &)
virtual void endJob() override