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

/Go4Fit/TGo4FitComponent.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4FITCOMPONENT_H
00017 #define TGO4FITCOMPONENT_H
00018 #include "TArrayD.h"
00019 #include "TArrayI.h"
00020 #include "TObjArray.h"
00021 #include "TGo4FitSlot.h"
00022 #include "TGo4FitParameter.h"
00023 #include "TGo4FitParsList.h"
00024 #include "TCutG.h"
00025 
00029 class TGo4FitComponent : public TGo4FitParsList, public TGo4FitSlotList {
00030    public:
00031 
00035       TGo4FitComponent();
00036 
00040       TGo4FitComponent(const char* iName, const char* iTitle);
00041 
00045       virtual ~TGo4FitComponent();
00046 
00051       TGo4FitParameter* GetAmplPar() { return fiAmplIndex<0 ? 0 : GetPar(fiAmplIndex); }
00052 
00057       const char* GetAmplName() { return GetAmplPar() ? GetAmplPar()->GetName() : 0; }
00058 
00063       const char* GetAmplFullName() { return GetAmplPar() ? GetAmplPar()->GetFullName() : 0; }
00064 
00069       Double_t GetAmplValue() { return GetAmplPar() ? GetAmplPar()->GetValue() : 1.0; }
00070 
00074       void SetAmplValue(Double_t iAmpl) { if(GetAmplPar()) Get(fiAmplIndex)->SetValue(iAmpl); }
00075 
00080       Double_t GetAmplError() { return GetAmplPar() ? GetAmplPar()->GetError() : 0.0; }
00081 
00085       void SetAmplError(Double_t iError) { if(GetAmplPar()) Get(fiAmplIndex)->SetError(iError); }
00086 
00091       Bool_t MakeAmpl(Bool_t isFixed = kFALSE);
00092 
00096       Bool_t RemoveAmpl();
00097 
00101       virtual Bool_t CanAmplTouch() { return kFALSE; }
00102 
00107       void SetRange(Int_t naxis, Double_t min, Double_t max);
00108 
00112       void ExcludeRange(Int_t naxis, Double_t min, Double_t max);
00113 
00118       void SetRangeMin(Int_t naxis, Double_t value);
00119 
00124       void SetRangeMax(Int_t naxis, Double_t value);
00125 
00130       void AddRangeCut(TCutG* cut, Bool_t exclude = kFALSE);
00131 
00136       void ClearRanges(Int_t naxis = -1);
00137 
00141       Bool_t IsAnyRangeLimits();
00142 
00147       Bool_t GetRangeMin(Int_t naxis, Double_t& value);
00148 
00153       Bool_t GetRangeMax(Int_t naxis, Double_t& value);
00154 
00158       Int_t GetNumRangeCondition() const { return fxRangeAxis.GetSize()/2; }
00159 
00169       void GetRangeCondition(Int_t n, Int_t& typ, Int_t& naxis, Double_t& left, Double_t& right) const;
00170 
00176       void SetRangeCondition(Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right);
00177 
00182       void AddRangeCondition(Int_t typ, Int_t naxis, Double_t left, Double_t right);
00183 
00187       void RemoveRangeCondition(Int_t n);
00188 
00192       Int_t GetNumRangeCut() const;
00193 
00197       TCutG* GetRangeCut(Int_t n) const;
00198 
00202       Bool_t IsRangeCutExcluding(Int_t n);
00203 
00207       void SetRangeCutExcluding(Int_t n, Bool_t exclude = kTRUE);
00208 
00212       void RemoveRangeCut(Int_t n);
00213 
00217       Bool_t CheckRangeConditions(const Double_t* values, Int_t numaxis);
00218 
00224       virtual void CollectParsTo(TGo4FitParsList& list);
00225 
00230       void SetUseBuffers(Bool_t iUse) { fbUseBuffers = iUse; }
00231 
00236       Bool_t GetUseBuffers() { return fbUseBuffers; }
00237 
00241       virtual void Print(Option_t* option) const;
00242 
00243    protected:
00244 
00248       TGo4FitParameter* NewParameter(const char* Name, const char* Title, Double_t iValue = 0., Bool_t Fixed = kFALSE, Int_t AtIndx = -1);
00249 
00253       TGo4FitParameter* NewAmplitude(const char* Name = 0, Double_t iValue = 0., Bool_t IsFixed = kFALSE, Int_t AtIndx = 0);
00254 
00258       Int_t GetAmplIndex() { return fiAmplIndex; }
00259 
00263       void SetAmplIndex(Int_t iAmplIndex = -1) { fiAmplIndex = iAmplIndex; }
00264 
00265    private:
00266 
00270       TArrayI fxRangeAxis;
00271 
00275       TArrayD fxRangeValue;
00276 
00280       TObjArray fxCuts;
00281 
00285       Int_t fiAmplIndex;
00286 
00290       Bool_t fbUseBuffers;
00291 
00292    ClassDef(TGo4FitComponent,1)
00293 };
00294 
00295 #endif // TGO4FITCOMPONENT_H
00296 
00297 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:56 2005 for Go4-v2.10-5 by doxygen1.2.15