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

Go to the documentation of this file.
00001 #ifndef DCHAIN_NEUTRALVISIBLELIST_CC
00002 #define DCHAIN_NEUTRALVISIBLELIST_CC
00003 // -*- C++ -*-
00004 //
00005 // Package:     DChain
00006 // Module:      NeutralVisibleList
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: NeutralVisibleList.cc,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
00016 //
00017 // Revision history
00018 //
00019 // $Log: NeutralVisibleList.cc,v $
00020 // Revision 1.1.1.1  2009/03/03 06:06:56  maqm
00021 // first import of DecayChain
00022 //
00023 // Revision 1.1  2006/01/11 20:28:40  cdj
00024 // massive class renaming, addition of [] for selection and unit tests
00025 //
00026 // Revision 1.2  2003/05/15 19:56:13  cdj
00027 // revamped memory handling so always use a ReferenceHolder to deal with the reference counting
00028 //
00029 // Revision 1.1.1.1  2000/12/18 22:16:56  cdj
00030 // imported DChain
00031 //
00032 // Revision 1.14  1998/08/20 20:00:14  sjp
00033 // Modified to use DChainBoolean
00034 //
00035 // Revision 1.13  1998/08/19 20:46:26  sjp
00036 // Fixed comments and removed report references
00037 //
00038 // Revision 1.12  1998/04/17 19:14:54  sjp
00039 // Modified to use latest type
00040 //
00041 // Revision 1.11  1997/09/17 20:05:36  sjp
00042 // Removed filling to superclass
00043 //
00044 // Revision 1.10  1997/09/03 14:58:28  sjp
00045 // Use new report.h and TBParticlePoint
00046 //
00047 // Revision 1.9  1997/08/28 07:00:23  sjp
00048 // Modified files to handle complete templating
00049 //
00050 // Revision 1.8  1997/08/19 23:02:39  sjp
00051 // Restructured package to be independent of Rock
00052 //
00053 // Revision 1.7  1997/08/19 15:55:29  sjp
00054 // Modified list to have no dependence on any other
00055 //   structures except its contents, which must have
00056 //   certain `typedef' available to use.
00057 //
00058 // Revision 1.6  1997/08/15 21:33:55  sjp
00059 // Updated to use <package>/<file>.h include structure.
00060 // Updated to use bug flags specified in Experiement.h
00061 //
00062 // Revision 1.5  1997/01/31 20:16:29  sjp
00063 // Modified to use the new `bug' include files
00064 //
00065 // Revision 1.4  1997/01/21 20:31:50  sjp
00066 // Changed CPP flags and include because of library reorganization
00067 //
00068 // Revision 1.3  1996/12/20 21:14:03  sjp
00069 // Changed aPossible to Possible and added dropLink where nec.
00070 //
00071 // Revision 1.2  1996/11/05 19:31:31  sjp
00072 // Added definition for filling for TruthTable.
00073 //
00074 // Revision 1.1  1996/11/04 17:17:22  sjp
00075 // New file for new `List' module
00076 //
00077 
00078 // system include files
00079 #include <stdlib.h>  // required for 'exit'
00080 
00081 // user include files
00082 #include "DecayChain/Element/conjugation.h"
00083 #include "DecayChain/Element/LabeledParticle.h"
00084 #include "DecayChain/Iterator/MuteWholeItr.h"
00085 #include "DecayChain/Iterator/WholeItr.h"
00086 #include "DecayChain/List/LabeledParticleList.h"
00087 
00088 #include "DecayChain/List/NeutralVisibleList.h"
00089 
00090 namespace dchain {
00091 //
00092 // constants, enums and typedefs
00093 //
00094 
00095 //
00096 // static data member definitions
00097 //
00098 
00099 //
00100 // constructors and destructor
00101 //
00102 
00103 template< class Neutral , class CandidateClass >
00104 NeutralVisibleList< Neutral , CandidateClass >::
00105 NeutralVisibleList() :
00106    dchain::ConjugateList< CandidateClass >( dchain::conjugation::kNone ) ,
00107    m_list( (new dchain::LabeledParticleList< Neutral , CandidateClass >) )
00108 {
00109 }
00110 
00111 template< class Neutral , class CandidateClass >
00112 NeutralVisibleList< Neutral , CandidateClass >::
00113 NeutralVisibleList( const NeutralVisibleList< Neutral , CandidateClass >&  aOtherList ) :
00114    dchain::ConjugateList< CandidateClass >( dchain::conjugation::kNone ) ,
00115    m_list( (new dchain::LabeledParticleList< Neutral , CandidateClass >) )
00116 {
00117    typedef typename MakerTrait<Neutral>::maker_type Maker;
00118   fill( *(aOtherList.m_list), Maker(), SelectAll<Neutral>() ) ;
00119 
00120 }
00121 
00122 
00123 template< class Neutral , class CandidateClass >
00124 NeutralVisibleList< Neutral , CandidateClass >::
00125 ~NeutralVisibleList()
00126 {
00127 }
00128 
00129 //
00130 // assignment operators
00131 //
00132 
00133 template< class Neutral , class CandidateClass >
00134 const NeutralVisibleList< Neutral , CandidateClass >& NeutralVisibleList< Neutral , CandidateClass >::operator=( const NeutralVisibleList< Neutral , CandidateClass >& aOtherList )
00135 {
00136    eraseContents() ;
00137    typedef typename MakerTrait<Neutral>::maker_type Maker;
00138    fill( *(aOtherList.m_list), Maker(), SelectAll<Neutral>() ) ;
00139    return ( *this ) ;
00140 }
00141 
00142 //
00143 // member functions
00144 //
00145 
00146 template< class Neutral , class CandidateClass >
00147 typename NeutralVisibleList< Neutral , CandidateClass >::iterator NeutralVisibleList< Neutral , CandidateClass >::particle_begin()
00148 {
00149    return ( m_list->begin() ) ;
00150 }
00151 
00152 template< class Neutral , class CandidateClass >
00153 typename NeutralVisibleList< Neutral , CandidateClass >::iterator NeutralVisibleList< Neutral , CandidateClass >::particle_end()
00154 {
00155    return ( m_list->end() ) ;
00156 }
00157 
00158 template< class Neutral , class CandidateClass >
00159 dchain::LabeledParticleList< Neutral, CandidateClass >& NeutralVisibleList< Neutral , CandidateClass >::labeledCandidateList()
00160 {
00161    return ( *m_list ) ;
00162 }
00163 
00164 
00165 template < class Neutral , class CandidateClass >
00166 void NeutralVisibleList< Neutral , CandidateClass >::eraseContents()
00167 {
00168    m_list->erase( m_list->begin() ,
00169                   m_list->end() ) ;
00170 }
00171 
00172 //
00173 // const member functions
00174 //
00175 
00176 template< class Neutral , class CandidateClass >
00177 typename NeutralVisibleList< Neutral , CandidateClass >::const_iterator NeutralVisibleList< Neutral , CandidateClass >::particle_begin() const
00178 {
00179 // Need to cast to 'const' to get the right function call
00180   return ( (*(const dchain::LabeledParticleList< Neutral , CandidateClass >*)(m_list.pointer())).begin() ) ;
00181 }
00182 
00183 template< class Neutral , class CandidateClass >
00184 typename NeutralVisibleList< Neutral , CandidateClass >::const_iterator NeutralVisibleList< Neutral , CandidateClass >::particle_end() const
00185 {
00186 // Need to cast to 'const' to get the right function call
00187   return ( (*(const dchain::LabeledParticleList< Neutral , CandidateClass >*)(m_list.pointer())).end() ) ;
00188 }
00189 
00190 
00191 template< class Neutral , class CandidateClass >
00192 const dchain::LabeledParticleList< Neutral, CandidateClass >& NeutralVisibleList< Neutral , CandidateClass >::labeledCandidateList() const
00193 {
00194    return ( *m_list ) ;
00195 }
00196 
00197 //
00198 // static member functions
00199 //
00200 }
00201 #endif /* DCHAIN_NEUTRALVISIBLELIST_CC */

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