22 <<
"NamedCompositeCandidate constructor: Number of roles and daughters differ, this is an error. Name = " << name <<
"\n";
38 <<
"NamedCompositeCandidate::applyRoles : Number of roles and daughters differ, this is an error.\n";
41 for (
int i = 0 ;
i < N1; ++
i ) {
57 for ( ; i <
N && !
found; ++
i ) {
66 <<
"NamedCompositeCandidate::daughter: Cannot find role " << s <<
"\n";
77 for ( ; i <
N && !
found; ++
i ) {
86 <<
"NamedCompositeCandidate::daughter: Cannot find role " << s <<
"\n";
96 bool isFound = (
find( begin,
end, s) !=
end );
99 <<
"NamedCompositeCandidate::addDaughter: Already have role with name " << s
100 <<
", please clearDaughters, or use a new name\n";
104 std::unique_ptr<Candidate>
c( cand.
clone() );
115 bool isFound = (
find( begin,
end, s) !=
end );
118 <<
"NamedCompositeCandidate::addDaughter: Already have role with name " << s
119 <<
", please clearDaughters, or use a new name\n";
NamedCompositeCandidate(std::string name="")
default constructor
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
virtual size_type numberOfDaughters() const
number of daughters
void setName(std::string n)
virtual Candidate * clone() const =0
returns a clone of the Candidate object
const_iterator end() const
last daughter const_iterator
virtual Candidate * daughter(const std::string &s)
return daughter with a specified role name
std::vector< std::string > role_collection
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual NamedCompositeCandidate * clone() const
returns a clone of the candidate
void addDaughter(const Candidate &, const std::string &s)
const_iterator begin() const
first daughter const_iterator
virtual ~NamedCompositeCandidate()
destructor