Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:49

0001 #include "DataFormats/Candidate/interface/CompositeRefBaseCandidate.h"
0002 #include "FWCore/Utilities/interface/Exception.h"
0003 
0004 using namespace reco;
0005 
0006 CompositeRefBaseCandidate::~CompositeRefBaseCandidate() {}
0007 
0008 CompositeRefBaseCandidate* CompositeRefBaseCandidate::clone() const { return new CompositeRefBaseCandidate(*this); }
0009 
0010 const Candidate* CompositeRefBaseCandidate::daughter(size_type i) const {
0011   return (i < numberOfDaughters()) ? &*dau[i] : nullptr;  // i >= 0, since i is unsigned

0012 }
0013 
0014 const Candidate* CompositeRefBaseCandidate::mother(size_type i) const { return nullptr; }
0015 
0016 Candidate* CompositeRefBaseCandidate::daughter(size_type i) { return nullptr; }
0017 
0018 size_t CompositeRefBaseCandidate::numberOfDaughters() const { return dau.size(); }
0019 
0020 size_t CompositeRefBaseCandidate::numberOfMothers() const { return 0; }
0021 
0022 bool CompositeRefBaseCandidate::overlap(const Candidate& c2) const {
0023   throw cms::Exception("Error") << "can't check overlap internally for CompositeRefBaseCanddate";
0024 }