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

/Go4StatusAnalysis/TGo4FitterEnvelope.cxx

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 #include "TGo4FitterEnvelope.h"
00017 
00018 TGo4FitterEnvelope::TGo4FitterEnvelope()
00019 : TGo4Parameter("Fitter envelope"), fxFitter(0)
00020 {
00021 }
00022 
00023 TGo4FitterEnvelope::TGo4FitterEnvelope(const char* name, TGo4Fitter* fitter)
00024 : TGo4Parameter(name)
00025 {
00026    fxFitter=fitter;
00027 }
00028 
00029 TGo4FitterEnvelope::~TGo4FitterEnvelope()
00030 {
00031    if(fxFitter) delete fxFitter;
00032 }
00033 
00034 Int_t TGo4FitterEnvelope::PrintParameter(Text_t * buffer, Int_t buflen){
00035   Int_t locallen=128000;
00036    Text_t localbuf[locallen];
00037    if(buflen<0 && buffer!=0)
00038       return 0;
00039    Int_t size=0;
00040    Text_t* current=localbuf;
00041    size+=TGo4Parameter::PrintParameter(current,locallen-size-1);
00042    current= localbuf + size;
00043    if(fxFitter)
00044       size+=sprintf(current," \t This object contains the fitter: %s \n",fxFitter->GetName());
00045    else
00046       size+=sprintf(current," \t This object contains no fitter\n");
00047    current=localbuf+size;
00048    // here we optionally might put printout of fitter if we like...
00049    if(buffer==0)
00050       {
00051           cout << localbuf << endl;
00052       }
00053    else
00054       {
00055          if(size>buflen-1)
00056             size=buflen-1;
00057          strncpy(buffer,localbuf,size);
00058       }
00059    return size;
00060 }
00061 
00062 Bool_t TGo4FitterEnvelope::UpdateFrom(TGo4Parameter *pp){
00063   if(pp->InheritsFrom("TGo4FitterEnvelope"))
00064   {
00065     TGo4FitterEnvelope * from = dynamic_cast<TGo4FitterEnvelope *> (pp);
00066     if(fxFitter) delete fxFitter;
00067     fxFitter=from->GetFitter(kTRUE);// change ownership to us
00068     return kTRUE;
00069   }
00070   else
00071      return kFALSE;
00072 }
00073 
00074 void TGo4FitterEnvelope::Clear(Option_t* opt)
00075 {
00076    if(fxFitter) fxFitter->Clear(opt);
00077 }
00078 
00079 ClassImp(TGo4FitterEnvelope)
00080 
00081 //----------------------------END OF GO4 SOURCE FILE ---------------------

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