34 produces<EcalRecHitCollection>(OutputLabelES_);
52 if (debug_)
std::cout <<
" ESRecHitMerger : Run " << e.
id().
run() <<
" Event " << e.
id().
event() << std::endl;
55 std::vector< edm::Handle<ESRecHitCollection> > EcalRecHits_done;
61 unsigned int nColl = EcalRecHits_done.size();
66 for (
unsigned int i=0;
i < nColl;
i++) {
68 std::string
instance = EcalRecHits_done[
i].provenance()->productInstanceName();
69 std::string module_label = EcalRecHits_done[
i].provenance()->moduleLabel();
73 std::cout<<
"ESrechit to be merged from "<<module_label.c_str()<<
" "<<instance.c_str()<<std::endl;
76 if ( module_label != EgammaSourceES_.label() &&
77 module_label != MuonsSourceES_.label() &&
78 module_label != JetsSourceES_.label() &&
79 module_label != TausSourceES_.label() &&
80 module_label != RestSourceES_.label() &&
81 module_label != Pi0SourceES_.label() &&
82 module_label != EtaSourceES_.label())
continue;
84 if (instance == InputRecHitES_) {
85 nES += EcalRecHits_done[
i] ->
size();
91 ESMergedRecHits -> reserve(nES);
93 if (debug_)
std::cout <<
" Number of ES Rechits to merge = " << nES << std::endl;
95 for (
unsigned int i=0;
i < nColl;
i++) {
96 std::string
instance = EcalRecHits_done[
i].provenance()->productInstanceName();
98 std::string module_label = EcalRecHits_done[
i].provenance()->moduleLabel();
99 if ( module_label != EgammaSourceES_.label() &&
100 module_label != MuonsSourceES_.label() &&
101 module_label != JetsSourceES_.label() &&
102 module_label != TausSourceES_.label() &&
103 module_label != RestSourceES_.label() &&
104 module_label != Pi0SourceES_.label() &&
105 module_label != EtaSourceES_.label() )
continue;
107 if (instance == InputRecHitES_) {
109 ESMergedRecHits -> push_back(*it);
117 e.
put(ESMergedRecHits,OutputLabelES_);
void getManyByType(std::vector< Handle< PROD > > &results) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
static PFTauRenderPlugin instance
std::vector< EcalRecHit >::const_iterator const_iterator
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual ~ESRecHitsMerger()
void produce(edm::Event &e, const edm::EventSetup &c)
ESRecHitsMerger(const edm::ParameterSet &pset)
tuple size
Write out results.