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
ObjectCountEventSelector< C, S, N, CS > Class Template Reference

#include <ObjectCountEventSelector.h>

Inheritance diagram for ObjectCountEventSelector< C, S, N, CS >:
EventSelectorBase

Public Member Functions

 ObjectCountEventSelector (const edm::ParameterSet &cfg)
 constructor More...
 
bool operator() (edm::Event &evt, const edm::EventSetup &)
 
- Public Member Functions inherited from EventSelectorBase
 EventSelectorBase ()
 
virtual ~EventSelectorBase ()
 

Private Attributes

select_
 object filter More...
 
sizeSelect_
 minimum number of entries in a collection More...
 
edm::InputTag src_
 source collection label More...
 

Detailed Description

template<typename C, typename S = AnySelector, typename N = MinNumberSelector, typename CS = typename helper::CollectionFilterTrait<C, S, N>::type>
class ObjectCountEventSelector< C, S, N, CS >

Selects an event if a collection has at least N entries

Author
Luca Lista, INFN
Version
Revision:
1.1
Id:
ObjectCountEventSelector.h,v 1.1 2009/03/03 13:07:27 llista Exp

Definition at line 27 of file ObjectCountEventSelector.h.

Constructor & Destructor Documentation

template<typename C , typename S = AnySelector, typename N = MinNumberSelector, typename CS = typename helper::CollectionFilterTrait<C, S, N>::type>
ObjectCountEventSelector< C, S, N, CS >::ObjectCountEventSelector ( const edm::ParameterSet cfg)
inlineexplicit

constructor

Definition at line 31 of file ObjectCountEventSelector.h.

31  :
32  src_( cfg.template getParameter<edm::InputTag>( "src" ) ),
33  select_( reco::modules::make<S>( cfg ) ),
34  sizeSelect_( reco::modules::make<N>( cfg ) ) {
35  }
N sizeSelect_
minimum number of entries in a collection
edm::InputTag src_
source collection label

Member Function Documentation

template<typename C , typename S = AnySelector, typename N = MinNumberSelector, typename CS = typename helper::CollectionFilterTrait<C, S, N>::type>
bool ObjectCountEventSelector< C, S, N, CS >::operator() ( edm::Event evt,
const edm::EventSetup  
)
inlinevirtual

Implements EventSelectorBase.

Definition at line 37 of file ObjectCountEventSelector.h.

References align_tpl::filter, edm::Event::getByLabel(), ObjectCountEventSelector< C, S, N, CS >::select_, ObjectCountEventSelector< C, S, N, CS >::sizeSelect_, LaserTracksInput_cfi::source, and ObjectCountEventSelector< C, S, N, CS >::src_.

37  {
39  evt.getByLabel( src_, source );
40  return CS::filter( * source, select_, sizeSelect_ );
41  }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
N sizeSelect_
minimum number of entries in a collection
tuple filter
USE THIS FOR SKIMMED TRACKS process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter2) OTHERWISE USE THIS.
Definition: align_tpl.py:86
edm::InputTag src_
source collection label

Member Data Documentation

template<typename C , typename S = AnySelector, typename N = MinNumberSelector, typename CS = typename helper::CollectionFilterTrait<C, S, N>::type>
S ObjectCountEventSelector< C, S, N, CS >::select_
private

object filter

Definition at line 48 of file ObjectCountEventSelector.h.

Referenced by ObjectCountEventSelector< C, S, N, CS >::operator()().

template<typename C , typename S = AnySelector, typename N = MinNumberSelector, typename CS = typename helper::CollectionFilterTrait<C, S, N>::type>
N ObjectCountEventSelector< C, S, N, CS >::sizeSelect_
private

minimum number of entries in a collection

Definition at line 51 of file ObjectCountEventSelector.h.

Referenced by ObjectCountEventSelector< C, S, N, CS >::operator()().

template<typename C , typename S = AnySelector, typename N = MinNumberSelector, typename CS = typename helper::CollectionFilterTrait<C, S, N>::type>
edm::InputTag ObjectCountEventSelector< C, S, N, CS >::src_
private

source collection label

Definition at line 45 of file ObjectCountEventSelector.h.

Referenced by ObjectCountEventSelector< C, S, N, CS >::operator()().