CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GetJetsFromHLTobject Class Reference

#include <GetJetsFromHLTobject.h>

Inheritance diagram for GetJetsFromHLTobject:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 GetJetsFromHLTobject (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::InputTag m_jets
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Description: HLT algorithms produced trigger::TriggerFilterObjectWithRefs containing the jets etc. that caused the trigger to fire. This class gets these jets and stores references to them directly in the event in a RefVector.

Implementation: <Notes on="" implementation>="">

Definition at line 32 of file GetJetsFromHLTobject.h.

Constructor & Destructor Documentation

GetJetsFromHLTobject::GetJetsFromHLTobject ( const edm::ParameterSet iConfig)
explicit

Definition at line 7 of file GetJetsFromHLTobject.cc.

7  :
8  m_jets( iConfig.getParameter<edm::InputTag>("jets") )
9 {
10  produces<reco::CaloJetCollection>();
11 }
T getParameter(std::string const &) const

Member Function Documentation

void GetJetsFromHLTobject::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 15 of file GetJetsFromHLTobject.cc.

References edm::Event::getByLabel(), i, analyzePatCleaning_cfg::jets, m_jets, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, and trigger::TriggerBJet.

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
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:355
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects

Member Data Documentation

edm::InputTag GetJetsFromHLTobject::m_jets
private

Definition at line 38 of file GetJetsFromHLTobject.h.

Referenced by produce().