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>
72 srcToken_(consumes<TColl>(cfg.
template getParameter<
edm::InputTag>(
"src"))),
85 converter_.beginFirstRun(es);
95 std::unique_ptr<CColl> cands(
new CColl);
97 size_t size = src->size();
100 if(selector_((*src)[
idx]))
Master< F > master(const F &f)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &evt, const edm::EventSetup &es) override
process one event
def create(alignables, pedeDump, additionalData, outputFile, config)
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
size_t index(size_t i) const
def template(fileName, svg, replaceme="REPLACEME")
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