GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4FitterOutput.cxx
Go to the documentation of this file.
1 // $Id: TGo4FitterOutput.cxx 2769 2020-04-16 14:54:23Z 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 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(0) {
23 }
24 
25 TGo4FitterOutput::TGo4FitterOutput(const char* Command, const char* Options) :
26  TGo4FitterAction(Command,"Output action for fitter"), fxCommand(Command), fxOptions(Options), fxPad(0) {
27 }
28 
30 }
31 
33  if (Fitter==0) return;
34  if (fxCommand=="Print") Fitter->Print(fxOptions.Data()); else
35  if (fxCommand=="Draw") {
36  TVirtualPad* old = gPad;
37  if (fxPad!=0) fxPad->cd();
38  Fitter->Draw(fxOptions.Data());
39  if (fxPad) fxPad->Update();
40  if (old!=0) old->cd();
41  }
42 }
43 
44 void TGo4FitterOutput::Print(Option_t* option) const {
46  std::cout << " command: " << fxCommand;
47  if (fxOptions.Length()>0) std::cout << " options: " << fxOptions;
48  std::cout << std::endl;
49 }
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