00001 #ifndef DCHAIN_DCNEUTRALVISIBLELIST_CC
00002 #define DCHAIN_DCNEUTRALVISIBLELIST_CC
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 #include <stdlib.h>
00080
00081
00082 #include "DecayChain/Function/DCSelectionFunction.h"
00083 #include "DecayChain/Function/DCAnalysisFunction.h"
00084 #include "DecayChain/Element/conjugation.h"
00085 #include "DecayChain/Element/LabeledParticle.h"
00086 #include "DecayChain/Iterator/MuteWholeItr.h"
00087 #include "DecayChain/Iterator/WholeItr.h"
00088 #include "DecayChain/List/LabeledParticleList.h"
00089
00090 #include "DecayChain/List/DCNeutralVisibleList.h"
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107 template< class Neutral , class CandidateClass >
00108 DCNeutralVisibleList< Neutral , CandidateClass >::
00109 DCNeutralVisibleList( bool ( * pFunction )( Neutral& ) ) :
00110 m_function( pFunction ) ,
00111 m_functionalObject( 0 )
00112 {
00113 }
00114
00115 template< class Neutral , class CandidateClass >
00116 DCNeutralVisibleList< Neutral , CandidateClass >::
00117 DCNeutralVisibleList( const DCNeutralVisibleList< Neutral , CandidateClass >& aOtherList ,
00118 bool ( * pFunction )( Neutral& ) ) :
00119 dchain::NeutralVisibleList< Neutral, CandidateClass >( aOtherList, pFunction ) ,
00120 m_function( pFunction ) ,
00121 m_functionalObject( 0 )
00122 {
00123 }
00124
00125 template< class Neutral , class CandidateClass >
00126 DCNeutralVisibleList< Neutral , CandidateClass >::
00127 DCNeutralVisibleList( DCSelectionFunction< Neutral >& aFunctionalObject ) :
00128 m_function( 0 ) ,
00129 m_functionalObject( &aFunctionalObject )
00130 {
00131 }
00132
00133 template< class Neutral , class CandidateClass >
00134 DCNeutralVisibleList< Neutral , CandidateClass >::
00135 DCNeutralVisibleList( const DCNeutralVisibleList< Neutral , CandidateClass >& aOtherList ,
00136 DCSelectionFunction< Neutral >& aFunctionalObject ) :
00137 dchain::NeutralVisibleList< Neutral,CandidateClass >( aOtherList, aFunctionalObject),
00138 m_function( 0 ) ,
00139 m_functionalObject( &aFunctionalObject )
00140 {
00141 }
00142
00143 template< class Neutral , class CandidateClass >
00144 DCNeutralVisibleList< Neutral , CandidateClass >::
00145 ~DCNeutralVisibleList()
00146 {
00147 }
00148
00149
00150
00151
00152
00153 template< class Neutral , class CandidateClass >
00154 const DCNeutralVisibleList< Neutral , CandidateClass >& DCNeutralVisibleList< Neutral , CandidateClass >::operator=( const DCNeutralVisibleList< Neutral , CandidateClass >& aOtherList )
00155 {
00156 this->eraseContents() ;
00157 fill( aOtherList.labeledCandidateList() ) ;
00158 return ( *this ) ;
00159 }
00160
00161 template < class Neutral , class CandidateClass >
00162 void DCNeutralVisibleList< Neutral , CandidateClass >::fill( const dchain::LabeledParticleList< Neutral , CandidateClass >& aList )
00163 {
00164 if ( 0 != m_function ) {
00165 fill(aList, dchain::NewMaker<Neutral>(), m_function);
00166 } else if (m_functionalObject) {
00167 fill(aList,dchain::NewMaker<Neutral>(), m_functionalObject);
00168 } else {
00169 fill(aList, dchain::NewMaker<Neutral>(), dchain::SelectAll<Neutral>());
00170 }
00171 }
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181 #endif