MINT2
FitParDependent.h
Go to the documentation of this file.
1 #ifndef FIT_PAR_DEPENDENT_HH
2 #define FIT_PAR_DEPENDENT_HH
3 
5 #include "Mint/IFitParRegister.h"
6 #include "Mint/FitParRef.h"
7 
8 //#include <vector>
9 #include "Mint/PolymorphVector.h"
10 #include <iostream>
11 
12 namespace MINT{
14  : virtual public IFitParRegister
15  , public MINT::PolymorphVector<FitParRef>
16  {
18 
19  bool ignoreFitParRef(const FitParRef& fpr)const;
20 
21  public:
22  //bool changedSinceLastCall() const;
23  //void rememberFitParValues() const;
24 
25  virtual unsigned int size() const{return MINT::PolymorphVector<FitParRef>::size();}
26  //const FitParRef& operator[](unsigned int i) const;
27 
28  virtual const FitParRef& operator[](unsigned int i) const{
30  }
31 
32  virtual FitParRef& operator[](unsigned int i) {
34  }
35 
36  virtual bool changedSinceLastCall() const{
37  for(unsigned int i=0; i < this->size(); i++){
38  if( ((*this)[i]).changedSinceLastCall() ) return true;
39  }
40  return false;
41  }
42 
43  virtual void rememberFitParValues(){
44  for(unsigned int i=0; i < this->size(); i++){
45  ((*this)[i]).rememberFitParValues();
46  }
47  }
48 
49  virtual bool registerFitParDependence(const IFitParDependent& fpd);
50  bool registerFitParDependence(const FitParRef& fpr);
52  // I would one day like to make this saver, but for
53  // now it is possible to call this, although in
54  // fact the dependencies still persist.
55 
57  FitParDependent(const FitParDependent& other, IFitParRegister* newDaddy=0);
58 
59  void listFitParDependencies(std::ostream& os=std::cout) const;
60  }; // class
61 
62 } // namespace MINT
63 
64 #endif
65 
66 //
67 
FitParDependent(IFitParRegister *daddy=0)
virtual bool changedSinceLastCall() const
virtual FitParRef & operator[](unsigned int i)
bool ignoreFitParRef(const FitParRef &fpr) const
virtual bool registerFitParDependence(const IFitParDependent &fpd)
T & at(unsigned int i)
virtual unsigned int size() const
IFitParRegister * _daddy
virtual const FitParRef & operator[](unsigned int i) const
unsigned int size() const
virtual void rememberFitParValues()
void listFitParDependencies(std::ostream &os=std::cout) const