126 auto obj =
gROOT->GetListOfSpecials()->FindObject(
name);
128 Warning(
"TCutG",
"Replacing existing %s: %s (Potential memory leak).",
129 obj->IsA()->GetName(),obj->GetName());
132 gROOT->GetListOfSpecials()->Add(
this);
142 const char *title =
ttitle->GetTitle();
144 char *vars =
new char[
nch+1];
146 char *col =
strstr(vars,
":");
172 auto obj =
gROOT->GetListOfSpecials()->FindObject(
name);
174 Warning(
"TCutG",
"Replacing existing %s: %s (Potential memory leak).",
175 obj->IsA()->GetName(),obj->GetName());
178 gROOT->GetListOfSpecials()->Add(
this);
188 const char *title =
ttitle->GetTitle();
190 char *vars =
new char[
nch+1];
192 char *col =
strstr(vars,
":");
218 auto obj =
gROOT->GetListOfSpecials()->FindObject(
name);
220 Warning(
"TCutG",
"Replacing existing %s: %s (Potential memory leak).",
221 obj->IsA()->GetName(),obj->GetName());
224 gROOT->GetListOfSpecials()->Add(
this);
234 const char *title =
ttitle->GetTitle();
236 char *vars =
new char[
nch+1];
238 char *col =
strstr(vars,
":");
263 gROOT->GetListOfSpecials()->Remove(
this);
291 for (
Int_t i=0;i<
n-1;i++) {
310 for (
Int_t i=0;i<
n-1;i++) {
362 else integral +=
h->GetBinContent(bin);
376 out,
Class(),
"cutg",
378 out <<
" cutg->SetVarX(\"" <<
GetVarX() <<
"\");\n";
379 out <<
" cutg->SetVarY(\"" <<
GetVarY() <<
"\");\n";
432 if (
R__b.IsReading()) {
434 gROOT->GetListOfSpecials()->Add(
this);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 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 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.
Class to manage histogram axis.
Buffer base class used for serializing objects.
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,...
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...
~TCutG() override
TCutG destructor.
TCutG()
TCutG default constructor.
void Streamer(TBuffer &) override
Stream an object of class TCutG.
const char * GetVarX() const
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
TObject * fObjectY
! pointer to an object corresponding to Y
virtual void SetVarY(const char *vary)
Set Y variable.
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 SetVarX(const char *varx)
Set X variable.
TCutG & operator=(const TCutG &)
Assignment operator.
virtual void SetObjectX(TObject *obj)
Set the X object (and delete the previous one if any).
TObject * fObjectX
! pointer to an object corresponding to X
const char * GetVarY() const
A TGraph is an object made of two arrays X and Y with npoints each.
Int_t fNpoints
Number of points <= fMaxSize.
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.
Double_t * fY
[fNpoints] array of Y points
void SetName(const char *name="") override
Set graph name.
Double_t * fX
[fNpoints] array of X points
TGraph & operator=(const TGraph &)
Equal operator for this graph.
Service class for 2-D histogram classes.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
static TString SavePrimitiveVector(std::ostream &out, const char *prefix, Int_t len, Double_t *arr, Bool_t empty_line=kFALSE)
Save array in the output stream "out" as vector.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
static void SavePrimitiveDraw(std::ostream &out, const char *variable_name, Option_t *option=nullptr)
Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
@ kInvalidObject
if object ctor succeeded but object should not be used
A Pave (see TPave) with text, lines or/and boxes inside.
void ToLower()
Change string to lower-case.
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Base class for several text objects.