GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
25
26TGo4FitterOutput::TGo4FitterOutput(const char *Command, const char *Options) :
27 TGo4FitterAction(Command,"Output action for fitter"), fxCommand(Command), fxOptions(Options), fxPad(nullptr)
28{
29}
30
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
48void 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
Abstract fitter class.
void Print(Option_t *option="") const override
Print information about fitter to standard output.
TGo4FitterAction()
Default constructor.
void DoAction(TGo4FitterAbstract *Fitter) override
Execute proper output of fitter, Print() or Draw(), with specified options.
TGo4FitterOutput()
Default constructor.
TString fxCommand
Command name.
virtual ~TGo4FitterOutput()
Destroys TGo4FitterOutput object.
TVirtualPad * fxPad
TPad, which can be used for output.
void Print(Option_t *option="") const override
Print information on standard output.
TString fxOptions
Command options.