GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4ComExecLine.cxx
Go to the documentation of this file.
1 // $Id: TGo4ComExecLine.cxx 1798 2015-11-17 13:13:45Z adamczew $
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 "TGo4ComExecLine.h"
15 
16 #include "TGo4Log.h"
17 #include "TGo4Task.h"
18 
20 {
21  fbIsSynchron=kFALSE;
22  SetName("THExec");
23  SetDescription("Execute line as CINT macro");
24 }
25 
27 {
28  fbIsSynchron=kFALSE;
29  SetName("THExec");
30  SetDescription("Execute line as CINT macro");
31  SetLine(macro);
32 }
33 
35 {
36 }
37 
39 {
40  TGo4Task* cli = dynamic_cast<TGo4Task*> (fxReceiverBase);
41  if(cli==0) {
42  TGo4Log::Debug(" !!! ComExecLine ''%s'': NO RECEIVER ERROR!!!",GetName());
43  return 1;
44  }
45 
46  cli->SendStatusMessage(-1,kTRUE, TString::Format("Executing: %s",GetLine()));
47  cli->ExecuteString(GetLine());
48  //cli->ExecuteString("Int_t res=fflush(stdout);"); // JAM will done in analysis anyway
49  return 0;
50 }
virtual void ExecuteString(const char *command)
Definition: TGo4Task.cxx:146
void SetLine(const char *name)
virtual ~TGo4ComExecLine()
TGo4CommandReceiver * fxReceiverBase
Definition: TGo4Command.h:117
const char * GetLine() const
Bool_t fbIsSynchron
Definition: TGo4Command.h:93
void SendStatusMessage(Int_t level, Bool_t printout, const char *text,...)
Definition: TGo4Task.cxx:303
void SetDescription(const char *)
static void Debug(const char *text,...)
Definition: TGo4Log.cxx:270