#include <PhotonSelector.h>
Public Types | |
typedef reco::PhotonCollection | collection |
Public Member Functions | |
template<typename I > | |
void | cloneAndStore (const I &begin, const I &end, edm::Event &evt) |
PhotonCollectionStoreManager (const edm::Handle< reco::PhotonCollection > &) | |
edm::OrphanHandle < reco::PhotonCollection > | put (edm::Event &evt) |
size_t | size () const |
Private Attributes | |
std::auto_ptr < reco::PhotonCollection > | selPhotons_ |
std::auto_ptr < reco::SuperClusterCollection > | selSuperClusters_ |
Definition at line 21 of file PhotonSelector.h.
Definition at line 22 of file PhotonSelector.h.
helper::PhotonCollectionStoreManager::PhotonCollectionStoreManager | ( | const edm::Handle< reco::PhotonCollection > & | ) | [inline] |
Definition at line 23 of file PhotonSelector.h.
: selPhotons_( new reco::PhotonCollection ), selSuperClusters_( new reco::SuperClusterCollection ) { }
void helper::PhotonCollectionStoreManager::cloneAndStore | ( | const I & | begin, |
const I & | end, | ||
edm::Event & | evt | ||
) | [inline] |
Definition at line 28 of file PhotonSelector.h.
References end, Exhume::I, i, UserOptions_cff::idx, dt_dqm_sourceclient_common_cff::reco, selPhotons_, selSuperClusters_, and reco::Photon::superCluster().
{ using namespace reco; PhotonRefProd rPhotons = evt.template getRefBeforePut<PhotonCollection>(); SuperClusterRefProd rSuperClusters = evt.template getRefBeforePut<SuperClusterCollection>(); size_t idx = 0; for( I i = begin; i != end; ++ i ) { const Photon & ele = * * i; selPhotons_->push_back( Photon( ele ) ); selPhotons_->back().setSuperCluster( SuperClusterRef( rSuperClusters, idx ++ ) ); selSuperClusters_->push_back( SuperCluster( * ( ele.superCluster() ) ) ); } }
edm::OrphanHandle<reco::PhotonCollection> helper::PhotonCollectionStoreManager::put | ( | edm::Event & | evt | ) | [inline] |
Definition at line 40 of file PhotonSelector.h.
References h, edm::Event::put(), selPhotons_, and selSuperClusters_.
{ edm::OrphanHandle<reco::PhotonCollection> h = evt.put( selPhotons_ ); evt.put( selSuperClusters_ ); return h; }
size_t helper::PhotonCollectionStoreManager::size | ( | void | ) | const [inline] |
Definition at line 45 of file PhotonSelector.h.
References selPhotons_.
{ return selPhotons_->size(); }
std::auto_ptr<reco::PhotonCollection> helper::PhotonCollectionStoreManager::selPhotons_ [private] |
Definition at line 47 of file PhotonSelector.h.
Referenced by cloneAndStore(), put(), and size().
std::auto_ptr<reco::SuperClusterCollection> helper::PhotonCollectionStoreManager::selSuperClusters_ [private] |
Definition at line 48 of file PhotonSelector.h.
Referenced by cloneAndStore(), and put().