CMS 3D CMS Logo

helper::PhotonCollectionStoreManager Struct Reference

#include <PhysicsTools/RecoAlgos/interface/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

typedef reco::PhotonCollection helper::PhotonCollectionStoreManager::collection

Definition at line 22 of file PhotonSelector.h.


Constructor & Destructor Documentation

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

Definition at line 23 of file PhotonSelector.h.


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 I, i, configurableAnalysis::Photon, HcalSimpleRecAlgoImpl::reco(), selPhotons_, and selSuperClusters_.

00028                                                                          {
00029       using namespace reco;
00030       PhotonRefProd rPhotons = evt.template getRefBeforePut<PhotonCollection>();      
00031       SuperClusterRefProd rSuperClusters = evt.template getRefBeforePut<SuperClusterCollection>();      
00032       size_t idx = 0;
00033       for( I i = begin; i != end; ++ i ) {
00034         const Photon & ele = * * i;
00035         selPhotons_->push_back( Photon( ele ) );
00036         selPhotons_->back().setSuperCluster( SuperClusterRef( rSuperClusters, idx ++ ) );
00037         selSuperClusters_->push_back( SuperCluster( * ( ele.superCluster() ) ) );
00038       }
00039     }

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_.

00040                                                                 {
00041       edm::OrphanHandle<reco::PhotonCollection> h = evt.put( selPhotons_ );
00042       evt.put( selSuperClusters_ );
00043       return h;
00044     }

size_t helper::PhotonCollectionStoreManager::size ( void   )  const [inline]

Definition at line 45 of file PhotonSelector.h.

References selPhotons_.

00045 { return selPhotons_->size(); }


Member Data Documentation

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().


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:47:29 2009 for CMSSW by  doxygen 1.5.4