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_DataPointSetIterator 00024 // 00025 // Authors : Lorenzo Moneta , Jakub Moscicki 00026 // Created : Fri Oct 4 16:30:41 2002 00027 // 00028 // Last update: Fri Oct 4 16:30:41 2002 00029 // 00030 #ifndef ANAPHE_AIDA_FITTER_FML_AIDA_DATAPOINTSETITERATOR 00031 #define ANAPHE_AIDA_FITTER_FML_AIDA_DATAPOINTSETITERATOR 1 00032 00033 #include "AIDA_FitDataIterator.h" 00034 00035 #include <vector> 00036 00037 namespace AIDA { 00038 class IDataPointSet; 00039 } 00040 00041 00042 namespace Anaphe { 00043 namespace AIDA_Function_FML { 00044 class AIDA_RangeSet; 00045 } 00046 } 00047 00048 namespace Anaphe { 00049 namespace AIDA_Fitter_FML { 00050 00051 00052 class AIDA_DataPointSetIterator : public AIDA_FitDataIterator { 00053 00054 public: 00055 // construct with indeces using for the fit 00056 AIDA_DataPointSetIterator(const AIDA::IDataPointSet& dps, std::vector<int> indeces, int valIndex); 00057 virtual ~AIDA_DataPointSetIterator(); 00058 00059 private: 00060 // usually copying is non trivial, so we make this unaccessible 00061 AIDA_DataPointSetIterator(const AIDA_DataPointSetIterator & h); 00062 AIDA_DataPointSetIterator & operator = (const AIDA_DataPointSetIterator &); 00063 00064 public: 00065 00066 // copy data in FML vector 00067 void fillData(const std::vector<Anaphe::AIDA_Function_FML::AIDA_RangeSet * > & ranges); 00068 00069 protected: 00070 00071 00072 private: 00073 00074 const AIDA::IDataPointSet * m_data; 00075 // vector of indeces for coordinate and index for value 00076 std::vector<int> m_indeces; 00077 int m_val_index; 00078 // dimension of the data 00079 int m_dim; 00080 00081 00082 }; 00083 00084 } // end of namespace Anaphe::AIDA_Fitter_FML 00085 } 00086 #endif /* AIDA_HISTOGRAM1DITERATOR */