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>
95 std::unique_ptr<CColl> cands(
new CColl);
97 size_t size = src->size();
99 for(
size_t idx = 0; idx !=
size; ++ idx) {
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
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)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Conv converter_
converter helper
size_t index(size_t i) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Selector selector_
selector
Functor that operates on <T>
static void create(size_t idx, CColl &cands, const Comp &components, Conv &converter)
~CandidateProducer()
destructor
edm::EDGetTokenT< TColl > srcToken_
label of source collection and tag
volatile std::atomic< bool > shutdown_flag false
edm::OwnVector< Candidate > CandidateCollection
collection of Candidate objects
tuple size
Write out results.