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/ShallowCloneCandidate.h"
#include <memory>

Go to the source code of this file.

Classes

struct  helpers::CompositeCandidateMaker
 

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)
 

Function Documentation

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

Definition at line 5 of file makeCompositeCandidate.cc.

References helpers::CompositeCandidateMaker::addDaughter().

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.

References helpers::CompositeCandidateMaker::addDaughter().

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.

References helpers::CompositeCandidateMaker::addDaughter().

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 53 of file makeCompositeCandidate.h.

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

54  {
56  cmp( std::auto_ptr<reco::CompositeCandidate>( new reco::CompositeCandidate ) );
57  for( typename C::const_iterator i = begin; i != end; ++ i )
58  cmp.addDaughter( * i );
59  return cmp;
60 }
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.

References helpers::CompositeCandidateMaker::addDaughter().

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.

References helpers::CompositeCandidateMaker::addDaughter().

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.

References helpers::CompositeCandidateMaker::addDaughter().

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 79 of file makeCompositeCandidate.h.

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

80  {
82  cmp( std::auto_ptr<reco::CompositeCandidate>( new reco::CompositeCandidate ) );
83  for( typename C::const_iterator i = begin; i != end; ++ i )
84  cmp.addDaughter( ShallowCloneCandidate( CandidateBaseRef( * i ) ) );
85  return cmp;
86 }
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