CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GetJetsFromHLTobject.cc
Go to the documentation of this file.
4 
5 #include "GetJetsFromHLTobject.h"
6 
8  m_jets( iConfig.getParameter<edm::InputTag>("jets") )
9 {
10  produces<reco::CaloJetCollection>();
11 }
12 
13 
14 void
16 {
17  using namespace edm;
18  using namespace reco;
19  std::auto_ptr<reco::CaloJetCollection> jets( new reco::CaloJetCollection() );
20 
22  iEvent.getByLabel(m_jets, hltObject);
23  std::vector<reco::CaloJetRef> refs;
24  hltObject->getObjects( trigger::TriggerBJet, refs );
25  for (size_t i = 0; i < refs.size(); i++) {
26  jets->push_back(* refs[i]);
27  }
28 
29  iEvent.put(jets);
30 }
int i
Definition: DBlmapReader.cc:9
GetJetsFromHLTobject(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:243
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects