#include "TProofLimitsFinder.h"
#include "TProofServ.h"
#include "TSocket.h"
#include "TH1.h"
#include "TMessage.h"
#include "TProofDebug.h"
#include "TError.h"
ClassImp(TProofLimitsFinder)
TProofLimitsFinder::TProofLimitsFinder()
{
}
TProofLimitsFinder::~TProofLimitsFinder()
{
}
void TProofLimitsFinder::AutoBinFunc(TString& key,
Double_t& xmin, Double_t& xmax,
Double_t& ymin, Double_t& ymax,
Double_t& zmin, Double_t& zmax)
{
if ( gProofServ == 0 ) return;
TSocket *s = gProofServ->GetSocket();
TMessage mess(kPROOF_AUTOBIN);
PDB(kGlobal, 2) {
::Info("TProofLimitsFinder::AutoBinFunc", Form("Sending %f, %f, %f, %f, %f, %f", xmin, xmax, ymin, ymax, zmin, zmax));
}
mess << key << xmin << xmax << ymin << ymax << zmin << zmax;
s->Send(mess);
TMessage *answ;
if (s->Recv(answ) <= 0)
return;
(*answ) >> key >> xmin >> xmax >> ymin >> ymax >> zmin >> zmax;
delete answ;
}
Int_t TProofLimitsFinder::FindGoodLimits(TH1 *h, Axis_t xmin, Axis_t xmax)
{
Double_t dummy = 0;
TString key = h->GetName();
AutoBinFunc(key, xmin, xmax, dummy, dummy, dummy, dummy);
return THLimitsFinder::FindGoodLimits( h, xmin, xmax);
}
Int_t TProofLimitsFinder::FindGoodLimits(TH1 *h, Axis_t xmin, Axis_t xmax, Axis_t ymin, Axis_t ymax)
{
Double_t dummy = 0;
TString key = h->GetName();
AutoBinFunc(key, xmin, xmax, ymin, ymax, dummy, dummy);
return THLimitsFinder::FindGoodLimits( h, xmin, xmax, ymin, ymax);
}
Int_t TProofLimitsFinder::FindGoodLimits(TH1 *h, Axis_t xmin, Axis_t xmax, Axis_t ymin, Axis_t ymax, Axis_t zmin, Axis_t zmax)
{
TString key = h->GetName();
AutoBinFunc(key, xmin, xmax, ymin, ymax, zmin, zmax);
return THLimitsFinder::FindGoodLimits( h, xmin, xmax, ymin, ymax, zmin, zmax);
}
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.