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

AIDA_FitDataIterator.cpp

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 // Implementation 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 
00031 #include "AIDA_FitDataIterator.h"
00032 #include "AIDA_Function_FML/AIDA_RangeSet.h"
00033 #include "FML/debug.h"
00034 
00035 #ifdef __sun
00036 #include <assert.h>
00037 #endif
00038 
00039 
00040 namespace Anaphe  { 
00041   namespace AIDA_Fitter_FML { 
00042 
00043 
00044     AIDA_FitDataIterator::AIDA_FitDataIterator() 
00045     {
00046     }
00047     
00048     AIDA_FitDataIterator::~AIDA_FitDataIterator() 
00049     {
00050     }
00051 
00052     AIDA_FitDataIterator::AIDA_FitDataIterator(const AIDA_FitDataIterator &) 
00053     {
00054     }
00055 
00056     AIDA_FitDataIterator & AIDA_FitDataIterator::operator = (const AIDA_FitDataIterator &rhs) 
00057     {
00058       if (this == &rhs) return *this;  // time saving self-test
00059    
00060       return *this;
00061     }
00062 
00063 
00064      void AIDA_FitDataIterator::start()
00065     {
00066       assert(m_it.get());
00067       m_it->start();
00068     }
00069 
00070     bool AIDA_FitDataIterator::next()
00071     {
00072       assert(m_it.get());
00073       m_it->next();
00074       return m_it->current();
00075     }
00076 
00077     int AIDA_FitDataIterator::entries() const
00078     {
00079       assert(m_it.get());
00080       return m_it->numberOfEntries();
00081     }
00082 
00083     double AIDA_FitDataIterator::value() const
00084     {
00085       assert(m_it.get());
00086       return m_it->value();
00087     }
00088 
00089     const std::vector<double>& AIDA_FitDataIterator::vars() const
00090     {
00091       assert(m_it.get());
00092       return m_it->coords();
00093     }
00094 
00095     double AIDA_FitDataIterator::error() const
00096     {
00097       assert(m_it.get());
00098       return m_it->vErrorPlus();
00099     }
00100     
00101     double AIDA_FitDataIterator::minusError() const
00102     {
00103       assert(m_it.get());
00104       return m_it->vErrorMinus();
00105     }
00106   
00107     Anaphe::FML::IFMLDataIterator & AIDA_FitDataIterator::getIFMLDataIterator()
00108     {
00109       return *m_it.get();
00110     }
00111 
00112     void AIDA_FitDataIterator::setVector(std::auto_ptr<FML::DataVector> vptr)
00113     {
00114       m_vector = vptr;
00115       std::auto_ptr<FML::DataVectorIterator> it(new FML::DataVectorIterator(*m_vector.get()));
00116       m_it = it;                                                
00117     }
00118 
00119     void AIDA_FitDataIterator::fillData(const std::vector<Anaphe::AIDA_Function_FML::AIDA_RangeSet * > & ranges) 
00120     { 
00121       INFO_MSG(" AIDA_FitDataIterator::fillVector() should be called by derived classes ! ");  
00122     }
00123 
00124   }     // end of namespace Anaphe::AIDA_Fitter_FML
00125 } 

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