#include <HcalNoiseAlgo.h>
Classes | |
struct | twrrefcomp |
Public Member Functions | |
JoinCaloTowerRefVectorsWithoutDuplicates () | |
void | operator() (edm::RefVector< CaloTowerCollection > &v1, const edm::RefVector< CaloTowerCollection > &v2) const |
~JoinCaloTowerRefVectorsWithoutDuplicates () | |
Private Types | |
typedef std::set< edm::Ref < CaloTowerCollection > , twrrefcomp > | twrrefset_t |
Definition at line 158 of file HcalNoiseAlgo.h.
typedef std::set< edm::Ref<CaloTowerCollection>, twrrefcomp> JoinCaloTowerRefVectorsWithoutDuplicates::twrrefset_t [private] |
Definition at line 174 of file HcalNoiseAlgo.h.
JoinCaloTowerRefVectorsWithoutDuplicates::JoinCaloTowerRefVectorsWithoutDuplicates | ( | ) | [inline] |
Definition at line 161 of file HcalNoiseAlgo.h.
{}
JoinCaloTowerRefVectorsWithoutDuplicates::~JoinCaloTowerRefVectorsWithoutDuplicates | ( | ) | [inline] |
Definition at line 162 of file HcalNoiseAlgo.h.
{}
void JoinCaloTowerRefVectorsWithoutDuplicates::operator() | ( | edm::RefVector< CaloTowerCollection > & | v1, |
const edm::RefVector< CaloTowerCollection > & | v2 | ||
) | const |
Definition at line 240 of file HcalNoiseAlgo.cc.
References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::clear(), edm::RefVector< C, T, F >::end(), and edm::RefVector< C, T, F >::push_back().
{ // combines them first into a set to get rid of duplicates and then puts them into the first vector // sorts them first to get rid of duplicates, then puts them into another RefVector twrrefset_t twrrefset; for(edm::RefVector<CaloTowerCollection>::const_iterator it=v1.begin(); it!=v1.end(); ++it) twrrefset.insert(*it); for(edm::RefVector<CaloTowerCollection>::const_iterator it=v2.begin(); it!=v2.end(); ++it) twrrefset.insert(*it); // clear the original refvector and put them back in v1.clear(); for(twrrefset_t::const_iterator it=twrrefset.begin(); it!=twrrefset.end(); ++it) { v1.push_back(*it); } return; }