76 : referenceCollectionTAG(iConfig.getParameter<edm::
InputTag>(
"referenceCollection")),
77 oldreferenceCollectionTAG(iConfig.getParameter<edm::
InputTag>(
"oldreferenceCollection")),
78 inputCollectionTAG(iConfig.getParameter<edm::
InputTag>(
"inputCollection")),
79 outputCollectionName(iConfig.getParameter<std::
string>(
"outputCollection")) {
100 std::vector<value_t> valueVector;
101 auto valueVectorPtr = std::make_unique<Map_t>();
113 for (
unsigned int i = 0;
i < valueMap_itr.size();
i++) {
123 std::cout <<
"Size: " << referenceHandle->size() <<
"\t" << oldreferenceHandle->size() <<
"\t" << inputHandle->size()
124 <<
"\t" << valueVector.size() << std::endl;
126 for (reco::GsfElectronCollection::const_iterator electronNew = referenceHandle->begin();
127 electronNew != referenceHandle->end();
129 for (reco::GsfElectronCollection::const_iterator
electron = oldreferenceHandle->begin();
130 electron != oldreferenceHandle->end();
133 if (
electron->gsfTrack() != electronNew->gsfTrack())
142 std::cout << eleRef->eta() <<
"\t" << eleRef2->eta() <<
"\t" << eleRef->phi() <<
"\t" << eleRef2->phi() <<
"\t"
143 << eleRef->energy() <<
"\t" << eleRef2->energy() <<
"\t" << (eleRef->gsfTrack() == eleRef2->gsfTrack())
144 <<
"\t" << (eleRef == eleRef2) <<
"\t" << (*inputHandle)[eleRef] << std::endl;
146 valueVector.push_back((*inputHandle)[eleRef]);
151 filler.
insert(referenceHandle, valueVector.begin(), valueVector.end());
ValueMapTraslator(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~ValueMapTraslator() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
edm::ValueMap< value_t > Map_t
std::string outputCollectionName
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void addDefault(ParameterSetDescription const &psetDescription)
void produce(edm::Event &, const edm::EventSetup &) override
edm::InputTag inputCollectionTAG
edm::InputTag oldreferenceCollectionTAG
edm::EDGetTokenT< reco::GsfElectronCollection > referenceToken_
edm::EDGetTokenT< reco::GsfElectronCollection > oldreferenceToken_
container::const_iterator begin() const
edm::EDGetTokenT< Map_t > inputToken_
edm::InputTag referenceCollectionTAG