#include <ObjectSelector.h>
Inherits Reflex::Base.
Public Member Functions | |
ObjectSelector (const edm::ParameterSet &cfg) | |
constructor | |
virtual | ~ObjectSelector () |
destructor | |
Private Member Functions | |
bool | filter (edm::Event &evt, const edm::EventSetup &es) |
process one event | |
Private Attributes | |
bool | filter_ |
filter event | |
PostProcessor | postProcessor_ |
post processor | |
Selector | selector_ |
Object collection selector. | |
SizeSelector | sizeSelector_ |
selected object collection size selector | |
edm::InputTag | src_ |
source collection label |
selects a subset of a collection.
Definition at line 38 of file ObjectSelector.h.
ObjectSelector< Selector, OutputCollection, SizeSelector, PostProcessor, StoreManager, Base, Init >::ObjectSelector | ( | const edm::ParameterSet & | cfg | ) | [inline, explicit] |
constructor
Definition at line 41 of file ObjectSelector.h.
: Base(cfg), src_(cfg.template getParameter<edm::InputTag>("src")), filter_(false), selector_(cfg), sizeSelector_(reco::modules::make<SizeSelector>(cfg)), postProcessor_(cfg) { const std::string filter("filter"); std::vector<std::string> bools = cfg.template getParameterNamesForType<bool>(); bool found = std::find(bools.begin(), bools.end(), filter) != bools.end(); if (found) filter_ = cfg.template getParameter<bool>(filter); postProcessor_.init(* this); }
virtual ObjectSelector< Selector, OutputCollection, SizeSelector, PostProcessor, StoreManager, Base, Init >::~ObjectSelector | ( | ) | [inline, virtual] |
bool ObjectSelector< Selector, OutputCollection, SizeSelector, PostProcessor, StoreManager, Base, Init >::filter | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [inline, private] |
process one event
Definition at line 59 of file ObjectSelector.h.
{ Init::init(selector_, evt, es); using namespace std; edm::Handle<typename Selector::collection> source; evt.getByLabel(src_, source); StoreManager manager(source); selector_.select(source, evt, es); manager.cloneAndStore(selector_.begin(), selector_.end(), evt); bool result = (! filter_ || sizeSelector_(manager.size())); edm::OrphanHandle<OutputCollection> filtered = manager.put(evt); postProcessor_.process(filtered, evt); return result; }
bool ObjectSelector< Selector, OutputCollection, SizeSelector, PostProcessor, StoreManager, Base, Init >::filter_ [private] |
filter event
Definition at line 75 of file ObjectSelector.h.
Referenced by ObjectSelector< SingleElementCollectionSelector< InputCollection, Selector, reco::CandidateCollection, StoreContainer, RefAdder >, reco::CandidateCollection, NonNullNumberSelector >::filter(), and ObjectSelector< SingleElementCollectionSelector< InputCollection, Selector, reco::CandidateCollection, StoreContainer, RefAdder >, reco::CandidateCollection, NonNullNumberSelector >::ObjectSelector().
PostProcessor ObjectSelector< Selector, OutputCollection, SizeSelector, PostProcessor, StoreManager, Base, Init >::postProcessor_ [private] |
post processor
Definition at line 81 of file ObjectSelector.h.
Referenced by ObjectSelector< SingleElementCollectionSelector< InputCollection, Selector, reco::CandidateCollection, StoreContainer, RefAdder >, reco::CandidateCollection, NonNullNumberSelector >::filter(), and ObjectSelector< SingleElementCollectionSelector< InputCollection, Selector, reco::CandidateCollection, StoreContainer, RefAdder >, reco::CandidateCollection, NonNullNumberSelector >::ObjectSelector().
Selector ObjectSelector< Selector, OutputCollection, SizeSelector, PostProcessor, StoreManager, Base, Init >::selector_ [private] |
Object collection selector.
Definition at line 77 of file ObjectSelector.h.
SizeSelector ObjectSelector< Selector, OutputCollection, SizeSelector, PostProcessor, StoreManager, Base, Init >::sizeSelector_ [private] |
selected object collection size selector
Definition at line 79 of file ObjectSelector.h.
edm::InputTag ObjectSelector< Selector, OutputCollection, SizeSelector, PostProcessor, StoreManager, Base, Init >::src_ [private] |
source collection label
Definition at line 73 of file ObjectSelector.h.