#include <memory>
#include <string>
#include <vector>
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/Common/interface/View.h"
#include "DataFormats/EgammaReco/interface/SuperCluster.h"
: input_barrel_(config.getParameter<
edm::InputTag>(
"inputBarrel")),
input_endcap_(config.getParameter<
edm::InputTag>(
"inputEndcap")),
branch_(config.getParameter<
std::string>(
"branch")) {
consumes<edm::View<reco::SuperCluster>>(input_barrel_);
consumes<edm::View<reco::SuperCluster>>(input_endcap_);
scs_ = new std::vector<ic::SuperCluster>();
}
void ICSuperClusterProducer::produce(edm::Event& event,
const edm::EventSetup& setup) {
edm::Handle<edm::View<reco::SuperCluster> > sc_b_handle;
edm::Handle<edm::View<reco::SuperCluster> > sc_e_handle;
event.getByLabel(input_barrel_, sc_b_handle);
event.getByLabel(input_endcap_, sc_e_handle);
scs_->clear();
scs_->resize(sc_b_handle->size() + sc_e_handle->size());
for (unsigned i = 0; i < sc_b_handle->size(); ++i) {
reco::SuperCluster const& src = sc_b_handle->at(i);
dest.
set_id(sc_hasher_(&src));
}
for (unsigned i = 0; i < sc_e_handle->size(); ++i) {
reco::SuperCluster const& src = sc_e_handle->at(i);
dest.
set_id(sc_hasher_(&src));
}
}
void ICSuperClusterProducer::beginJob() {
}
void ICSuperClusterProducer::endJob() {}