CMS 3D CMS Logo

Classes | Namespaces | Functions
makeNamedCompositeCandidate.h File Reference
#include "DataFormats/Candidate/interface/NamedCompositeCandidate.h"
#include "DataFormats/Candidate/interface/ShallowCloneCandidate.h"
#include <memory>
#include <string>

Go to the source code of this file.

Classes

struct  helpers::NamedCompositeCandidateMaker
 

Namespaces

 helpers
 

Functions

helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate (const reco::Candidate &c1, std::string s1, const reco::Candidate &c2, std::string s2)
 
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate (const reco::Candidate &c1, std::string s1, const reco::Candidate &c2, std::string s2, const reco::Candidate &c3, std::string s3)
 
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate (const reco::Candidate &c1, std::string s1, const reco::Candidate &c2, std::string s2, const reco::Candidate &c3, std::string s3, const reco::Candidate &c4, std::string s4)
 
template<typename C >
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate (const typename C::const_iterator &begin, const typename C::const_iterator &end, const std::vector< std::string >::const_iterator sbegin, const std::vector< std::string >::const_iterator send)
 
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, std::string s1, const reco::CandidateRef &c2, std::string s2)
 
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, std::string s1, const reco::CandidateRef &c2, std::string s2, const reco::CandidateRef &c3, std::string s3)
 
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, std::string s1, const reco::CandidateRef &c2, std::string s2, const reco::CandidateRef &c3, std::string s3, const reco::CandidateRef &c4, std::string s4)
 
template<typename C >
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaster (const typename C::const_iterator &begin, const typename C::const_iterator &end, const std::vector< std::string >::const_iterator sbegin, const std::vector< std::string >::const_iterator send)
 

Function Documentation

◆ makeNamedCompositeCandidate() [1/4]

helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate ( const reco::Candidate c1,
std::string  s1,
const reco::Candidate c2,
std::string  s2 
)

Definition at line 7 of file makeNamedCompositeCandidate.cc.

10  {
11  helpers::NamedCompositeCandidateMaker cmp(std::make_unique<NamedCompositeCandidate>());
12  cmp.addDaughter(c1, s1);
13  cmp.addDaughter(c2, s2);
14  return cmp;
15 }

References alignmentValidation::c1, fileCollector::cmp, and indexGen::s2.

◆ makeNamedCompositeCandidate() [2/4]

helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate ( const reco::Candidate c1,
std::string  s1,
const reco::Candidate c2,
std::string  s2,
const reco::Candidate c3,
std::string  s3 
)

Definition at line 17 of file makeNamedCompositeCandidate.cc.

18  {
19  helpers::NamedCompositeCandidateMaker cmp(std::make_unique<NamedCompositeCandidate>());
20  cmp.addDaughter(c1, s1);
21  cmp.addDaughter(c2, s2);
22  cmp.addDaughter(c3, s3);
23  return cmp;
24 }

References alignmentValidation::c1, fileCollector::cmp, and indexGen::s2.

◆ makeNamedCompositeCandidate() [3/4]

helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate ( const reco::Candidate c1,
std::string  s1,
const reco::Candidate c2,
std::string  s2,
const reco::Candidate c3,
std::string  s3,
const reco::Candidate c4,
std::string  s4 
)

Definition at line 26 of file makeNamedCompositeCandidate.cc.

33  {
34  helpers::NamedCompositeCandidateMaker cmp(std::make_unique<NamedCompositeCandidate>());
35  cmp.addDaughter(c1, s1);
36  cmp.addDaughter(c2, s2);
37  cmp.addDaughter(c3, s3);
38  cmp.addDaughter(c4, s4);
39  return cmp;
40 }

References alignmentValidation::c1, fileCollector::cmp, and indexGen::s2.

◆ makeNamedCompositeCandidate() [4/4]

template<typename C >
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidate ( const typename C::const_iterator &  begin,
const typename C::const_iterator &  end,
const std::vector< std::string >::const_iterator  sbegin,
const std::vector< std::string >::const_iterator  send 
)

