BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
LabeledParticle.h
Go to the documentation of this file.
1#ifndef DCHAIN_LABELEDPARTICLE_H
2#define DCHAIN_LABELEDPARTICLE_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: LabeledParticle
7//
8// Description: pairing of subclass of Decay<> and Conjugation::Label
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Wed Sep 18 14:47:30 EDT 1996
15// $Id: LabeledParticle.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: LabeledParticle.h,v $
20// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
21// first import of DecayChain
22//
23// Revision 1.1 2006/01/11 20:28:08 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26// Revision 1.1.1.1 2000/12/18 22:16:49 cdj
27// imported DChain
28//
29// Revision 1.9 1998/08/19 20:56:00 sjp
30// Added include of definitions
31//
32// Revision 1.8 1997/08/28 06:59:19 sjp
33// Modified files to handle complete templating
34//
35// Revision 1.7 1997/08/26 04:12:58 sjp
36// Made Candidate handling objects into `CandidateClass' Templates
37//
38// Revision 1.6 1997/08/19 23:01:43 sjp
39// Restructured package to be independent of Rock
40//
41// Revision 1.5 1997/08/15 21:32:20 sjp
42// Updated to use <package>/<file>.h include structure.
43// Updated to use bug flags specified in Experiement.h
44//
45// Revision 1.4 1997/01/22 16:27:18 sjp
46// Fixed error in pre-processor labels
47//
48// Revision 1.3 1997/01/21 20:33:48 sjp
49// Changed CPP flags and include because of library reorganization
50//
51// Revision 1.2 1996/12/20 21:19:09 sjp
52// Extended pathnames for Include files
53//
54// Revision 1.1 1996/11/04 19:35:57 sjp
55// New file for new `List' module
56//
57
58// system include files
59
60// user include files
61#include "DecayChain/Element/conjugation.h" // enumerator
62#include "DecayChain/Element/LabeledCandidate.h" // superclass
63
64// forward declarations
65namespace dchain {
66
67 template <class T>
69 typedef typename T::CandidateClass CandidateType;
70 };
71
72template < class T >
73class LabeledParticle : public LabeledCandidate< typename ParticleTraits<T>::CandidateType >
74{
75 // friend classses and functions
76
77 public:
78 // constants, enums and typedefs
79
80 // Constructors and destructor
82 LabeledParticle( const LabeledParticle< T >& aOtherLabeled ) :
83 LabeledCandidate<typename ParticleTraits<T>::CandidateType>(aOtherLabeled) {}
84
85 template<class THolder>
86 LabeledParticle( THolder aT ,
87 const typename conjugation::Label aLabel ) :
88 LabeledCandidate<typename ParticleTraits<T>::CandidateType>(aT,aLabel) {}
89
90 // assignment operator(s)
91 //const LabeledParticle< T >& operator=( const LabeledParticle< T >& aOtherLabeled ) ;
92
93 // member functions
94
95 // const member functions
96// note: The following function can NOT be virtual as its return type changes
97// for Tes
98 const T& operator()() const {
99 return *static_cast<const T*>(this->pointer());
100 }
101//
102 const T& particle() const {
103 return *static_cast<const T*>(this->pointer());
104 }
105
106 // static member functions
107
108 protected:
109 // protected member functions
110
111 // protected const member functions
112
113 private:
114 // Constructors and destructor
115
116 // private member functions
117
118 // private const member functions
119
120 // data members
121
122 // static data members
123
124};
125
126}
127#endif /* DCHAIN_LABELEDPARTICLE_H */
LabeledParticle(const LabeledParticle< T > &aOtherLabeled)
const T & operator()() const
const T & particle() const
LabeledParticle(THolder aT, const typename conjugation::Label aLabel)
T::CandidateClass CandidateType