CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

helper::PhotonCollectionStoreManager Struct Reference

#include <PhotonSelector.h>

List of all members.

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_

Detailed Description

Definition at line 21 of file PhotonSelector.h.


Member Typedef Documentation

Definition at line 22 of file PhotonSelector.h.


Constructor & Destructor Documentation

helper::PhotonCollectionStoreManager::PhotonCollectionStoreManager ( const edm::Handle< reco::PhotonCollection > &  ) [inline]

Member Function Documentation

template<typename I >
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]
size_t helper::PhotonCollectionStoreManager::size ( void  ) const [inline]

Definition at line 45 of file PhotonSelector.h.

References selPhotons_.

{ return selPhotons_->size(); }

Member Data Documentation

Definition at line 47 of file PhotonSelector.h.

Referenced by cloneAndStore(), put(), and size().

Definition at line 48 of file PhotonSelector.h.

Referenced by cloneAndStore(), and put().