CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

helper::CandDecayStoreManager Class Reference

#include <CandDecaySelector.h>

List of all members.

Public Types

typedef reco::CandidateCollection collection

Public Member Functions

 CandDecayStoreManager (const edm::Handle< reco::CandidateCollection > &)
template<typename I >
void cloneAndStore (const I &begin, const I &end, edm::Event &evt)
edm::OrphanHandle
< reco::CandidateCollection
put (edm::Event &evt)
size_t size () const

Private Member Functions

reco::CandidateRef add (reco::CandidateRefProd cands, const reco::Candidate &c)

Private Attributes

std::auto_ptr
< reco::CandidateCollection
selCands_

Detailed Description

Definition at line 12 of file CandDecaySelector.h.


Member Typedef Documentation

Definition at line 14 of file CandDecaySelector.h.


Constructor & Destructor Documentation

helper::CandDecayStoreManager::CandDecayStoreManager ( const edm::Handle< reco::CandidateCollection > &  ) [inline]

Definition at line 15 of file CandDecaySelector.h.


Member Function Documentation

reco::CandidateRef helper::CandDecayStoreManager::add ( reco::CandidateRefProd  cands,
const reco::Candidate c 
) [inline, private]

Definition at line 31 of file CandDecaySelector.h.

References reco::Candidate::daughter(), i, n, reco::Candidate::numberOfDaughters(), AlCaHLTBitMon_ParallelJobs::p, dt_dqm_sourceclient_common_cff::reco, and selCands_.

Referenced by cloneAndStore().

                                                                                {
      using namespace reco;
      using namespace std;
      std::auto_ptr<CompositeRefCandidate> cmp( new CompositeRefCandidate( c ) );
      CompositeRefCandidate * p = cmp.get();
      CandidateRef ref( cands, selCands_->size() );
      selCands_->push_back( cmp );
      size_t n = c.numberOfDaughters(); 
      for( size_t i = 0; i < n; ++ i )
        p->addDaughter( add( cands, * c.daughter( i ) ) );
      return ref;
    }
template<typename I >
void helper::CandDecayStoreManager::cloneAndStore ( const I &  begin,
const I &  end,
edm::Event evt 
) [inline]

Definition at line 19 of file CandDecaySelector.h.

References add(), end, edm::Event::getRefBeforePut(), Exhume::I, i, and dt_dqm_sourceclient_common_cff::reco.

                                                                         {
      using namespace reco;
      CandidateRefProd cands = evt.getRefBeforePut<CandidateCollection>();
      for( I i = begin; i != end; ++ i )
        add( cands, * * i );
    }
edm::OrphanHandle<reco::CandidateCollection> helper::CandDecayStoreManager::put ( edm::Event evt) [inline]

Definition at line 25 of file CandDecaySelector.h.

References edm::Event::put(), and selCands_.

                                                                   {
      return evt.put( selCands_ );
    }
size_t helper::CandDecayStoreManager::size ( void  ) const [inline]

Definition at line 28 of file CandDecaySelector.h.

References selCands_.

{ return selCands_->size(); }

Member Data Documentation

Definition at line 43 of file CandDecaySelector.h.

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