Logo ROOT  
Reference Guide
TProofLimitsFinder.cxx
Go to the documentation of this file.
1// @(#)root/proofplayer:$Id$
2// Author: Maarten Ballintijn 19/04/2002
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TProofLimitsFinder
13\ingroup proofkernel
14
15Class to find axis limits and synchronize them between workers
16
17*/
18
19#include "TProofLimitsFinder.h"
20#include "TProofServ.h"
21#include "TSocket.h"
22#include "TH1.h"
23#include "TMessage.h"
24#include "TProofDebug.h"
25#include "TError.h"
26
28
29////////////////////////////////////////////////////////////////////////////////
30/// Get bining information. Send current min and max and receive common
31/// min max in return.
32
36 Double_t& zmin, Double_t& zmax)
37{
38 if (!gProofServ) return;
39
42
43 PDB(kGlobal, 2) {
44 ::Info("TProofLimitsFinder::AutoBinFunc",
45 "Sending %f, %f, %f, %f, %f, %f", xmin, xmax, ymin, ymax, zmin, zmax);
46 }
47 mess << key << xmin << xmax << ymin << ymax << zmin << zmax;
48
49 s->Send(mess);
50
51 Bool_t notdone = kTRUE;
52 while (notdone) {
53 TMessage *answ;
54 if (s->Recv(answ) <= 0 || !answ)
55 return;
56
57 Int_t what = answ->What();
58 if (what == kPROOF_AUTOBIN) {
59 (*answ) >> key >> xmin >> xmax >> ymin >> ymax >> zmin >> zmax;
60 notdone = kFALSE;
61 } else {
63 if (xrc == -1) {
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);
67 }
68 }
69 delete answ;
70 }
71}
72
73////////////////////////////////////////////////////////////////////////////////
74/// Find good limits
75
77{
78 Double_t dummy = 0;
79
80 TString key = h->GetName();
82
84}
85
86
87////////////////////////////////////////////////////////////////////////////////
88/// Find good limits
89
91{
92 Double_t dummy = 0;
93
94 TString key = h->GetName();
96
98}
99
100
101////////////////////////////////////////////////////////////////////////////////
102/// Find good limits
103
105{
106 TString key = h->GetName();
107 AutoBinFunc(key, xmin, xmax, ymin, ymax, zmin, zmax);
108
109 return THLimitsFinder::FindGoodLimits( h, xmin, xmax, ymin, ymax, zmin, zmax);
110}
@ kPROOF_AUTOBIN
Definition: MessageTypes.h:58
#define h(i)
Definition: RSha256.hxx:106
static RooMathCoreReg dummy
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Axis_t
Definition: RtypesCore.h:72
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassImp(name)
Definition: Rtypes.h:365
float xmin
Definition: THbookFile.cxx:93
float ymin
Definition: THbookFile.cxx:93
float xmax
Definition: THbookFile.cxx:93
float ymax
Definition: THbookFile.cxx:93
#define PDB(mask, level)
Definition: TProofDebug.h:56
R__EXTERN TProofServ * gProofServ
Definition: TProofServ.h:347
The TH1 histogram class.
Definition: TH1.h:56
virtual Int_t FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax)
Compute the best axis limits for the X axis.
UInt_t What() const
Definition: TMessage.h:75
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:880
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:854
Class to find axis limits and synchronize them between workers.
static void AutoBinFunc(TString &key, Double_t &xmin, Double_t &xmax, Double_t &ymin, Double_t &ymax, Double_t &zmin, Double_t &zmax)
Get bining information.
virtual Int_t FindGoodLimits(TH1 *h, Axis_t xmin, Axis_t xmax)
Find good limits.
TSocket * GetSocket() const
Definition: TProofServ.h:257
virtual Int_t HandleSocketInput(TMessage *mess, Bool_t all)
Process input coming from the client or from the master server.
Basic string class.
Definition: TString.h:131
static constexpr double s