23 void hclient(Bool_t evol=kFALSE)
25 gBenchmark->Start(
"hclient");
28 TSocket *sock =
new TSocket(
"localhost", 9090);
35 int idx = !strcmp(str,
"go 0") ? 0 : 1;
40 sock->SetCompressionLevel(1);
45 hpx =
new TH1F(
"hpx",
"This is the px distribution",100,-4,4);
46 hpx->SetFillColor(48);
48 hpx =
new TH2F(
"hpxpy",
"py vs px",40,-4,4,40,-4,4);
51 TMessage::EnableSchemaEvolutionForAll(evol);
52 TMessage mess(kMESS_OBJECT);
58 const int kUPDATE = 1000;
59 for (
int i = 0; i < 25000; i++) {
60 gRandom->Rannor(px,py);
65 if (i && (i%kUPDATE) == 0) {
67 mess.WriteObject(hpx);
69 messlen += mess.Length();
70 cmesslen += mess.CompLength();
73 sock->Send(
"Finished");
76 printf(
"Average compression ratio: %g\n", messlen/cmesslen);
78 gBenchmark->Show(
"hclient");