Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4FitterOutput.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "Riostream.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 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:13 2008 for Go4-v3.04-1 by  doxygen 1.4.2