#include <CompositeCandSelector.h>
Public Member Functions | |
CompositeCandSelector (const Selector &select) | |
CompositeCandSelector (const Selector &select) | |
bool | operator() (const reco::Candidate &cmp) const |
bool | operator() (const reco::Candidate &cmp) const |
Private Attributes | |
Selector | select_ |
Definition at line 7 of file CompositeCandSelector.h.
CompositeCandSelector< Selector, T1, T2, nDau >::CompositeCandSelector | ( | const Selector & | select | ) | [inline, explicit] |
Definition at line 9 of file CompositeCandSelector.h.
: select_(select) { }
CompositeCandSelector< Selector, T1, T2, nDau >::CompositeCandSelector | ( | const Selector & | select | ) | [inline, explicit] |
Definition at line 9 of file CompositeCandSelector.h.
: select_(select) { }
bool CompositeCandSelector< Selector, T1, T2, nDau >::operator() | ( | const reco::Candidate & | cmp | ) | const [inline] |
Definition at line 10 of file CompositeCandSelector.h.
References reco::Candidate::daughter(), Exception, edm::errors::InvalidReference, reco::Candidate::numberOfDaughters(), and CompositeCandSelector< Selector, T1, T2, nDau >::select_.
{ if(cmp.numberOfDaughters() != nDau) throw edm::Exception(edm::errors::InvalidReference) << "candidate has " << cmp.numberOfDaughters() << ", while CompositeCandSelector " << "requires " << nDau << " daughters.\n"; const T1 * dau1 = dynamic_cast<const T1 *>(cmp.daughter(0)); if(dau1 == 0) throw edm::Exception(edm::errors::InvalidReference) << "candidate's first daughter is not of the type required " << "by CompositeCandSelector.\n"; const T2 * dau2 = dynamic_cast<const T2 *>(cmp.daughter(1)); if(dau2 == 0) throw edm::Exception(edm::errors::InvalidReference) << "candidate's second daughter is not of the type required " << "by CompositeCandSelector.\n"; return select_(*dau1, *dau2); }
bool CompositeCandSelector< Selector, T1, T2, nDau >::operator() | ( | const reco::Candidate & | cmp | ) | const [inline] |
Definition at line 10 of file CompositeCandSelector.h.
References reco::Candidate::daughter(), Exception, edm::errors::InvalidReference, reco::Candidate::numberOfDaughters(), and CompositeCandSelector< Selector, T1, T2, nDau >::select_.
{ if(cmp.numberOfDaughters() != nDau) throw edm::Exception(edm::errors::InvalidReference) << "candidate has " << cmp.numberOfDaughters() << ", while CompositeCandSelector " << "requires " << nDau << " daughters.\n"; const T1 * dau1 = dynamic_cast<const T1 *>(cmp.daughter(0)); if(dau1 == 0) throw edm::Exception(edm::errors::InvalidReference) << "candidate's first daughter is not of the type required " << "by CompositeCandSelector.\n"; const T2 * dau2 = dynamic_cast<const T2 *>(cmp.daughter(1)); if(dau2 == 0) throw edm::Exception(edm::errors::InvalidReference) << "candidate's second daughter is not of the type required " << "by CompositeCandSelector.\n"; return select_(*dau1, *dau2); }
Selector CompositeCandSelector< Selector, T1, T2, nDau >::select_ [private] |
Definition at line 29 of file CompositeCandSelector.h.
Referenced by CompositeCandSelector< Selector, T1, T2, nDau >::operator()().