/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/DecayChain/DecayChain-00-00-03-slc6tag/DecayChain/List/Template/DCChargedVisibleList.cc

Go to the documentation of this file.
00001 #ifndef DCHAIN_DCCHARGEDVISIBLELIST_CC
00002 #define DCHAIN_DCCHARGEDVISIBLELIST_CC
00003 // -*- C++ -*-
00004 //
00005 // Package:     DChain
00006 // Module:      ChargedVisibleList
00007 // 
00008 // Description: <one line class summary>
00009 //
00010 // Implimentation:
00011 //     <Notes on implimentation>
00012 //
00013 // Author:      Simon Patton
00014 // Created:     Fri Oct  4 11:04:56 EDT 1996
00015 // $Id: DCChargedVisibleList.cc,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
00016 //
00017 // Revision history
00018 //
00019 // $Log: DCChargedVisibleList.cc,v $
00020 // Revision 1.1.1.1  2009/03/03 06:06:56  maqm
00021 // first import of DecayChain
00022 //
00023 // Revision 1.6  2006/01/11 20:28:36  cdj
00024 // massive class renaming, addition of [] for selection and unit tests
00025 //
00026 // Revision 1.5  2003/08/01 13:48:43  mrs43
00027 // changed plus and minus methods of DCChargedVisibleList to const
00028 //
00029 // Revision 1.4  2003/05/15 19:56:11  cdj
00030 // revamped memory handling so always use a ReferenceHolder to deal with the reference counting
00031 //
00032 // Revision 1.3  2003/03/13 20:19:16  cleo3
00033 // now compiles under Linux
00034 //
00035 // Revision 1.2  2000/12/30 19:43:32  cdj
00036 // no more missing symbols under OSF1
00037 //
00038 // Revision 1.1.1.1  2000/12/18 22:16:55  cdj
00039 // imported DChain
00040 //
00041 // Revision 1.14  1998/08/20 20:00:08  sjp
00042 // Modified to use DChainBoolean
00043 //
00044 // Revision 1.13  1998/08/19 20:46:19  sjp
00045 // Fixed comments and removed report references
00046 //
00047 // Revision 1.12  1998/04/17 19:14:46  sjp
00048 // Modified to use latest type
00049 //
00050 // Revision 1.11  1997/09/17 20:05:34  sjp
00051 // Removed filling to superclass
00052 //
00053 // Revision 1.10  1997/09/03 14:58:18  sjp
00054 // Use new report.h and TBParticlePoint
00055 //
00056 // Revision 1.9  1997/08/28 07:00:17  sjp
00057 // Modified files to handle complete templating
00058 //
00059 // Revision 1.8  1997/08/19 23:02:32  sjp
00060 // Restructured package to be independent of Rock
00061 //
00062 // Revision 1.7  1997/08/19 15:55:28  sjp
00063 // Modified list to have no dependence on any other
00064 //   structures except its contents, which must have
00065 //   certain `typedef' available to use.
00066 //
00067 // Revision 1.6  1997/08/15 21:33:00  sjp
00068 // Updated to use <package>/<file>.h include structure.
00069 // Updated to use bug flags specified in Experiement.h
00070 //
00071 // Revision 1.5  1997/01/31 20:17:28  sjp
00072 // Modified to use the new `bug' include files
00073 //
00074 // Revision 1.4  1997/01/21 20:34:26  sjp
00075 // Changed CPP flags and include because of library reorganization
00076 //
00077 // Revision 1.3  1996/12/20 21:15:57  sjp
00078 // Ammended to allow for LabaledLists being reference counted.
00079 // Added dropLink() for all created entries.
00080 //
00081 // Revision 1.2  1996/11/05 19:30:35  sjp
00082 // Added definition for filling for TruthTable.
00083 //
00084 // Revision 1.1  1996/11/04 19:36:39  sjp
00085 // New file for new `List' module
00086 //
00087 
00088 // system include files
00089 #include <stdlib.h>  // required for 'exit'
00090 
00091 // user include files
00092 #include "DecayChain/Function/DCSelectionFunction.h"
00093 #include "DecayChain/Function/DCAnalysisFunction.h"
00094 #include "DecayChain/Element/conjugation.h"
00095 #include "DecayChain/Element/LabeledParticle.h"
00096 #include "DecayChain/Iterator/MuteWholeItr.h"
00097 #include "DecayChain/Iterator/WholeItr.h"
00098 #include "DecayChain/List/LabeledParticleList.h"
00099 #include "DecayChain/List/ChosenChargeList.h"
00100 
00101 #include "DecayChain/List/DCChargedVisibleList.h"
00102 
00103 // STL include files
00104 //#include <vector>
00105 
00106 //
00107 // constants, enums and typedefs
00108 //
00109 
00110 //
00111 // static data member definitions
00112 //
00113 
00114 //
00115 // constructors and destructor
00116 //
00117 
00118 template < class Charged , class CandidateClass >
00119 DCChargedVisibleList< Charged , CandidateClass >::
00120 DCChargedVisibleList( bool ( * pFunction )( Charged& ) ) :
00121    m_function( pFunction ) ,
00122    m_functionalObject( 0 )
00123 {
00124 }
00125 
00126 template < class Charged , class CandidateClass >
00127 DCChargedVisibleList< Charged , CandidateClass >::
00128 DCChargedVisibleList( const DCChargedVisibleList< Charged , CandidateClass >&  aOtherList ,
00129                     bool ( * pFunction )( Charged& ) ) :
00130    dchain::ChargedVisibleList<Charged, CandidateClass>(aOtherList, pFunction),
00131    m_function( pFunction ) ,
00132    m_functionalObject( 0 )
00133 {
00134 }
00135 
00136 template < class Charged , class CandidateClass >
00137 DCChargedVisibleList< Charged , CandidateClass >::
00138 DCChargedVisibleList( DCSelectionFunction< Charged >& aFunctionalObject ) :
00139    m_function( 0 ) ,
00140    m_functionalObject( &aFunctionalObject )
00141 {
00142 }
00143 
00144 template < class Charged , class CandidateClass >
00145 DCChargedVisibleList< Charged , CandidateClass >::
00146 DCChargedVisibleList( const DCChargedVisibleList< Charged , CandidateClass >& aOtherList ,
00147                     DCSelectionFunction< Charged >& aFunctionalObject ) :
00148    dchain::ChargedVisibleList<Charged,CandidateClass>(aOtherList,aFunctionalObject),
00149    m_function( 0 ) ,
00150    m_functionalObject( &aFunctionalObject )
00151 {
00152 }
00153 
00154 template < class Charged , class CandidateClass >
00155 DCChargedVisibleList< Charged , CandidateClass >::~DCChargedVisibleList()
00156 {
00157 }
00158 
00159 //
00160 // assignment operators
00161 //
00162 
00163 template < class Charged , class CandidateClass >
00164 const DCChargedVisibleList< Charged , CandidateClass >& DCChargedVisibleList< Charged , CandidateClass >::operator=( const DCChargedVisibleList< Charged , CandidateClass >& aOtherList )
00165 {
00166    this->eraseContents() ;
00167    fill(aOtherList.labeledCandidateList()) ;
00168    return ( *this ) ;
00169 }
00170 
00171 //
00172 // member functions
00173 //
00174 
00175 template < class Charged , class CandidateClass >
00176 void DCChargedVisibleList< Charged , CandidateClass >::fill( const dchain::LabeledParticleList< Charged , CandidateClass >& aList )
00177 {
00178    if ( 0 != m_function ) {
00179       fill(aList, dchain::NewMaker<Charged>(), m_function);
00180    } else if (m_functionalObject) {
00181       fill(aList,dchain::NewMaker<Charged>(), m_functionalObject);
00182    } else {
00183       fill(aList, dchain::NewMaker<Charged>(), dchain::SelectAll<Charged>());
00184    }
00185 }
00186 
00187 //
00188 // const member functions
00189 //
00190 
00191 //
00192 // static member functions
00193 //
00194 
00195 #endif /* DCHAIN_DCCHARGEDVISIBLELIST_CC */

Generated on Tue Nov 29 22:58:23 2016 for BOSS_7.0.2 by  doxygen 1.4.7