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

Go to the documentation of this file.
00001 #ifndef DCHAIN_DCCHARGEDVISIBLELIST_H
00002 #define DCHAIN_DCCHARGEDVISIBLELIST_H
00003 // -*- C++ -*-
00004 //
00005 // Package:     DChain
00006 // Module:      ChargedVisibleList
00007 // 
00008 // Description: List to hold Candidate subclasses generated from VisibleEvidence
00009 //
00010 // Usage:
00011 //    <usage>
00012 //
00013 // Author:      Simon Patton
00014 // Created:     Fri Oct  4 11:04:47 EDT 1996
00015 // $Id: DCChargedVisibleList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
00016 //
00017 // Revision history
00018 //
00019 // $Log: DCChargedVisibleList.h,v $
00020 // Revision 1.1.1.1  2009/03/03 06:06:56  maqm
00021 // first import of DecayChain
00022 //
00023 // Revision 1.5  2006/01/11 20:28:23  cdj
00024 // massive class renaming, addition of [] for selection and unit tests
00025 //
00026 // Revision 1.4  2003/08/01 13:48:40  mrs43
00027 // changed plus and minus methods of DCChargedVisibleList to const
00028 //
00029 // Revision 1.3  2003/05/15 19:56:06  cdj
00030 // revamped memory handling so always use a ReferenceHolder to deal with the reference counting
00031 //
00032 // Revision 1.2  2000/12/30 19:43:29  cdj
00033 // no more missing symbols under OSF1
00034 //
00035 // Revision 1.1.1.1  2000/12/18 22:16:51  cdj
00036 // imported DChain
00037 //
00038 // Revision 1.11  1998/08/20 19:58:59  sjp
00039 // Modified to use DChainBoolean
00040 //
00041 // Revision 1.10  1998/04/17 19:10:59  sjp
00042 // Modified to use latest types
00043 //
00044 // Revision 1.9  1997/09/17 20:05:27  sjp
00045 // Removed filling to superclass
00046 //
00047 // Revision 1.8  1997/08/28 06:59:44  sjp
00048 // Modified files to handle complete templating
00049 //
00050 // Revision 1.7  1997/08/19 15:55:06  sjp
00051 // Modified list to have no dependence on any other
00052 //   structures except its contents, which must have
00053 //   certain `typedef' available to use.
00054 //
00055 // Revision 1.6  1997/08/15 21:32:09  sjp
00056 // Updated to use <package>/<file>.h include structure.
00057 // Updated to use bug flags specified in Experiement.h
00058 //
00059 // Revision 1.5  1997/01/31 20:17:00  sjp
00060 // Modified to use the new `bug' include files
00061 //
00062 // Revision 1.4  1997/01/22 16:27:09  sjp
00063 // Fixed error in pre-processor labels
00064 //
00065 // Revision 1.3  1997/01/21 20:33:37  sjp
00066 // Changed CPP flags and include because of library reorganization
00067 //
00068 // Revision 1.2  1996/12/20 21:19:00  sjp
00069 // Extended pathnames for Include files
00070 //
00071 // Revision 1.1  1996/11/04 19:35:48  sjp
00072 // New file for new `List' module
00073 //
00074 
00075 // system include files
00076 
00077 // user include files
00078 #include "DecayChain/List/ChargedVisibleList.h" // superclass declaration
00079 #include "DecayChain/List/ChosenChargeList.h" // for return-by-value
00080 #include "DecayChain/Element/MutableReferenceHolder.h"
00081 #include "DecayChain/Function/DCSelectionFunction.h"
00082 #include "DecayChain/Function/DCUnaryAdapter.h"
00083 
00084 // forward declarations
00085 template < class DecayClass , class CandidateClass > class LabeledParticleList;
00086 template < class Arg > class DCSelectionFunction ;
00087 template < class Arg > class DCAnalysisFunction ;
00088 
00089 //
00090 //  Note: To avoid a myriad of compiler flags it is easier to
00091 //        have a two parameter template class.  The instantiation
00092 //        of this class must look like
00093 //
00094 //        template class LabeledDecayList< A , A::CandidateClass > ;
00095 
00096 template < class Charged , class CandidateClass >
00097 class DCChargedVisibleList : public dchain::ChargedVisibleList< Charged, CandidateClass >
00098 {
00099    // friend classses and functions
00100 
00101    public:
00102       // constants, enums and typedefs
00103       typedef dchain::MuteWholeItr< Charged > iterator ;
00104       typedef dchain::WholeItr< Charged > const_iterator ;
00105       typedef dchain::PartialItr< Charged > const_partial_iterator ;
00106 
00107       typedef Charged value_type ;
00108 
00109       // Constructors and destructor
00110       DCChargedVisibleList( bool ( * pFunction )( Charged& ) = 0 ) ;
00111       DCChargedVisibleList( const DCChargedVisibleList< Charged , CandidateClass >& aOtherList ,
00112             bool ( * pFunction )( Charged& ) = 0 ) ;
00113       DCChargedVisibleList( DCSelectionFunction< Charged >& aFunctionalObject ) ;
00114       DCChargedVisibleList( const DCChargedVisibleList< Charged , CandidateClass >& aOtherList ,
00115             DCSelectionFunction< Charged >& aFunctionalObject ) ;
00116       virtual ~DCChargedVisibleList() ;
00117 
00118       // assignment operator(s)
00119       const DCChargedVisibleList< Charged , CandidateClass >& operator=( const DCChargedVisibleList< Charged , CandidateClass >& aOtherList ) ;
00120 
00121       // member functions
00122       // static member functions
00123 
00124    protected:
00125       // protected member functions
00126       using dchain::ChargedVisibleList<Charged,CandidateClass>::fill;
00127       void fill( const dchain::LabeledParticleList< Charged , CandidateClass >& aList ) ;
00128 
00129       template<class Iterator>
00130          void fill(Iterator first, Iterator last) {   
00131             if ( 0 != m_function ) {
00132                fill(first,last, dchain::NewMaker<Charged>(), m_function);
00133             } else if (m_functionalObject) {
00134                fill(first,last,dchain::NewMaker<Charged>(),m_functionalObject);
00135             } else {
00136                fill(first,last, dchain::NewMaker<Charged>(), dchain::SelectAll<Charged>());
00137             }
00138          }
00139 
00140 
00141       // protected const member functions
00142 
00143    private:
00144       // Constructors and destructor
00145 
00146       // private member functions
00147 
00148       // private const member functions
00149 
00150       // data members
00151       bool ( * m_function )( Charged& ) ;
00152       dchain::DCUnaryAdapter<DCSelectionFunction< Charged > > m_functionalObject ;
00153 
00154       // static data members
00155 
00156 } ;
00157 
00158 // inline function definitions
00159 
00160 // function definitions
00161 #include "DecayChain/List/Template/DCChargedVisibleList.cc"
00162 
00163 #endif /* DCHAIN_DCCHARGEDVISIBLELIST_H */
00164 

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