Definition at line 58 of file makeNamedCompositeCandidate.h.

61  {
63  std::unique_ptr<reco::NamedCompositeCandidate>(new reco::NamedCompositeCandidate));
64  std::vector<std::string>::const_iterator si = sbegin;
65  for (typename C::const_iterator i = begin; i != end && si != send; ++i, ++si)
66  cmp.addDaughter(*i, *si);
67  return cmp;
68 }

References fileCollector::cmp, mps_fire::end, and mps_fire::i.

◆ makeNamedCompositeCandidateWithRefsToMaster() [1/4]

helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
std::string  s1,
const reco::CandidateRef c2,
std::string  s2 
)

Definition at line 42 of file makeNamedCompositeCandidate.cc.

45  {
46  helpers::NamedCompositeCandidateMaker cmp(std::make_unique<NamedCompositeCandidate>());
47  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c1)), s1);
48  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)), s2);
49  return cmp;
50 }

References alignmentValidation::c1, fileCollector::cmp, and indexGen::s2.

◆ makeNamedCompositeCandidateWithRefsToMaster() [2/4]

helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
std::string  s1,
const reco::CandidateRef c2,
std::string  s2,
const reco::CandidateRef c3,
std::string  s3 
)

Definition at line 52 of file makeNamedCompositeCandidate.cc.

57  {
58  helpers::NamedCompositeCandidateMaker cmp(std::make_unique<NamedCompositeCandidate>());
59  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c1)), s1);
60  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)), s2);
61  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c3)), s3);
62  return cmp;
63 }

References alignmentValidation::c1, fileCollector::cmp, and indexGen::s2.

◆ makeNamedCompositeCandidateWithRefsToMaster() [3/4]

helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
std::string  s1,
const reco::CandidateRef c2,
std::string  s2,
const reco::CandidateRef c3,
std::string  s3,
const reco::CandidateRef c4,
std::string  s4 
)

Definition at line 65 of file makeNamedCompositeCandidate.cc.

72  {
73  helpers::NamedCompositeCandidateMaker cmp(std::make_unique<NamedCompositeCandidate>());
74  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c1)), s1);
75  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c2)), s2);
76  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c3)), s3);
77  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(c4)), s4);
78  return cmp;
79 }

References alignmentValidation::c1, fileCollector::cmp, and indexGen::s2.

◆ makeNamedCompositeCandidateWithRefsToMaster() [4/4]

template<typename C >
helpers::NamedCompositeCandidateMaker makeNamedCompositeCandidateWithRefsToMaster ( const typename C::const_iterator &  begin,
const typename C::const_iterator &  end,
const std::vector< std::string >::const_iterator  sbegin,
const std::vector< std::string >::const_iterator  send 
)

Definition at line 92 of file makeNamedCompositeCandidate.h.

96  {
98  std::unique_ptr<reco::NamedCompositeCandidate>(new reco::NamedCompositeCandidate));
99  std::vector<std::string>::const_iterator si = sbegin;
100  for (typename C::const_iterator i = begin; i != end && si != send; ++i, ++si)
101  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(*i)), *si);
102  return cmp;
103 }

References fileCollector::cmp, mps_fire::end, and mps_fire::i.

mps_fire.i
i
Definition: mps_fire.py:428
indexGen.s2
s2
Definition: indexGen.py:107
mps_fire.end
end
Definition: mps_fire.py:242
reco::NamedCompositeCandidate
Definition: NamedCompositeCandidate.h:21
reco::CandidateBaseRef
edm::RefToBase< Candidate > CandidateBaseRef
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:31
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
helpers::NamedCompositeCandidateMaker
Definition: makeNamedCompositeCandidate.h:9
fileCollector.cmp
cmp
Definition: fileCollector.py:125
reco::ShallowCloneCandidate
Definition: ShallowCloneCandidate.h:15