CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::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

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, i, customizeTrackingMonitorSeedNumber::idx, configurableAnalysis::Photon, dt_dqm_sourceclient_common_cff::reco, 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  }
int i
Definition: DBlmapReader.cc:9
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
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
#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  }
std::auto_ptr< reco::PhotonCollection > selPhotons_
std::auto_ptr< reco::SuperClusterCollection > selSuperClusters_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
size_t helper::PhotonCollectionStoreManager::size ( void  ) const
inline

Definition at line 45 of file PhotonSelector.h.

References selPhotons_.

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