54#include "TApplication.h"
61int main(
int argc,
char **argv)
64 std::cout <<
"usage: MainGo4ObjectClient hostname port base passwd command "<<std::endl;
68 TApplication theApp(
"App", 0,
nullptr);
69 TCanvas *mycanvas =
nullptr;
76 const char *hostname = argv[1];
77 const char *connector = argv[2];
78 Int_t port = atoi(connector);
79 const char *base = argv[3];
80 const char *pass = argv[4];
81 const char *comm = argv[5];
82 std::cout <<
"Host:" << hostname <<
",\tPort:" << port <<
",\tBase:" << base <<
",\tPass:" << pass
83 <<
",\tComm:" << comm << std::endl;
84 TGo4ObjClient myclient(
"TestClient", base, pass, hostname, port);
87 std::string inputline;
89 std::cout <<
"Go4> Object client command:" << std::endl;
90 getline(std::cin, inputline);
91 comm = inputline.c_str();
93 if (!strcmp(comm,
"exit")) {
94 std::cout <<
"exit command..." << std::endl;
95 gApplication->Terminate();
96 }
else if (!strcmp(comm,
"dir")) {
97 std::cout <<
"getting nameslist" << std::endl;
103 std::cout <<
"got zero list!!!" << std::endl;
105 std::cout <<
"getting object " << comm << std::endl;
110 if (ob->InheritsFrom(
"TH1")) {
111 if (!mycanvas) mycanvas = gROOT->MakeDefCanvas();
115 mycanvas->Modified();
120 std::cout <<
"got zero object!!!" << std::endl;
int main(int argc, char **argv)
Contains the name (key) list of all objects in the analysis scope.
void Print(Option_t *opt="") const override
basic method to printout status information on stdout; to be overridden by specific subclass
static TGo4Log * Instance()
static void SetIgnoreLevel(Int_t level)
Define threshold for output.
static void LogfileEnable(Bool_t on=kTRUE)
switch writing to logfile on or off
Client for the go4 object server delivering root objects.
TObject * RequestObject(const char *objectname, const char *base=nullptr, const char *passwd=nullptr, const char *host=nullptr, Int_t port=0)
Get object by name from client.
TGo4AnalysisObjectNames * RequestNamesList(const char *base=nullptr, const char *passwd=nullptr, const char *host=nullptr, Int_t port=0)
Get nameslist object from client.