10 for(
size_t i = 0;
i !=
n; ++
i) {
21 bool sameSize = (n ==
r);
22 for(
size_t i = 0;
i !=
n; ++
i) {
23 if (sameSize && r > 0)
52 throw cms::Exception(
"Error") <<
"can't check overlap internally for CompositeCanddate";
65 <<
"CompositeCandidate::applyRoles : Number of roles and daughters differ, this is an error.\n";
68 for (
int i = 0 ;
i < N1; ++
i) {
92 <<
"CompositeCandidate::daughter: Cannot find role " << s <<
"\n";
111 <<
"CompositeCandidate::daughter: Cannot find role " << s <<
"\n";
124 <<
"CompositeCandidate::addDaughter: Already have role with name \"" << s
125 <<
"\", please clearDaughters, or use a new name\n";
142 <<
"CompositeCandidate::addDaughter: Already have role with name \"" << s
143 <<
"\", please clearDaughters, or use a new name\n";
~CompositeCandidate() override
destructor
std::string name_
candidate name
role_collection const & roles() const
get the roles
CompositeCandidate * clone() const override
returns a clone of the candidate
role_collection roles_
candidate roles
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const Candidate * mother(size_type i=0) const override
return pointer to mother
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
virtual Candidate * clone() const =0
returns a clone of the Candidate object
const_iterator end() const
last daughter const_iterator
CompositeCandidate(std::string name="")
default constructor
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
void setName(std::string name)
set the name of the candidate
const_iterator begin() const
first daughter const_iterator
daughters dau
collection of daughters
size_type numberOfDaughters() const override
number of daughters
std::string name() const
get the name of the candidate
bool overlap(const Candidate &) const override
check overlap with another daughter
virtual size_type numberOfDaughters() const =0
number of daughters
std::vector< std::string > role_collection
size_type numberOfMothers() const override
number of mothers (zero or one in most of but not all the cases)