CMS 3D CMS Logo

ObjectCountEventSelector.h
Go to the documentation of this file.
1 #ifndef CommonTools_UtilAlgos_ObjectCountEventSelector_h
2 #define CommonTools_UtilAlgos_ObjectCountEventSelector_h
3 
23 
24 template<typename C,
25  typename S = AnySelector,
26  typename N = MinNumberSelector,
27  typename CS = typename helper::CollectionFilterTrait<C, S, N>::type>
29 {
30  public:
33  srcToken_( iC.consumes<C>(cfg.template getParameter<edm::InputTag>( "src" ) ) ),
34  select_( reco::modules::make<S>( cfg, iC ) ),
35  sizeSelect_( reco::modules::make<N>( cfg, iC ) ) {
36  }
37 
38  bool operator()(edm::Event& evt, const edm::EventSetup&) const {
40  evt.getByToken( srcToken_, source );
41  return CS::filter( * source, select_, sizeSelect_ );
42  }
43 
44  private:
47 
50 
53 };
54 
55 #endif
56 
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
ObjectCountEventSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
constructor
S make(const edm::ParameterSet &cfg)
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:520
#define N
Definition: blowfish.cc:9
N sizeSelect_
minimum number of entries in a collection
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:99
fixed size matrix
HLT enums.
bool operator()(edm::Event &evt, const edm::EventSetup &) const
static std::string const source
Definition: EdmProvDump.cc:43
edm::EDGetTokenT< C > srcToken_
source collection label