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

/Go4Fit/TGo4FitterOutput.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 "TGo4FitterOutput.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "TVirtualPad.h"
00021 
00022 #include "TGo4FitterAbstract.h"
00023 
00024 TGo4FitterOutput::TGo4FitterOutput() : TGo4FitterAction(), fxCommand(), fxOptions(), fxPad(0) {
00025 }
00026 
00027 TGo4FitterOutput::TGo4FitterOutput(const char* Command, const char* Options) :
00028     TGo4FitterAction(Command,"Output action for fitter"), fxCommand(Command), fxOptions(Options), fxPad(0)  {
00029 }
00030 
00031 TGo4FitterOutput::~TGo4FitterOutput() {
00032 }
00033 
00034 void TGo4FitterOutput::DoAction(TGo4FitterAbstract* Fitter) {
00035    if (Fitter==0) return;
00036    if (fxCommand=="Print") Fitter->Print(fxOptions.Data()); else
00037    if (fxCommand=="Draw") {
00038      TVirtualPad* old = gPad;
00039      if (fxPad!=0) fxPad->cd();
00040      Fitter->Draw(fxOptions.Data());
00041      if (fxPad) fxPad->Update();
00042      if (old!=0) old->cd();
00043    }
00044 }
00045 
00046 void TGo4FitterOutput::Print(Option_t* option) const {
00047    TGo4FitterAction::Print(option);
00048    cout << "  command: " << fxCommand;
00049    if (fxOptions.Length()>0) cout << "    options: " << fxOptions << endl;
00050                         else cout << endl;
00051 }
00052 
00053 ClassImp(TGo4FitterOutput)
00054 
00055 
00056 //----------------------------END OF GO4 SOURCE FILE ---------------------

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