1 #ifndef RecoAlgos_CandidateProducer_h
2 #define RecoAlgos_CandidateProducer_h
31 template <
typename CColl,
typename Comp,
typename Conv>
35 ref_type ref = components.template getConcreteRef<ref_type>(idx);
36 converter.convert(ref, c);
42 template <
typename CColl,
typename Comp,
typename Conv>
46 ref_type ref = components.template getConcreteRef<ref_type>(idx);
47 converter.convert(ref, *c);
52 template <
typename CColl>
64 template <
typename TColl,
96 ::helper::MasterCollection<TColl>
master(src, evt);
97 std::unique_ptr<CColl>
cands(
new CColl);
99 size_t size = src->size();
100 cands->reserve(size);
101 for (
size_t idx = 0; idx !=
size; ++idx) {
Master< F > master(const F &f)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
void produce(edm::Event &evt, const edm::EventSetup &es) override
process one event
void beginRun(const edm::Run &, const edm::EventSetup &es) override
begin job (first run)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool initialized_
particles initialized?
CandidateProducer(const edm::ParameterSet &cfg)
constructor from parameter set
S make(const edm::ParameterSet &cfg)
static void create(size_t idx, CColl &cands, const Comp &components, Conv &converter)
Conv converter_
converter helper
Selector selector_
selector
Functor that operates on <T>
static void create(size_t idx, CColl &cands, const Comp &components, Conv &converter)
edm::EDGetTokenT< TColl > srcToken_
label of source collection and tag
edm::OwnVector< Candidate > CandidateCollection
collection of Candidate objects
~CandidateProducer() override
destructor
tuple size
Write out results.