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 Member Functions | Private Attributes
TopDecayChannelFilter< S > Class Template Reference

#include <TopDecayChannelFilter.h>

Inheritance diagram for TopDecayChannelFilter< S >:
edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 TopDecayChannelFilter (const edm::ParameterSet &)
 
 ~TopDecayChannelFilter ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
virtual ~EDFilter ()
 
- 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 Member Functions

virtual bool filter (edm::Event &, const edm::EventSetup &)
 

Private Attributes

bool checkedSrcType_
 
sel_
 
edm::InputTag src_
 
bool useTtGenEvent_
 

Additional Inherited Members

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

Detailed Description

template<typename S>
class TopDecayChannelFilter< S >

Definition at line 9 of file TopDecayChannelFilter.h.

Constructor & Destructor Documentation

template<typename S >
TopDecayChannelFilter< S >::TopDecayChannelFilter ( const edm::ParameterSet cfg)

Definition at line 23 of file TopDecayChannelFilter.h.

23  :
24  src_( cfg.template getParameter<edm::InputTag>( "src" ) ),
25  sel_( cfg ),
27 { }
template<typename S >
TopDecayChannelFilter< S >::~TopDecayChannelFilter ( )

Definition at line 30 of file TopDecayChannelFilter.h.

31 { }

Member Function Documentation

template<typename S >
bool TopDecayChannelFilter< S >::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDFilter.

Definition at line 35 of file TopDecayChannelFilter.h.

References TtGenEvtProducer_cfi::genEvt, edm::Event::getByLabel(), and CfgNavigationSchool_cfi::parts.

36 {
39 
40  if(!checkedSrcType_) {
41  checkedSrcType_ = true;
42  if(iEvent.getByLabel( src_, genEvt )) {
43  useTtGenEvent_ = true;
44  iEvent.getByLabel( src_, genEvt );
45  return sel_( genEvt->particles(), src_.label() );
46  }
47  }
48  else {
49  if(useTtGenEvent_) {
50  iEvent.getByLabel( src_, genEvt );
51  return sel_( genEvt->particles(), src_.label() );
52  }
53  }
54  iEvent.getByLabel( src_,parts );
55  return sel_( *parts, src_.label() );
56 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::string const & label() const
Definition: InputTag.h:25

Member Data Documentation

template<typename S >
bool TopDecayChannelFilter< S >::checkedSrcType_
private

Definition at line 18 of file TopDecayChannelFilter.h.

template<typename S >
S TopDecayChannelFilter< S >::sel_
private

Definition at line 17 of file TopDecayChannelFilter.h.

template<typename S >
edm::InputTag TopDecayChannelFilter< S >::src_
private

Definition at line 16 of file TopDecayChannelFilter.h.

template<typename S >
bool TopDecayChannelFilter< S >::useTtGenEvent_
private

Definition at line 19 of file TopDecayChannelFilter.h.