124 delete gROOT->GetListOfSpecials()->FindObject(name);
125 gROOT->GetListOfSpecials()->Add(
this);
133 if (!ttitle) ttitle = ptitle->
GetLine(0);
135 const char *title = ttitle->
GetTitle();
136 Int_t nch = strlen(title);
137 char *vars =
new char[nch+1];
138 strlcpy(vars,title,nch+1);
139 char *col = strstr(vars,
":");
143 char *brak = strstr(col,
" {");
148 char *brak = strstr(vars,
" {");
165 delete gROOT->GetListOfSpecials()->FindObject(name);
166 gROOT->GetListOfSpecials()->Add(
this);
174 if (!ttitle) ttitle = ptitle->
GetLine(0);
176 const char *title = ttitle->
GetTitle();
177 Int_t nch = strlen(title);
178 char *vars =
new char[nch+1];
179 strlcpy(vars,title,nch+1);
180 char *col = strstr(vars,
":");
184 char *brak = strstr(col,
" {");
189 char *brak = strstr(vars,
" {");
206 delete gROOT->GetListOfSpecials()->FindObject(name);
207 gROOT->GetListOfSpecials()->Add(
this);
215 if (!ttitle) ttitle = ptitle->
GetLine(0);
217 const char *title = ttitle->
GetTitle();
218 Int_t nch = strlen(title);
219 char *vars =
new char[nch+1];
220 strlcpy(vars,title,nch+1);
221 char *col = strstr(vars,
":");
225 char *brak = strstr(col,
" {");
230 char *brak = strstr(vars,
" {");
246 gROOT->GetListOfSpecials()->Remove(
this);
274 for (
Int_t i=0;i<n-1;i++) {
275 a += (
fX[i]-
fX[i+1])*(
fY[i]+
fY[i+1]);
293 for (
Int_t i=0;i<n-1;i++) {
295 cx += (
fX[i]-
fX[i+1])*t;
296 cy += (-fY[i]+fY[i+1])*t;
297 a += (
fX[i]-
fX[i+1])*(fY[i]+fY[i+1]);
318 if (
fX[i] < xmin) xmin =
fX[i];
319 if (
fX[i] > xmax) xmax =
fX[i];
320 if (
fY[i] < ymin) ymin =
fY[i];
321 if (
fY[i] > ymax) ymax =
fY[i];
337 Int_t bin, binx, biny;
338 for (biny=biny1;biny<=biny2;biny++) {
340 for (binx=binx1;binx<=binx2;binx++) {
343 bin = binx +(nbinsx+2)*biny;
363 out<<
"cutg = new TCutG("<<quote<<
GetName()<<quote<<
","<<
fNpoints<<
");"<<std::endl;
364 out<<
" cutg->SetVarX("<<quote<<
GetVarX()<<quote<<
");"<<std::endl;
365 out<<
" cutg->SetVarY("<<quote<<
GetVarY()<<quote<<
");"<<std::endl;
366 out<<
" cutg->SetTitle("<<quote<<
GetTitle()<<quote<<
");"<<std::endl;
373 out<<
" cutg->SetPoint("<<i<<
","<<
fX[i]<<
","<<
fY[i]<<
");"<<std::endl;
376 <<quote<<option<<quote<<
");"<<std::endl;
420 void TCutG::Streamer(
TBuffer &R__b)
424 gROOT->GetListOfSpecials()->Add(
this);
TCutG()
TCutG default constructor.
Int_t fNpoints
Current dimension of arrays fX and fY.
virtual const char * GetName() const
Returns name of object.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void SetObjectX(TObject *obj)
Set the X object (and delete the previous one if any).
virtual void SetName(const char *name)
Set the name of the TNamed.
TObject * fObjectX
! pointer to an object corresponding to X
Buffer base class used for serializing objects.
void ToLower()
Change string to lower-case.
virtual ~TCutG()
TCutG destructor.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
TCutG & operator=(const TCutG &)
Assignment operator.
const char * GetVarX() const
TGraph & operator=(const TGraph &)
Equal operator for this graph.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual TText * GetLine(Int_t number) const
Get Pointer to line number in this pavetext.
virtual void SetVarY(const char *vary)
Set Y variable.
Base class for several text objects.
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual Double_t IntegralHist(TH2 *h, Option_t *option="") const
Compute the integral of 2-d histogram h for all bins inside the cut if option "width" is specified...
const char * GetVarY() const
virtual TText * GetLineWith(const char *text) const
Get Pointer to first containing string text in this pavetext.
Service class for 2-Dim histogram classes.
Class to manage histogram axis.
if object ctor succeeded but object should not be used
virtual Double_t Area() const
Compute the area inside this TCutG The algorithm uses Stoke's theorem over the border of the closed p...
virtual void SetObjectY(TObject *obj)
Set the Y object (and delete the previous one if any).
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
virtual void SetVarX(const char *varx)
Set X variable.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
A Pave (see TPave) with text, lines or/and boxes inside.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Mother of all ROOT objects.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
TObject * fObjectY
! pointer to an object corresponding to Y
A Graph is a graphics object made of two arrays X and Y with npoints each.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual Int_t GetNbinsX() const
virtual Int_t IsInside(Double_t x, Double_t y) const
Return 1 if the point (x,y) is inside the polygon defined by the graph vertices 0 otherwise...
virtual void Center(Double_t &cx, Double_t &cy) const
Compute the center x,y of this TCutG The algorithm uses Stoke's theorem over the border of the closed...
virtual const char * GetTitle() const
Returns title of object.