GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4FitterOutput.cxx
Go to the documentation of this file.
1 // $Id: TGo4FitterOutput.cxx 933 2013-01-29 15:27:58Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "TGo4FitterOutput.h"
15 
16 #include "Riostream.h"
17 #include "TVirtualPad.h"
18 
19 #include "TGo4FitterAbstract.h"
20 
21 TGo4FitterOutput::TGo4FitterOutput() : TGo4FitterAction(), fxCommand(), fxOptions(), fxPad(0) {
22 }
23 
24 TGo4FitterOutput::TGo4FitterOutput(const char* Command, const char* Options) :
25  TGo4FitterAction(Command,"Output action for fitter"), fxCommand(Command), fxOptions(Options), fxPad(0) {
26 }
27 
29 }
30 
32  if (Fitter==0) return;
33  if (fxCommand=="Print") Fitter->Print(fxOptions.Data()); else
34  if (fxCommand=="Draw") {
35  TVirtualPad* old = gPad;
36  if (fxPad!=0) fxPad->cd();
37  Fitter->Draw(fxOptions.Data());
38  if (fxPad) fxPad->Update();
39  if (old!=0) old->cd();
40  }
41 }
42 
43 void TGo4FitterOutput::Print(Option_t* option) const {
45  std::cout << " command: " << fxCommand;
46  if (fxOptions.Length()>0) std::cout << " options: " << fxOptions;
47  std::cout << std::endl;
48 }
virtual void DoAction(TGo4FitterAbstract *Fitter)
virtual void Print(Option_t *option) const
virtual ~TGo4FitterOutput()
virtual void Print(Option_t *option) const
TVirtualPad * fxPad
void Print(Option_t *option) const