GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4FitterOutput.cxx
Go to the documentation of this file.
1 // $Id$
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 fuer 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 <iostream>
17 
18 #include "TVirtualPad.h"
19 
20 #include "TGo4FitterAbstract.h"
21 
22 TGo4FitterOutput::TGo4FitterOutput() : TGo4FitterAction(), fxCommand(), fxOptions(), fxPad(nullptr)
23 {
24 }
25 
26 TGo4FitterOutput::TGo4FitterOutput(const char *Command, const char *Options) :
27  TGo4FitterAction(Command,"Output action for fitter"), fxCommand(Command), fxOptions(Options), fxPad(nullptr)
28 {
29 }
30 
32 }
33 
35 {
36  if (!Fitter) return;
37  if (fxCommand == "Print")
38  Fitter->Print(fxOptions.Data());
39  else if (fxCommand == "Draw") {
40  TVirtualPad *old = gPad;
41  if (fxPad) fxPad->cd();
42  Fitter->Draw(fxOptions.Data());
43  if (fxPad) fxPad->Update();
44  if (old) old->cd();
45  }
46 }
47 
48 void TGo4FitterOutput::Print(Option_t *option) const
49 {
51  std::cout << " command: " << fxCommand;
52  if (fxOptions.Length()>0) std::cout << " options: " << fxOptions;
53  std::cout << std::endl;
54 }
void Print(Option_t *option="") const override
virtual ~TGo4FitterOutput()
TVirtualPad * fxPad
void DoAction(TGo4FitterAbstract *Fitter) override
void Print(Option_t *option="") const override
void Print(Option_t *option="") const override