CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Namespaces | Functions
makeCompositeCandidate.h File Reference
#include "DataFormats/Candidate/interface/CompositeCandidate.h"
#include "DataFormats/Candidate/interface/CompositePtrCandidate.h"
#include "DataFormats/Candidate/interface/ShallowCloneCandidate.h"
#include <memory>

Go to the source code of this file.

Classes

struct  helpers::CompositeCandidateMaker
 
struct  helpers::CompositePtrCandidateMaker
 

Namespaces

 helpers
 

Functions

helpers::CompositeCandidateMaker makeCompositeCandidate (const reco::Candidate &c1, const reco::Candidate &c2)
 
helpers::CompositeCandidateMaker makeCompositeCandidate (const reco::Candidate &c1, const reco::Candidate &c2, const reco::Candidate &c3)
 
helpers::CompositeCandidateMaker makeCompositeCandidate (const reco::Candidate &c1, const reco::Candidate &c2, const reco::Candidate &c3, const reco::Candidate &c4)
 
template<typename C >
helpers::CompositeCandidateMaker makeCompositeCandidate (const typename C::const_iterator &begin, const typename C::const_iterator &end)
 
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, const reco::CandidateRef &c2)
 
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, const reco::CandidateRef &c2, const reco::CandidateRef &c3)
 
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster (const reco::CandidateRef &c1, const reco::CandidateRef &c2, const reco::CandidateRef &c3, const reco::CandidateRef &c4)
 
template<typename C >
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster (const typename C::const_iterator &begin, const typename C::const_iterator &end)
 
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate (const reco::CandidatePtr &c1, const reco::CandidatePtr &c2)
 
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate (const reco::CandidatePtr &c1, const reco::CandidatePtr &c2, const reco::CandidatePtr &c3)
 
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate (const reco::CandidatePtr &c1, const reco::CandidatePtr &c2, const reco::CandidatePtr &c3, const reco::CandidatePtr &c4)
 

Function Documentation

helpers::CompositeCandidateMaker makeCompositeCandidate ( const reco::Candidate c1,
const reco::Candidate c2 
)

Definition at line 5 of file makeCompositeCandidate.cc.

5  {
6  helpers::CompositeCandidateMaker cmp( auto_ptr<CompositeCandidate>( new CompositeCandidate ) );
7  cmp.addDaughter( c1 );
8  cmp.addDaughter( c2 );
9  return cmp;
10 }
helpers::CompositeCandidateMaker makeCompositeCandidate ( const reco::Candidate c1,
const reco::Candidate c2,
const reco::Candidate c3 
)

Definition at line 12 of file makeCompositeCandidate.cc.

13  {
14  helpers::CompositeCandidateMaker cmp( auto_ptr<CompositeCandidate>( new CompositeCandidate ) );
15  cmp.addDaughter( c1 );
16  cmp.addDaughter( c2 );
17  cmp.addDaughter( c3 );
18  return cmp;
19 }
helpers::CompositeCandidateMaker makeCompositeCandidate ( const reco::Candidate c1,
const reco::Candidate c2,
const reco::Candidate c3,
const reco::Candidate c4 
)

Definition at line 21 of file makeCompositeCandidate.cc.

22  {
23  helpers::CompositeCandidateMaker cmp( auto_ptr<CompositeCandidate>( new CompositeCandidate ) );
24  cmp.addDaughter( c1 );
25  cmp.addDaughter( c2 );
26  cmp.addDaughter( c3 );
27  cmp.addDaughter( c4 );
28  return cmp;
29 }
template<typename C >
helpers::CompositeCandidateMaker makeCompositeCandidate ( const typename C::const_iterator &  begin,
const typename C::const_iterator &  end 
)

Definition at line 75 of file makeCompositeCandidate.h.

References helpers::CompositeCandidateMaker::addDaughter(), end, and i.

76  {
78  cmp(std::auto_ptr<reco::CompositeCandidate>(new reco::CompositeCandidate) );
79  for(typename C::const_iterator i = begin; i != end; ++ i)
80  cmp.addDaughter(* i);
81  return cmp;
82 }
int i
Definition: DBlmapReader.cc:9
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
const reco::CandidateRef c2 
)

