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

Go to the documentation of this file.
00001 #ifndef DCHAIN_CHOSENCHARGELIST_H
00002 #define DCHAIN_CHOSENCHARGELIST_H
00003 // -*- C++ -*-
00004 //
00005 // Package:     DChain
00006 // Module:      ChosenChargeList
00007 // 
00008 // Description: List to hold a ConjugateList of ChargedVisible.
00009 //
00010 // Usage:
00011 //    <usage>
00012 //
00013 // Author:      Simon Patton
00014 // Created:     Fri Oct  4 11:04:47 EDT 1996
00015 // $Id: ChosenChargeList.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
00016 //
00017 // Revision history
00018 //
00019 // $Log: ChosenChargeList.h,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:21  cdj
00024 // massive class renaming, addition of [] for selection and unit tests
00025 //
00026 //
00027 
00028 // system include files
00029 
00030 // user include files
00031 #include "DecayChain/List/ConjugateList.h" // superclass declaration
00032 #include "DecayChain/Element/MutableReferenceHolder.h"
00033 
00034 // forward declarations
00035 namespace dchain {
00036    template < class Charged , class CandidateClass > class ChargedVisibleList ;
00037 }
00038 
00039 namespace dchain {
00040 
00041 template < class DecayClass > class MuteWholeItr ;
00042 template < class DecayClass > class WholeItr ;
00043 template < class DecayClass > class PartialItr ;
00044 template < class DecayClass , class CandidateClass > class LabeledParticleList ;
00045 }
00046 
00047 //#include <vector>
00048 
00049 template < class Arg > class DCAnalysisFunction ;
00050 
00051 namespace dchain {
00052 
00053 template < class Charged , class CandidateClass >
00054 class ChosenChargeList : public ConjugateList< CandidateClass >
00055 {
00056    // friend classses and functions
00057    friend class dchain::ChargedVisibleList< Charged , CandidateClass > ;
00058 
00059    public:
00060    // constants, enums and typedefs
00061    typedef dchain::MuteWholeItr< Charged > iterator ;
00062    typedef dchain::WholeItr< Charged > const_iterator ;
00063    typedef dchain::PartialItr< Charged > const_partial_iterator ;
00064 
00065    // Constructors and destructor
00066    virtual ~ChosenChargeList() ;
00067 
00068    // member functions
00069    iterator particle_begin() ;
00070    iterator particle_end() ;
00071 
00072    // const member functions
00073    const_iterator particle_begin() const ;
00074    const_iterator particle_end() const ;
00075    const_partial_iterator partial_particle_begin() const ;
00076    const_partial_iterator partial_particle_end() const ;
00077    //
00078    template < class TAnalyzer >
00079       void iterate( const TAnalyzer& analyzer) const
00080       {
00081          const_iterator finished ( particle_end() ) ;
00082          for ( const_iterator entry ( particle_begin() ) ;
00083                entry != finished ;
00084                ++entry ) {
00085             analyze( (*entry)() ) ;
00086          }
00087       }
00088    template < class TAnalyzer>
00089       void conjugation_iterate( const TAnalyzer& analyzer) const 
00090       {
00091          const_iterator finished ( particle_end() ) ;
00092          for ( const_iterator entry ( particle_begin() ) ;
00093                entry != finished ;
00094                ++entry ) {
00095             analyze( (*entry)() , (*entry).label() == this->label() ) ;
00096          }
00097       }
00098 
00099    template < class TAnalyzer>
00100       void partial_iterate( const TAnalyzer& analyzer ) const {
00101          const_partial_iterator finished ( partial_particle_end() ) ;
00102          for ( const_partial_iterator entry ( partial_particle_begin() ) ;
00103                entry != finished ;
00104                ++entry ) {
00105             analyze( (*entry)() ) ;
00106          }
00107       }
00108    // static member functions
00109 
00110    protected:
00111    // Constructors and destructor
00112    ChosenChargeList( dchain::LabeledParticleList< Charged , CandidateClass >& aLabeledDecayList ,
00113          const conjugation::Label aLabel ) ;
00114 
00115    // protected member functions
00116    virtual dchain::LabeledCandidateList< CandidateClass >& labeledCandidateList() ;
00117 
00118    // protected const member functions
00119    virtual const dchain::LabeledCandidateList< CandidateClass >& labeledCandidateList() const ;
00120 
00121    private:
00122    // Constructors and destructor
00123    ChosenChargeList() ; // stop default
00124    ChosenChargeList( const ChosenChargeList< Charged , CandidateClass >& aOtherList ) ; // stop default
00125 
00126    // assignment operator(s)
00127    const ChosenChargeList< Charged , CandidateClass >& operator=( const ChosenChargeList< Charged , CandidateClass >& aOtherList ) ; // stop default
00128 
00129    // private member functions
00130 
00131    // private const member functions
00132 
00133    // data members
00134    MutableReferenceHolder< dchain::LabeledParticleList< Charged , CandidateClass > > m_list ;
00135 
00136    // static data members
00137 
00138 } ;
00139 }
00140 // inline function definitions
00141 
00142 // function definitions
00143 #include "DecayChain/List/Template/ChosenChargeList.cc"
00144 
00145 #endif /* DCHAIN_CHOSENCHARGELIST_H */

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