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

Go to the documentation of this file.
00001 #ifndef DCHAIN_DCFILLABLECHARGEDLIST_H
00002 #define DCHAIN_DCFILLABLECHARGEDLIST_H
00003 // -*- C++ -*-
00004 //
00005 // Package:     DChain
00006 // Module:      FillableChargedList
00007 // 
00008 // Description: <one line class summary>
00009 //
00010 // Usage:
00011 //    <usage>
00012 //
00013 // Author:      Simon Patton
00014 // Created:     Wed Sep  3 13:47:79 EDT 1997
00015 // $Id: DCFillableChargedList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
00016 //
00017 // Revision history
00018 //
00019 // $Log: DCFillableChargedList.h,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:25  cdj
00024 // massive class renaming, addition of [] for selection and unit tests
00025 //
00026 // Revision 1.5  2004/09/09 15:48:22  emilie
00027 // made the fill function public
00028 //
00029 // Revision 1.4  2002/07/23 20:19:13  cdj
00030 // Can now use dc_fill even when compiler has templated member functions
00031 //
00032 // Revision 1.3  2000/12/30 19:43:30  cdj
00033 // no more missing symbols under OSF1
00034 //
00035 // Revision 1.2  2000/12/19 23:40:09  cdj
00036 // dc_fill now works correctly
00037 //
00038 // Revision 1.1.1.1  2000/12/18 22:16:52  cdj
00039 // imported DChain
00040 //
00041 // Revision 1.4  1998/08/20 19:59:01  sjp
00042 // Modified to use DChainBoolean
00043 //
00044 // Revision 1.3  1998/08/19 20:39:52  sjp
00045 // Fixed include path for defintions
00046 //
00047 // Revision 1.2  1998/04/17 19:11:02  sjp
00048 // Modified to use latest types
00049 //
00050 // Revision 1.1  1997/09/17 20:06:17  sjp
00051 // New class to separate filling from behaviour
00052 //
00053 
00054 // system include files
00055 
00056 // user include files
00057 #include "DecayChain/List/DCChargedVisibleList.h" // superclass declaration
00058 
00059 // forward declarations
00060 
00061 template < class Charged >
00062 class DCFillableChargedList : public DCChargedVisibleList< Charged , typename Charged::CandidateClass >
00063 {
00064       // friend classes and functions
00065 
00066    public:
00067       // constants, enums and typedefs
00068 
00069       // Constructors and destructor
00070       DCFillableChargedList( bool ( * pFunction )( Charged& ) = 0 ) ;
00071       template <class WitnessIterator>
00072       DCFillableChargedList(WitnessIterator first, WitnessIterator last, 
00073                             bool ( * pFunction )( Charged& ) = 0 ) :
00074             DCChargedVisibleList<Charged, typename Charged::CandidateClass>(pFunction){
00075          fill(first, last); }
00076 
00077       //DCFillableChargedList( const TruthWitnesses& aTruthList ,
00078         //                 bool ( * pFunction )( Charged& ) = 0 ) ;
00079       //DCFillableChargedList( const VisibleWitnesses& aVisibleList ,
00080         //                 bool ( * pFunction )( Charged& ) = 0 ) ;
00081       template<class WitnessIterator>
00082       DCFillableChargedList(WitnessIterator first, WitnessIterator last, 
00083                             DCSelectionFunction< Charged >& aFunctionalObject )
00084          : DCChargedVisibleList<Charged, typename Charged::CandidateClass>(aFunctionalObject) {
00085          fill(first, last); }
00086 
00087       //DCFillableChargedList( const TruthWitnesses& aTruthList ,
00088         //                 DCSelectionFunction< Charged >& aFunctionalObject );
00089       //DCFillableChargedList( const VisibleWitnesses& aVisibleList ,
00090         //                 DCSelectionFunction< Charged >& aFunctionalObject );
00091 //
00092       DCFillableChargedList( const DCFillableChargedList< Charged >& aOtherList
00093                         , bool ( * pFunction )( Charged& ) = 0 ) ;
00094       DCFillableChargedList( DCSelectionFunction< Charged >& aFunctionalObject ) ;
00095       DCFillableChargedList( const DCFillableChargedList< Charged >& aOtherList
00096                         , DCSelectionFunction< Charged >& aFunctionalObject ) ;
00097       virtual ~DCFillableChargedList() ;
00098 
00099       // assignment operator(s)
00100       const DCFillableChargedList< Charged >& operator=( const DCFillableChargedList< Charged >& aOtherList ) ;
00101       
00102       template<class Witness>
00103       const DCFillableChargedList<Charged>& operator=(const Witness& aWitnessList) {
00104          this->eraseContents();
00105          fill(aWitnessList.begin(), aWitnessList.end());
00106          return ( *this ) ;
00107       }
00108 
00109       // member functions
00110       template<class WitnessIterator>
00111          void fill(WitnessIterator first, WitnessIterator last) {
00112             DCChargedVisibleList<Charged, typename Charged::CandidateClass>::fill(first,
00113                   last);
00114          }
00115 
00116       // const member functions
00117 
00118       // static member functions
00119 
00120    protected:
00121       // protected member functions
00122 
00123       // protected const member functions
00124 
00125    private:
00126       // Constructors and destructor
00127       //DCFillableChargedList( const DCFillableChargedList< Charged >& ); // stop default
00128 
00129       // private member functions
00130       void fill( 
00131          const dchain::LabeledParticleList< Charged , 
00132                                   typename Charged::CandidateClass >& aList ) {
00133          DCChargedVisibleList< Charged , 
00134                          typename Charged::CandidateClass >::fill( aList ) ;
00135       }
00136 
00137       // private const member functions
00138 
00139       // data members
00140 
00141       // static data members
00142 
00143 };
00144 
00145 // inline function definitions
00146 
00147 // templated member function definitions
00148 # include "DecayChain/List/Template/DCFillableChargedList.cc"
00149 
00150 template<class Charged, class WitnessIterator>
00151 inline
00152 void dc_fill(DCFillableChargedList<Charged>& aFillableList, 
00153              WitnessIterator first, 
00154              WitnessIterator last)
00155 {
00156   aFillableList.fill(first,last);
00157 }
00158 
00159 #endif /* DCHAIN_DCFILLABLECHARGEDLIST_H */

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