Definition at line 32 of file makeCompositeCandidate.cc.

33  {
34  helpers::CompositeCandidateMaker cmp( auto_ptr<CompositeCandidate>( new CompositeCandidate ) );
35  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c1 ) ) );
36  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c2 ) ) );
37  return cmp;
38 }
edm::RefToBase< Candidate > CandidateBaseRef
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:31
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
const reco::CandidateRef c2,
const reco::CandidateRef c3 
)

Definition at line 41 of file makeCompositeCandidate.cc.

43  {
44  helpers::CompositeCandidateMaker cmp( auto_ptr<CompositeCandidate>( new CompositeCandidate ) );
45  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c1 ) ) );
46  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c2 ) ) );
47  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c3 ) ) );
48  return cmp;
49 }
edm::RefToBase< Candidate > CandidateBaseRef
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:31
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster ( const reco::CandidateRef c1,
const reco::CandidateRef c2,
const reco::CandidateRef c3,
const reco::CandidateRef c4 
)

Definition at line 52 of file makeCompositeCandidate.cc.

55  {
56  helpers::CompositeCandidateMaker cmp( auto_ptr<CompositeCandidate>( new CompositeCandidate ) );
57  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c1 ) ) );
58  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c2 ) ) );
59  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c3 ) ) );
60  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( c4 ) ) );
61  return cmp;
62 }
edm::RefToBase< Candidate > CandidateBaseRef
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:31
template<typename C >
helpers::CompositeCandidateMaker makeCompositeCandidateWithRefsToMaster ( const typename C::const_iterator &  begin,
const typename C::const_iterator &  end 
)

Definition at line 101 of file makeCompositeCandidate.h.

References helpers::CompositeCandidateMaker::addDaughter(), end, and i.

102  {
104  cmp(std::auto_ptr<reco::CompositeCandidate>(new reco::CompositeCandidate));
105  for(typename C::const_iterator i = begin; i != end; ++ i)
106  cmp.addDaughter(ShallowCloneCandidate(CandidateBaseRef(* i)));
107  return cmp;
108 }
int i
Definition: DBlmapReader.cc:9
#define end
Definition: vmac.h:37
edm::RefToBase< Candidate > CandidateBaseRef
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:31
#define begin
Definition: vmac.h:30
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate ( const reco::CandidatePtr c1,
const reco::CandidatePtr c2 
)

Definition at line 64 of file makeCompositeCandidate.cc.

References helpers::CompositePtrCandidateMaker::addDaughter().

64  {
65  helpers::CompositePtrCandidateMaker cmp( auto_ptr<CompositePtrCandidate>( new CompositePtrCandidate ) );
66  cmp.addDaughter( c1 );
67  cmp.addDaughter( c2 );
68  return cmp;
69 }
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate ( const reco::CandidatePtr c1,
const reco::CandidatePtr c2,
const reco::CandidatePtr c3 
)

Definition at line 71 of file makeCompositeCandidate.cc.

References helpers::CompositePtrCandidateMaker::addDaughter().

72  {
73  helpers::CompositePtrCandidateMaker cmp( auto_ptr<CompositePtrCandidate>( new CompositePtrCandidate ) );
74  cmp.addDaughter( c1 );
75  cmp.addDaughter( c2 );
76  cmp.addDaughter( c3 );
77  return cmp;
78 }
helpers::CompositePtrCandidateMaker makeCompositePtrCandidate ( const reco::CandidatePtr c1,
const reco::CandidatePtr c2,
const reco::CandidatePtr c3,
const reco::CandidatePtr c4 
)

Definition at line 80 of file makeCompositeCandidate.cc.

References helpers::CompositePtrCandidateMaker::addDaughter().

81  {
82  helpers::CompositePtrCandidateMaker cmp( auto_ptr<CompositePtrCandidate>( new CompositePtrCandidate ) );
83  cmp.addDaughter( c1 );
84  cmp.addDaughter( c2 );
85  cmp.addDaughter( c3 );
86  cmp.addDaughter( c4 );
87  return cmp;
88 }