27 ClassImp(TProofLimitsFinder);
33 void TProofLimitsFinder::AutoBinFunc(TString& key,
34 Double_t& xmin, Double_t& xmax,
35 Double_t& ymin, Double_t& ymax,
36 Double_t& zmin, Double_t& zmax)
38 if (!gProofServ)
return;
40 TSocket *s = gProofServ->GetSocket();
41 TMessage mess(kPROOF_AUTOBIN);
44 ::Info(
"TProofLimitsFinder::AutoBinFunc",
45 "Sending %f, %f, %f, %f, %f, %f", xmin, xmax, ymin, ymax, zmin, zmax);
47 mess << key << xmin << xmax << ymin << ymax << zmin << zmax;
51 Bool_t notdone = kTRUE;
54 if (s->Recv(answ) <= 0 || !answ)
57 Int_t what = answ->What();
58 if (what == kPROOF_AUTOBIN) {
59 (*answ) >> key >> xmin >> xmax >> ymin >> ymax >> zmin >> zmax;
62 Int_t xrc = gProofServ->HandleSocketInput(answ, kFALSE);
64 ::Error(
"TProofLimitsFinder::AutoBinFunc",
"command %d cannot be executed while processing", what);
65 }
else if (xrc == -2) {
66 ::Error(
"TProofLimitsFinder::AutoBinFunc",
"unknown command %d ! Protocol error?", what);
76 Int_t TProofLimitsFinder::FindGoodLimits(TH1 *h, Axis_t xmin, Axis_t xmax)
80 TString key = h->GetName();
81 AutoBinFunc(key, xmin, xmax, dummy, dummy, dummy, dummy);
83 return THLimitsFinder::FindGoodLimits( h, xmin, xmax);
90 Int_t TProofLimitsFinder::FindGoodLimits(TH1 *h, Axis_t xmin, Axis_t xmax, Axis_t ymin, Axis_t ymax)
94 TString key = h->GetName();
95 AutoBinFunc(key, xmin, xmax, ymin, ymax, dummy, dummy);
97 return THLimitsFinder::FindGoodLimits( h, xmin, xmax, ymin, ymax);
104 Int_t TProofLimitsFinder::FindGoodLimits(TH1 *h, Axis_t xmin, Axis_t xmax, Axis_t ymin, Axis_t ymax, Axis_t zmin, Axis_t zmax)
106 TString key = h->GetName();
107 AutoBinFunc(key, xmin, xmax, ymin, ymax, zmin, zmax);
109 return THLimitsFinder::FindGoodLimits( h, xmin, xmax, ymin, ymax, zmin, zmax);