Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

AIDA_FitDataIterator.h

Go to the documentation of this file.
00001  /**********************************************************************
00002   *                                                                    *
00003   * Copyright (c) 2002 Lorenzo Moneta, CERN/IT                       *
00004   *                   <Lorenzo.Moneta.cern.ch>                       *
00005   *                                                                    *
00006   * This library is free software; you can redistribute it and/or      *
00007   * modify it under the terms of the GNU Lesser General Public         *
00008   * License as published by the Free Software Foundation; either       *
00009   * version 2.1 of the License, or (at your option) any later version. *
00010   *                                                                    *
00011   * This library is distributed in the hope that it will be useful,    *
00012   * but WITHOUT ANY WARRANTY; without even the implied warranty of     *
00013   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014   * Lesser General Public License for more details.                    *
00015   *                                                                    *
00016   * You should have received a copy of the GNU Lesser General Public   *
00017   * License along with this library (see file COPYING); if not, write  *
00018   * to the Free Software Foundation, Inc., 59 Temple Place, Suite      *
00019   * 330, Boston, MA 02111-1307 USA, or contact the author.             *
00020   *                                                                    *
00021   **********************************************************************/
00022 
00023 // Header file for class AIDA_FitDataIterator
00024 // 
00025 // Authors  : Lorenzo Moneta , Jakub Moscicki
00026 // Created  : Fri Oct  4 16:44:49 2002
00027 // 
00028 // Last update: Fri Oct  4 16:44:49 2002
00029 // 
00030 #ifndef ANAPHE_AIDA_FITTER_FML_AIDA_FITDATAITERATOR
00031 #define ANAPHE_AIDA_FITTER_FML_AIDA_FITDATAITERATOR 1
00032 
00033 #include "IDevFitDataIteratorFMLBase.h"
00034 #include "FML/DataVector.h"
00035 #include "FML/DataVectorIterator.h"
00036 
00037 #include <memory>
00038 #include <vector>
00039 
00040 namespace Anaphe { 
00041    namespace AIDA_Function_FML { 
00042     class AIDA_RangeSet; 
00043    }
00044  }
00045 
00046 
00047 namespace Anaphe  { 
00048   namespace AIDA_Fitter_FML { 
00049 
00050 
00051     class AIDA_FitDataIterator : virtual public IDevFitDataIteratorFMLBase {
00052 
00053     public: 
00054 
00055       virtual ~AIDA_FitDataIterator(); 
00056 
00057     private:
00058       // usually copying is non trivial, so we make this unaccessible
00059       AIDA_FitDataIterator(const AIDA_FitDataIterator &); 
00060       AIDA_FitDataIterator & operator = (const AIDA_FitDataIterator &); 
00061 
00062     public: 
00063 
00065       void start();
00066       bool next();
00067       int entries() const;
00068       const std::vector<double>  & vars() const;
00069       double value() const;
00070       double error() const;
00071       double minusError() const;
00072 
00074       Anaphe::FML::IFMLDataIterator & getIFMLDataIterator();
00075 
00076 
00077       // fill vector data - must be implemented by derived classes
00078       virtual void fillData(const std::vector<Anaphe::AIDA_Function_FML::AIDA_RangeSet * > & ranges); 
00079 
00080     protected: 
00081   
00082       // protect constructor
00083       AIDA_FitDataIterator(); 
00084       
00087       void setVector(std::auto_ptr<FML::DataVector> vptr);
00088 
00089 
00090     private: 
00091 
00092       std::auto_ptr<FML::DataVector> m_vector;
00093       std::auto_ptr<FML::DataVectorIterator> m_it;
00094 
00095 }; 
00096 
00097   }     // end of namespace Anaphe::AIDA_Fitter_FML
00098 }
00099 #endif /* AIDA_FITDATAITERATOR */

Generated on Tue May 20 14:49:01 2003 for AIDA_Fitter_FML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002