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

Go to the documentation of this file.
00001 #ifndef DCHAIN_DCDECAYLIST_CC
00002 #define DCHAIN_DCDECAYLIST_CC
00003 // -*- C++ -*-
00004 //
00005 // Package:     DChain
00006 // Module:      DecayList
00007 // 
00008 // Description: container of subclasses of Decay, used for iteration
00009 //
00010 // Implimentation:
00011 //     <Notes on implimentation>
00012 //
00013 // Author:      Simon Patton
00014 // Created:     Fri Oct  4 11:04:56 EDT 1996
00015 // $Id: DCDecayList.cc,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
00016 //
00017 // Revision history
00018 //
00019 // $Log: DCDecayList.cc,v $
00020 // Revision 1.1.1.1  2009/03/03 06:06:56  maqm
00021 // first import of DecayChain
00022 //
00023 // Revision 1.8  2006/02/03 18:29:34  cdj
00024 // fixed bug in copy constructor and operator=
00025 //
00026 // Revision 1.7  2006/01/11 20:28:38  cdj
00027 // massive class renaming, addition of [] for selection and unit tests
00028 //
00029 // Revision 1.6  2003/10/23 18:43:41  cdj
00030 // can now use DCDecayList with other Decay objects
00031 //
00032 // Revision 1.5  2003/05/16 18:33:39  cdj
00033 // previous change now works properly on OSF
00034 //
00035 // Revision 1.4  2003/05/15 19:56:12  cdj
00036 // revamped memory handling so always use a ReferenceHolder to deal with the reference counting
00037 //
00038 // Revision 1.3  2003/03/13 20:19:16  cleo3
00039 // now compiles under Linux
00040 //
00041 // Revision 1.2  2001/03/23 23:07:48  urner
00042 // modification needed to add pi0 eta and Ks decay lists in CleoDChain
00043 //
00044 // Revision 1.1.1.1  2000/12/18 22:16:55  cdj
00045 // imported DChain
00046 //
00047 // Revision 1.13  1998/08/20 20:00:07  sjp
00048 // Modified to use DChainBoolean
00049 //
00050 // Revision 1.12  1998/08/19 20:46:18  sjp
00051 // Fixed comments and removed report references
00052 //
00053 // Revision 1.11  1998/06/30 23:42:06  sjp
00054 // Cleaned up return object from labeledCandidateList
00055 //
00056 // Revision 1.10  1998/05/01 20:20:03  sjp
00057 // Removed unnecessary functions which were causing infinate loop
00058 //
00059 // Revision 1.9  1998/04/17 19:14:45  sjp
00060 // Modified to use latest type
00061 //
00062 // Revision 1.8  1997/09/03 14:58:17  sjp
00063 // Use new report.h and TBParticlePoint
00064 //
00065 // Revision 1.7  1997/08/28 07:00:15  sjp
00066 // Modified files to handle complete templating
00067 //
00068 // Revision 1.6  1997/08/19 23:02:31  sjp
00069 // Restructured package to be independent of Rock
00070 //
00071 // Revision 1.5  1997/08/15 21:32:58  sjp
00072 // Updated to use <package>/<file>.h include structure.
00073 // Updated to use bug flags specified in Experiement.h
00074 //
00075 // Revision 1.4  1997/01/31 20:17:26  sjp
00076 // Modified to use the new `bug' include files
00077 //
00078 // Revision 1.3  1997/01/21 20:34:38  sjp
00079 // Changed CPP flags and include because of library reorganization
00080 //
00081 // Revision 1.2  1996/12/20 21:16:01  sjp
00082 // Ammended to allow for LabaledLists being reference counted.
00083 // Added dropLink() for all created entries.
00084 //
00085 // Revision 1.1  1996/11/04 19:36:49  sjp
00086 // New file for new `List' module
00087 //
00088 
00089 // system include files
00090 #include <stdlib.h>  // required for 'exit'
00091 #include <iostream>
00092 
00093 // user include files
00094 #include "DecayChain/Function/DCSelectionFunction.h"
00095 #include "DecayChain/Function/DCAnalysisFunction.h"
00096 #include "DecayChain/Function/DCConjugateFunction.h"
00097 #include "DecayChain/Element/conjugation.h"
00098 #include "DecayChain/Element/LabeledParticle.h"
00099 #include "DecayChain/Iterator/MuteWholeItr.h"
00100 #include "DecayChain/Iterator/WholeItr.h"
00101 #include "DecayChain/Iterator/PartialItr.h"
00102 #include "DecayChain/List/LabeledParticleList.h"
00103 #include "DecayChain/List/CombinatoricList.h"
00104 
00105 #include "DecayChain/List/DCDecayList.h"
00106 
00107 //
00108 // constants, enums and typedefs
00109 //
00110 
00111 //
00112 // static data member definitions
00113 //
00114 
00115 //
00116 // constructors and destructor
00117 //
00118 template < class DecayClass , class CandidateClass >
00119 DCDecayList< DecayClass , CandidateClass >::DCDecayList( bool ( * pFunction )( DecayClass& ) ) :
00120    m_function( pFunction ) ,
00121    m_functionalObject( 0 )
00122 {
00123 }
00124 
00125 template < class DecayClass , class CandidateClass >
00126 DCDecayList< DecayClass , CandidateClass >::DCDecayList( const DCDecayList< DecayClass , CandidateClass >& aOtherList ,
00127                                         bool ( * pFunction )( DecayClass& ) ) :
00128    dchain::DecayList<DecayClass,CandidateClass>(),
00129    m_function( pFunction ) ,
00130    m_functionalObject( 0 )
00131 {
00132    fill( aOtherList ) ;
00133 }
00134 
00135 template < class DecayClass , class CandidateClass >
00136 DCDecayList< DecayClass , CandidateClass >::DCDecayList( DCSelectionFunction< DecayClass >& aFunctionalObject ) :
00137       m_function( 0 ) ,
00138    m_functionalObject( &aFunctionalObject )
00139 {
00140 }
00141 
00142 
00143 template < class DecayClass , class CandidateClass >
00144 DCDecayList< DecayClass , CandidateClass >::DCDecayList( dchain::LabeledParticleList< DecayClass , CandidateClass >& aLabeledList , dchain::conjugation::Label aLabel ) :
00145    dchain::DecayList<DecayClass,CandidateClass>(aLabeledList, aLabel),
00146    m_function( 0 ) ,
00147    m_functionalObject( 0 )
00148 {
00149 }
00150 
00151 //
00152 // assignment operators
00153 //
00154 
00155 template < class DecayClass , class CandidateClass >
00156 const DCDecayList< DecayClass , CandidateClass >& DCDecayList< DecayClass , CandidateClass >::operator=( const dchain::CombinatoricList< CandidateClass >& aOtherList )
00157 {
00158    //std::cout << "@DCDecayList::operator=() ... (CombinatoricList)" << std::endl;
00159    this->erase();
00160    fill(aOtherList);
00161    //static_cast<dchain::DecayList<DecayClass,CandidateClass>&>(*this)=aOtherList;
00162    return *this;
00163 }
00164 
00165 //
00166 // member functions
00167 //
00168 
00169 
00170 //
00171 // const member functions
00172 //
00173 
00174 
00175 
00176 //
00177 // static member functions
00178 //
00179 
00180 #endif /* DCHAIN_DCDECAYLIST_CC */

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