#include <PhysicsTools/CandAlgos/interface/CandDecaySelector.h>
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_ |
Definition at line 12 of file CandDecaySelector.h.
Definition at line 14 of file CandDecaySelector.h.
helper::CandDecayStoreManager::CandDecayStoreManager | ( | const edm::Handle< reco::CandidateCollection > & | ) | [inline] |
Definition at line 15 of file CandDecaySelector.h.
00015 : 00016 selCands_( new reco::CandidateCollection ) { 00017 }
reco::CandidateRef helper::CandDecayStoreManager::add | ( | reco::CandidateRefProd | cands, | |
const reco::Candidate & | c | |||
) | [inline, private] |
Definition at line 31 of file CandDecaySelector.h.
References c, i, n, p, HcalSimpleRecAlgoImpl::reco(), selCands_, and std.
00031 { 00032 using namespace reco; 00033 using namespace std; 00034 std::auto_ptr<CompositeRefCandidate> cmp( new CompositeRefCandidate( c ) ); 00035 CompositeRefCandidate * p = cmp.get(); 00036 CandidateRef ref( cands, selCands_->size() ); 00037 selCands_->push_back( cmp ); 00038 size_t n = c.numberOfDaughters(); 00039 for( size_t i = 0; i < n; ++ i ) 00040 p->addDaughter( add( cands, * c.daughter( i ) ) ); 00041 return ref; 00042 }
void helper::CandDecayStoreManager::cloneAndStore | ( | const I & | begin, | |
const I & | end, | |||
edm::Event & | evt | |||
) | [inline] |
Definition at line 19 of file CandDecaySelector.h.
References edm::Event::getRefBeforePut(), I, i, and HcalSimpleRecAlgoImpl::reco().
00019 { 00020 using namespace reco; 00021 CandidateRefProd cands = evt.getRefBeforePut<CandidateCollection>(); 00022 for( I i = begin; i != end; ++ i ) 00023 add( cands, * * i ); 00024 }
edm::OrphanHandle<reco::CandidateCollection> helper::CandDecayStoreManager::put | ( | edm::Event & | evt | ) | [inline] |
size_t helper::CandDecayStoreManager::size | ( | void | ) | const [inline] |
Definition at line 28 of file CandDecaySelector.h.
References selCands_.
00028 { return selCands_->size(); }
std::auto_ptr<reco::CandidateCollection> helper::CandDecayStoreManager::selCands_ [private] |