CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
helper::PhotonCollectionStoreManager Struct Reference

#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::PhotonCollectionput (edm::Event &evt)
 
size_t size () const
 

Private Attributes

std::auto_ptr< reco::PhotonCollectionselPhotons_
 
std::auto_ptr< reco::SuperClusterCollectionselSuperClusters_
 

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

Definition at line 23 of file PhotonSelector.h.

23  :
26  }
std::auto_ptr< reco::PhotonCollection > selPhotons_
std::auto_ptr< reco::SuperClusterCollection > selSuperClusters_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9

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, mps_fire::i, training_settings::idx, configurableAnalysis::Photon, selPhotons_, selSuperClusters_, and reco::Photon::superCluster().

28  {
29  using namespace reco;
30  PhotonRefProd rPhotons = evt.template getRefBeforePut<PhotonCollection>();
31  SuperClusterRefProd rSuperClusters = evt.template getRefBeforePut<SuperClusterCollection>();
32  size_t idx = 0;
33  for( I i = begin; i != end; ++ i ) {
34  const Photon & ele = * * i;
35  selPhotons_->push_back( Photon( ele ) );
36  selPhotons_->back().setSuperCluster( SuperClusterRef( rSuperClusters, idx ++ ) );
37  selSuperClusters_->push_back( SuperCluster( * ( ele.superCluster() ) ) );
38  }
39  }
Definition: Photon.py:1
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
std::auto_ptr< reco::PhotonCollection > selPhotons_
std::auto_ptr< reco::SuperClusterCollection > selSuperClusters_
const std::complex< double > I
Definition: I.h:8
#define end
Definition: vmac.h:37
fixed size matrix
#define begin
Definition: vmac.h:30
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_.

40  {
42  evt.put( selSuperClusters_ );
43  return h;
44  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::auto_ptr< reco::PhotonCollection > selPhotons_
std::auto_ptr< reco::SuperClusterCollection > selSuperClusters_
size_t helper::PhotonCollectionStoreManager::size ( void  ) const
inline

Definition at line 45 of file PhotonSelector.h.

References selPhotons_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

45 { return selPhotons_->size(); }
std::auto_ptr< reco::PhotonCollection > selPhotons_

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