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

Go to the documentation of this file.
00001 #ifndef DCHAIN_FILLABLENEUTRALLIST_H
00002 #define DCHAIN_FILLABLENEUTRALLIST_H
00003 // -*- C++ -*-
00004 //
00005 // Package:     DChain
00006 // Module:      FillableNeutralList
00007 // 
00008 // Description: List to hold Candidates generated from observed Tracks.
00009 //
00010 // Usage:
00011 //    <usage>
00012 //
00013 // Author:      Simon Patton
00014 // Created:     Fri Oct  4 11:04:47 EDT 1996
00015 // $Id: DCFillableNeutralList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
00016 //
00017 // Revision history
00018 //
00019 // $Log: DCFillableNeutralList.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  2003/12/16 15:45:41  cdj
00027 // added include file needed for Linux
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  2001/03/28 14:27:57  urner
00033 // added same workaround as for charged because of NonTemplatedMemberFunctionBug
00034 //
00035 // Revision 1.2  2001/03/23 23:07:44  urner
00036 // modification needed to add pi0 eta and Ks decay lists in CleoDChain
00037 //
00038 // Revision 1.1.1.1  2000/12/18 22:16:52  cdj
00039 // imported DChain
00040 //
00041 // Revision 1.3  1998/08/20 19:59:04  sjp
00042 // Modified to use DChainBoolean
00043 //
00044 // Revision 1.2  1998/04/17 19:11:03  sjp
00045 // Modified to use latest types
00046 //
00047 // Revision 1.1  1997/09/17 20:06:20  sjp
00048 // New class to separate filling from behaviour
00049 //
00050 
00051 // system include files
00052 #include <vector>
00053 
00054 // user include files
00055 #include "DecayChain/List/DCNeutralVisibleList.h" // superclass declaration
00056 
00057 // forward declarations
00058 
00059 template< class Neutral >
00060 //          class TruthWitnesses ,
00061 //          class VisibleWitnesses >
00062 class DCFillableNeutralList : 
00063    public DCNeutralVisibleList< Neutral , 
00064                                 typename Neutral::CandidateClass >
00065 {
00066       // friend classes and functions
00067 
00068    public:
00069       // constants, enums and typedefs
00070 
00071       // Constructors and destructor
00072       DCFillableNeutralList( bool ( * pFunction )( Neutral& ) = 0 ) ;
00073       template <class WitnessIterator>
00074       DCFillableNeutralList(WitnessIterator first, WitnessIterator last,
00075                             bool ( * pFunction )( Neutral& ) = 0 ) :
00076          DCNeutralVisibleList<Neutral, typename Neutral::CandidateClass>(pFunction) {
00077             fill(first, last); }
00078       //DCFillableNeutralList( const TruthWitnesses& aTruthList ,
00079         //                 bool ( * pFunction )( Neutral& ) = 0 ) ;
00080       //DCFillableNeutralList( const VisibleWitnesses& aVisibleList ,
00081         //                 bool ( * pFunction )( Neutral& ) = 0 ) ;
00082       //DCFillableNeutralList( const TruthWitnesses& aTruthList ,
00083         //                 DCSelectionFunction< Neutral >& aFunctionalObject ) ;
00084       //DCFillableNeutralList( const VisibleWitnesses& aVisibleList ,
00085         //                 DCSelectionFunction< Neutral >& aFunctionalObject ) ;
00086 //
00087       template <class WitnessIterator>
00088       DCFillableNeutralList(WitnessIterator first, WitnessIterator last,
00089                             DCSelectionFunction< Neutral >& aFunctionalObject ) :
00090          DCNeutralVisibleList<Neutral, typename Neutral::CandidateClass>(aFunctionalObject) {
00091             fill(first, last); }
00092       DCFillableNeutralList( const DCFillableNeutralList< Neutral >& aOtherList ,
00093                            bool ( * pFunction )( Neutral& ) = 0 ) ;
00094       DCFillableNeutralList( DCSelectionFunction< Neutral >& aFunctionalObject ) ;
00095       DCFillableNeutralList( const DCFillableNeutralList< Neutral >& aOtherList ,
00096                            DCSelectionFunction< Neutral >& aFunctionalObject ) ;
00097       DCFillableNeutralList( const std::vector<Neutral>& aVector ) ;
00098       virtual ~DCFillableNeutralList() ;
00099       
00100       // assignment operator(s)
00101       //const DCFillableNeutralList< Neutral , TruthWitnesses , VisibleWitnesses >& operator=( const TruthWitnesses& aTruthList ) ;
00102       //const DCFillableNeutralList< Neutral , TruthWitnesses , VisibleWitnesses >& operator=( const VisibleWitnesses& aVisibleList ) ;
00103 //
00104       const DCFillableNeutralList< Neutral >& operator=( const DCFillableNeutralList< Neutral >& aOtherList );
00105 
00106 
00107 
00108       template<class WitnessIterator>
00109       void fill(WitnessIterator first, WitnessIterator last) {
00110   DCNeutralVisibleList< Neutral , typename Neutral::CandidateClass >::fill(first,last);
00111       }
00112 
00113       template<class Witness>
00114       const DCFillableNeutralList<Neutral>& operator=(const Witness& aWitnessList) {
00115          this->eraseContents();
00116          fill(aWitnessList.begin(), aWitnessList.end());
00117          return ( *this ) ;
00118       }
00119       
00120       // member functions
00121 
00122       // const member functions
00123 
00124       // static member functions
00125 
00126    protected:
00127       // protected member functions
00128 
00129       // protected const member functions
00130 
00131    private:
00132       // Constructors and destructor
00133 
00134       // private member functions
00135       //void fill( const TruthWitnesses& aList ) ;
00136       //void fill( const VisibleWitnesses& aList ) ;
00137       void fill( const dchain::LabeledParticleList< Neutral , typename Neutral::CandidateClass >& aList ) ;
00138 
00139       // private const member functions
00140 
00141       // data members
00142 
00143       // static data members
00144 
00145 } ;
00146 
00147 // inline function definitions
00148 
00149 // function definitions
00150 #include "DecayChain/List/Template/DCFillableNeutralList.cc"
00151 
00152 template<class Neutral, class WitnessIterator>
00153 inline
00154 void dc_fill(DCFillableNeutralList<Neutral>& aFillableList, 
00155              WitnessIterator first, 
00156              WitnessIterator last)
00157 {
00158   aFillableList.fill(first,last);
00159 }
00160 
00161 
00162 #endif /* DCHAIN_FILLABLENEUTRALLIST_H */

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