Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TProfile Class Reference

Profile Histogram.

Profile histograms are used to display the mean value of Y and its error for each bin in X. The displayed error is by default the standard error on the mean (i.e. the standard deviation divided by the sqrt(n) ). Profile histograms are in many cases an elegant replacement of two-dimensional histograms. The inter-relation of two measured quantities X and Y can always be visualized by a two-dimensional histogram or scatter plot, but if Y is an unknown (but single-valued) approximate function of X, this function is displayed by a profile histogram with much better precision than by a scatter plot.

The following formulae show the cumulated contents (capital letters) and the values displayed by the printing or plotting routines (small letters) of the elements for bin j.

\[ \begin{align} H(j) &= \sum w \cdot Y \\ E(j) &= \sum w \cdot Y^2 \\ W(j) &= \sum w & &\text{if weights different from 1, the number of bin effective entries is used} \\ h(j) &= H(j) / W(j) & &\text{mean of Y,} \\ s(j) &= \sqrt{E(j)/W(j)- h(j)^2} & &\text{standard deviation of Y} \\ e(j) &= s(j)/\sqrt{W(j)} & &\text{standard error on the mean} \\ \end{align} \]

The bin content is always the mean of the Y values, but errors change depending on options:

\[ \begin{align} \text{GetBinContent}(j) &= h(j) \\ \text{GetBinError}(j) &= \begin{cases} e(j) &\text{if option="" (default). Error of the mean of all y values.} \\ s(j) &\text{if option="s". Standard deviation of all y values.} \\ \begin{cases} e(j) &\text{if } h(j) \ne 0 \\ 1/\sqrt{12 N} &\text{if } h(j)=0 \end{cases} &\text{if option="i". This is useful for storing integers such as ADC counts.} \\ 1/\sqrt{W(j)} &\text{if option="g". Error of a weighted mean for combining measurements with variances of } w. \\ \end{cases} \end{align} \]

In the special case where s(j) is zero (eg, case of 1 entry only in one bin) the bin error e(j) is computed from the average of the s(j) for all bins if the static function TProfile::Approximate() has been called. This simple/crude approximation was suggested in order to keep the bin during a fit operation. But note that this approximation is not the default behaviour. See also TProfile::BuildOptions for more on error options.

Creating and drawing a profile histogram

{
auto c1 = new TCanvas("c1","Profile histogram example",200,10,700,500);
auto hprof = new TProfile("hprof","Profile of pz versus px",100,-4,4,0,20);
Float_t px, py, pz;
for ( Int_t i=0; i<25000; i++) {
gRandom->Rannor(px,py);
pz = px*px + py*py;
hprof->Fill(px,pz,1);
}
hprof->Draw();
}
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
externTRandom * gRandom
Definition TRandom.h:62
The Canvas class.
Definition TCanvas.h:23
TProfile()
Default constructor for Profile histograms.
Definition TProfile.cxx:91
return c1
Definition legend1.C:41

Definition at line 32 of file TProfile.h.

Public Types

enum  {
  kNoAxis = 0 , kXaxis = (1ULL << (0)) , kYaxis = (1ULL << (1)) , kZaxis = (1ULL << (2)) ,
  kAllAxes = kXaxis | kYaxis | kZaxis
}
 Enumeration specifying which axes can be extended. More...
enum  { kSingleKey = (1ULL << (0)) , kOverwrite = (1ULL << (1)) , kWriteDelete = (1ULL << (2)) }
enum  { kNstat = 13 }
 Size of statistics data (size of array used in GetStats()/ PutStats ). More...
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
enum  EBinErrorOpt { kNormal = 0 , kPoisson = 1 , kPoisson2 = 2 }
 Enumeration specifying type of statistics for bin errors. More...
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << (3)) }
enum  EInconsistencyBits {
  kFullyConsistent = 0 , kDifferentLabels = (1ULL << (0)) , kDifferentBinLimits = (1ULL << (1)) , kDifferentAxisLimits = (1ULL << (2)) ,
  kDifferentNumberOfBins = (1ULL << (3)) , kDifferentDimensions = (1ULL << (4))
}
 Enumeration specifying inconsistencies between two histograms, in increasing severity. More...
enum  EStatOverflows { kIgnore = 0 , kConsider = 1 , kNeutral = 2 }
 Enumeration specifying the way to treat statoverflow. More...
enum  EStatusBits {
  kNoStats = (1ULL << (9)) , kUserContour = (1ULL << (10)) , kLogX = (1ULL << (15)) , kIsZoomed = (1ULL << (16)) ,
  kNoTitle = (1ULL << (17)) , kIsAverage = (1ULL << (18)) , kIsNotW = (1ULL << (19)) , kAutoBinPTwo = (1ULL << (20)) ,
  kIsHighlight = (1ULL << (21))
}
 TH1 status bits. More...

Public Member Functions

 TProfile ()
 Default constructor for Profile histograms.
 TProfile (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Double_t ylow, Double_t yup, Option_t *option="")
 Constructor for Profile histograms with variable bin size.
 TProfile (const char *name, const char *title, Int_t nbinsx, const Double_t *xbins, Option_t *option="")
 Constructor for Profile histograms with variable bin size.
 TProfile (const char *name, const char *title, Int_t nbinsx, const Float_t *xbins, Option_t *option="")
 Constructor for Profile histograms with variable bin size.
 TProfile (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Double_t ylow, Double_t yup, Option_t *option="")
 Constructor for Profile histograms with range in y.
 TProfile (const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Option_t *option="")
 Normal Constructor for Profile histograms.
 TProfile (const TProfile &profile)
 Copy constructor.
 ~TProfile () override
 Default destructor for Profile histograms.
void AbstractMethod (const char *method) const
 Call this function within a function that you don't want to define as purely virtual, in order not to force all users deriving from that class to implement that maybe (on their side) unused function; but at the same time, emit a run-time warning if they try to call it, telling that it is not implemented in the derived class: action must thus be taken on the user side to override it.
Bool_t Add (const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1) override
 Replace contents of this profile by the addition of h1 and h2.
Bool_t Add (const TH1 *h1, Double_t c1=1) override
 Performs the operation: this = this + c1*h1.
Bool_t Add (TF1 *h1, Double_t c1=1, Option_t *option="") override
 Performs the operation: this = this + c1*f1.
void AddAt (Double_t c, Int_t i)
 Set the double c value at position i in the array.
void AddBinContent (Int_t bin) override
 Increment bin content by 1.
void AddBinContent (Int_t bin, Double_t w) override
 Increment bin content by a weight w Passing an out-of-range bin leads to undefined behavior.
void Adopt (Int_t n, Double_t *array)
 Adopt array arr into TArrayD, i.e.
virtual Double_t AndersonDarlingTest (const TH1 *h2, Double_t &advalue) const
virtual Double_t AndersonDarlingTest (const TH1 *h2, Option_t *option="") const
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
Double_t At (Int_t i) const
void Browse (TBrowser *b) override
 Browse the Histogram object.
Int_t BufferEmpty (Int_t action=0) override
 Fill histogram with all entries in the buffer.
void BuildOptions (Double_t ymin, Double_t ymax, Option_t *option)
 Set Profile histogram structure and options.
virtual Bool_t CanExtendAllAxes () const
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
Double_t Chi2Test (const TH1 *h2, Option_t *option="WW", Double_t *res=nullptr) const override
 Run a Chi2Test between a TProfileD and another histogram.
virtual Double_t Chi2TestX (const TH1 *h2, Double_t &chi2, Int_t &ndf, Int_t &igood, Option_t *option="UU", Double_t *res=nullptr) const
virtual Double_t Chisquare (TF1 *f1, Option_t *option="") const
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
void Clear (Option_t *option="") override
 Set name and title to empty strings ("").
virtual void ClearUnderflowAndOverflow ()
TObjectClone (const char *newname="") const override
 Make a clone of an object using the Streamer facility.
Int_t Compare (const TObject *obj) const override
 Compare two TNamed objects.
virtual Double_t ComputeIntegral (Bool_t onlyPositive=false, Option_t *option="")
void Copy (TArrayD &array) const
void Copy (TAttFill &attfill) const
void Copy (TAttLine &attline) const
void Copy (TAttMarker &attmarker) const
void Copy (TObject &hnew) const override
 Copy a Profile histogram to a new profile histogram.
virtual void Delete (Option_t *option="")
 Delete this object.
virtual void DirectoryAutoAdd (TDirectory *)
Int_t DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
Int_t DistancetoPrimitive (Int_t px, Int_t py) override
 Computes distance from point (px,py) to the object.
Bool_t Divide (const TH1 *h1) override
 Divide this profile by h1.
Bool_t Divide (const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option="") override
 Replace contents of this profile by the division of h1 by h2.
Bool_t Divide (TF1 *h1, Double_t c1=1) override
 Performs the operation: this = this/(c1*f1).
void Draw (Option_t *option="") override
 Default Draw method for all objects.
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
virtual TH1DrawCopy (Option_t *option="", const char *name_postfix="_copy") const
virtual TH1DrawNormalized (Option_t *option="", Double_t norm=1) const
virtual void DrawPanel ()
virtual void Dump () const
 Dump contents of object on stdout.
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
virtual void Eval (TF1 *f1, Option_t *option="")
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
void ExecuteEvent (Int_t event, Int_t px, Int_t py) override
 Execute action corresponding to an event at (px,py).
void ExtendAxis (Double_t x, TAxis *axis) override
 Profile histogram is resized along x axis such that x is in the axis range.
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
virtual TH1FFT (TH1 *h_output, Option_t *option)
Int_t Fill (const char *namex, Double_t y) override
 Fill a Profile histogram (no weights).
virtual Int_t Fill (const char *namex, Double_t y, Double_t w)
 Fill a Profile histogram with weights.
Int_t Fill (Double_t x, Double_t y) override
 Fill a Profile histogram (no weights).
virtual Int_t Fill (Double_t x, Double_t y, Double_t w)
 Fill a Profile histogram with weights.
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer.
void FillN (Int_t ntimes, const Double_t *x, const Double_t *y, const Double_t *w, Int_t stride=1) override
 Fill a Profile histogram with weights.
void FillRandom (const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr)
virtual void FillRandom (TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
virtual void FillRandom (TH1 *h, Int_t ntimes=5000, TRandom *rng=nullptr)
virtual Int_t FindBin (Double_t x, Double_t y=0, Double_t z=0)
virtual Int_t FindFirstBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
virtual Int_t FindFixBin (Double_t x, Double_t y=0, Double_t z=0) const
virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
TObjectFindObject (const char *name) const override
 Must be redefined in derived classes.
TObjectFindObject (const TObject *obj) const override
 Must be redefined in derived classes.
virtual TFitResultPtr Fit (const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
virtual TFitResultPtr Fit (TF1 *f1, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
virtual void FitPanel ()
Double_tGetArray ()
const Double_tGetArray () const
TH1GetAsymmetry (TH1 *h2, Double_t c2=1, Double_t dc2=0)
Double_t GetAt (Int_t i) const override
virtual Color_t GetAxisColor (Option_t *axis="X") const
 Return the number of divisions for "axis".
virtual Float_t GetBarOffset () const
virtual Float_t GetBarWidth () const
virtual Int_t GetBin (Int_t binx, Int_t biny=0, Int_t binz=0) const
virtual Double_t GetBinCenter (Int_t bin) const
Double_t GetBinContent (Int_t bin) const override
 Return bin content of a Profile histogram.
Double_t GetBinContent (Int_t bin, Int_t) const override
Double_t GetBinContent (Int_t bin, Int_t, Int_t) const override
virtual Double_t GetBinEffectiveEntries (Int_t bin) const
 Return bin effective entries for a weighted filled Profile histogram.
virtual Double_t GetBinEntries (Int_t bin) const
 Return bin entries of a Profile histogram.
Double_t GetBinError (Int_t bin) const override
 Return bin error of a Profile histogram.
Double_t GetBinError (Int_t bin, Int_t) const override
Double_t GetBinError (Int_t bin, Int_t, Int_t) const override
virtual Double_t GetBinErrorLow (Int_t bin) const
virtual EBinErrorOpt GetBinErrorOption () const
virtual Double_t GetBinErrorUp (Int_t bin) const
virtual Double_t GetBinLowEdge (Int_t bin) const
virtual TArrayDGetBinSumw2 ()
virtual const TArrayDGetBinSumw2 () const
virtual Double_t GetBinWidth (Int_t bin) const
virtual Double_t GetBinWithContent (Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0, Double_t maxdiff=0) const
virtual void GetBinXYZ (Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const
const Double_tGetBuffer () const
Int_t GetBufferLength () const
Int_t GetBufferSize () const
virtual Double_t GetCellContent (Int_t binx, Int_t biny) const
virtual Double_t GetCellError (Int_t binx, Int_t biny) const
virtual void GetCenter (Double_t *center) const
virtual Int_t GetContour (Double_t *levels=nullptr)
virtual Double_t GetContourLevel (Int_t level) const
virtual Double_t GetContourLevelPad (Int_t level) const
TH1GetCumulative (Bool_t forward=kTRUE, const char *suffix="_cumulative") const
virtual Int_t GetDimension () const
TDirectoryGetDirectory () const
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
virtual Double_t GetEffectiveEntries () const
virtual Double_t GetEntries () const
Option_tGetErrorOption () const
 Return option to compute profile errors.
virtual Color_t GetFillColor () const
 Return the fill area color.
virtual Style_t GetFillStyle () const
 Return the fill area style.
virtual TF1GetFunction (const char *name) const
virtual const char * GetIconName () const
 Returns mime type name of object.
virtual Double_tGetIntegral ()
virtual Double_t GetKurtosis (Int_t axis=1) const
virtual Color_t GetLabelColor (Option_t *axis="X") const
 Return the "axis" label color.
virtual Style_t GetLabelFont (Option_t *axis="X") const
 Return the "axis" label font.
virtual Float_t GetLabelOffset (Option_t *axis="X") const
 Return the "axis" label offset.
virtual Float_t GetLabelSize (Option_t *axis="X") const
 Return the "axis" label size.
virtual Color_t GetLineColor () const
 Return the line color.
virtual Style_t GetLineStyle () const
 Return the line style.
virtual Width_t GetLineWidth () const
 Return the line width.
TListGetListOfFunctions () const
virtual void GetLowEdge (Double_t *edge) const
virtual Color_t GetMarkerColor () const
 Return the marker color.
virtual Size_t GetMarkerSize () const
 Return the marker size.
virtual Style_t GetMarkerStyle () const
 Return the marker style.
virtual Double_t GetMaximum (Double_t maxval=FLT_MAX) const
virtual Int_t GetMaximumBin () const
virtual Int_t GetMaximumBin (Int_t &locmax, Int_t &locmay, Int_t &locmaz) const
virtual Double_t GetMaximumStored () const
virtual Double_t GetMean (Int_t axis=1) const
virtual Double_t GetMeanError (Int_t axis=1) const
virtual Double_t GetMinimum (Double_t minval=-FLT_MAX) const
virtual void GetMinimumAndMaximum (Double_t &min, Double_t &max) const
virtual Int_t GetMinimumBin () const
virtual Int_t GetMinimumBin (Int_t &locmix, Int_t &locmiy, Int_t &locmiz) const
virtual Double_t GetMinimumStored () const
const char * GetName () const override
 Returns name of object.
virtual Int_t GetNbinsX () const
virtual Int_t GetNbinsY () const
virtual Int_t GetNbinsZ () const
virtual Int_t GetNcells () const
virtual Int_t GetNdivisions (Option_t *axis="X") const
 Return the number of divisions for "axis".
virtual Double_t GetNormFactor () const
char * GetObjectInfo (Int_t px, Int_t py) const override
 Returns string containing info about the object at position (px,py).
Option_tGetOption () const override
TVirtualHistPainterGetPainter (Option_t *option="")
virtual Int_t GetQuantiles (Int_t n, Double_t *xp, const Double_t *p=nullptr)
virtual Double_t GetRandom (TRandom *rng=nullptr, Option_t *option="") const
Double_t GetRMS (Int_t axis=1) const
 This function returns the Standard Deviation (Sigma) of the distribution not the Root Mean Square (RMS).
Double_t GetRMSError (Int_t axis=1) const
Int_t GetSize () const
virtual Double_t GetSkewness (Int_t axis=1) const
EStatOverflows GetStatOverflows () const
 Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more information.
void GetStats (Double_t *stats) const override
 fill the array stats from the contents of this profile.
virtual Double_t GetStdDev (Int_t axis=1) const
virtual Double_t GetStdDevError (Int_t axis=1) const
Stat_t GetSum () const
Double_t GetSumOfAllWeights (const bool includeOverflow, Double_t *sumWeightSquare=nullptr) const
virtual Double_t GetSumOfWeights () const
 Return the sum of weights across all bins excluding under/overflows.
virtual TArrayDGetSumw2 ()
virtual const TArrayDGetSumw2 () const
virtual Int_t GetSumw2N () const
virtual Float_t GetTickLength (Option_t *axis="X") const
 Return the "axis" tick length.
const char * GetTitle () const override
 Returns title of object.
virtual Style_t GetTitleFont (Option_t *axis="X") const
 Return the "axis" title font.
virtual Float_t GetTitleOffset (Option_t *axis="X") const
 Return the "axis" title offset.
virtual Float_t GetTitleSize (Option_t *axis="X") const
 Return the "axis" title size.
virtual UInt_t GetUniqueID () const
 Return the unique object id.
TAxisGetXaxis ()
const TAxisGetXaxis () const
TAxisGetYaxis ()
const TAxisGetYaxis () const
virtual Double_t GetYmax () const
virtual Double_t GetYmin () const
TAxisGetZaxis ()
const TAxisGetZaxis () const
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
ULong_t Hash () const override
 Return hash value for this object.
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
virtual Double_t Integral (Int_t binx1, Int_t binx2, Option_t *option="") const
virtual Double_t Integral (Option_t *option="") const
virtual Double_t IntegralAndError (Int_t binx1, Int_t binx2, Double_t &err, Option_t *option="") const
virtual Double_t Interpolate (Double_t x) const
virtual Double_t Interpolate (Double_t x, Double_t y) const
virtual Double_t Interpolate (Double_t x, Double_t y, Double_t z) const
void InvertBit (UInt_t f)
TClassIsA () const override
Bool_t IsBinOverflow (Int_t bin, Int_t axis=0) const
Bool_t IsBinUnderflow (Int_t bin, Int_t axis=0) const
Bool_t IsDestructed () const
 IsDestructed.
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
virtual Bool_t IsHighlight () const
Bool_t IsOnHeap () const
Bool_t IsSortable () const override
virtual Bool_t IsTransparent () const
Bool_t IsZombie () const
virtual Double_t KolmogorovTest (const TH1 *h2, Option_t *option="") const
void LabelsDeflate (Option_t *axis="X") override
 Reduce the number of bins for this axis to the number of bins having a label.
void LabelsInflate (Option_t *axis="X") override
 Double the number of bins for axis.
void LabelsOption (Option_t *option="h", Option_t *axis="X") override
 Set option(s) to draw axis with labels.
void ls (Option_t *option="") const override
 List TNamed name and title.
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
Long64_t Merge (TCollection *list, Option_t *option)
Long64_t Merge (TCollection *list) override
 Merge all histograms in the collection in this histogram.
virtual void Modify ()
virtual void Modify ()
virtual void Modify ()
virtual void ModifyOn (TVirtualPad &pad)
virtual void ModifyOn (TVirtualPad &pad)
virtual void ModifyOn (TVirtualPad &pad)
Bool_t Multiply (const TH1 *h1) override
 Multiply this profile by h1.
Bool_t Multiply (const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option="") override
 Replace contents of this profile by multiplication of h1 by h2.
Bool_t Multiply (TF1 *h1, Double_t c1=1) override
 Performs the operation: this = this*c1*f1.
virtual void Normalize (Option_t *option="")
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
void operator delete (void *, size_t)
 Operator delete for sized deallocation.
void operator delete (void *ptr)
 Operator delete.
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
void operator delete[] (void *, size_t)
 Operator delete [] for sized deallocation.
void operator delete[] (void *ptr)
 Operator delete [].
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
void * operator new (size_t sz)
void * operator new (size_t sz, void *vp)
void * operator new[] (size_t sz)
void * operator new[] (size_t sz, void *vp)
TProfileoperator= (const TProfile &profile)
Double_toperator[] (Int_t i)
Double_t operator[] (Int_t i) const
void Paint (Option_t *option="") override
 This method must be overridden if a class wants to paint itself.
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
void Print (Option_t *option="") const override
 This method must be overridden when a class wants to print itself.
TH1DProjectionX (const char *name="_px", Option_t *option="e") const
 Project this profile into a 1-D histogram along X.
void PutStats (Double_t *stats) override
 Replace current statistics with the values in array stats.
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
TH1Rebin (Int_t ngroup=2, const char *newname="", const Double_t *xbins=nullptr) override
 Rebin this profile grouping ngroup bins together.
virtual void RebinAxis (Double_t x, TAxis *axis)
virtual TH1RebinX (Int_t ngroup=2, const char *newname="")
virtual void Rebuild (Option_t *option="")
void RecursiveRemove (TObject *obj) override
 Recursively remove this object from a list.
void Reset ()
void Reset (Double_t val)
void Reset (Option_t *option="") override
 Reset contents of a Profile histogram.
virtual void ResetAttFill (Option_t *option="")
virtual void ResetAttLine (Option_t *option="")
virtual void ResetAttMarker (Option_t *toption="")
void ResetBit (UInt_t f)
virtual void ResetStats ()
void SaveAs (const char *filename="hist", Option_t *option="") const override
 Save this object in the file specified by filename.
virtual void SaveFillAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
virtual void SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
virtual void SaveMarkerAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
void SavePrimitive (std::ostream &out, Option_t *option="") override
 Save primitive as a C++ statement(s) on output stream out.
void Scale (Double_t c1=1, Option_t *option="") override
 Multiply this profile by a constant c1.
void Set (Int_t n) override
 Set size of this array to n doubles.
void Set (Int_t n, const Double_t *array)
 Set size of this array to n doubles and set the contents This function should not be called if the array was declared via Adopt.
void SetAt (Double_t v, Int_t i) override
virtual void SetAxisColor (Color_t color=1, Option_t *axis="X")
 Set color to draw the axis line and tick marks.
virtual void SetAxisRange (Double_t xmin, Double_t xmax, Option_t *axis="X")
 Set the "axis" range.
virtual void SetBarOffset (Float_t offset=0.25)
virtual void SetBarWidth (Float_t width=0.5)
virtual void SetBinContent (Int_t bin, Double_t content)
virtual void SetBinContent (Int_t bin, Int_t, Double_t content)
virtual void SetBinContent (Int_t bin, Int_t, Int_t, Double_t content)
virtual void SetBinEntries (Int_t bin, Double_t w)
 Set the number of entries in bin.
virtual void SetBinError (Int_t bin, Double_t error)
virtual void SetBinError (Int_t binx, Int_t biny, Double_t error)
virtual void SetBinError (Int_t binx, Int_t biny, Int_t binz, Double_t error)
virtual void SetBinErrorOption (EBinErrorOpt type)
void SetBins (Int_t nbins, Double_t xmin, Double_t xmax) override
 Redefine x axis parameters.
void SetBins (Int_t nx, const Double_t *xbins) override
 Redefine x axis parameters.
void SetBinsLength (Int_t n=-1) override
 Set total number of bins including under/overflow.
void SetBit (UInt_t f)
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
void SetBuffer (Int_t bufsize, Option_t *option="") override
 Set the buffer size in units of 8 bytes (double).
virtual UInt_t SetCanExtend (UInt_t extendBitMask)
virtual void SetCellContent (Int_t binx, Int_t biny, Double_t content)
virtual void SetCellError (Int_t binx, Int_t biny, Double_t content)
virtual void SetColors (Color_t linecolor=-1, Color_t markercolor=-1, Color_t fillcolor=-1)
virtual void SetContent (const Double_t *content)
virtual void SetContour (Int_t nlevels, const Double_t *levels=nullptr)
virtual void SetContourLevel (Int_t level, Double_t value)
virtual void SetDirectory (TDirectory *dir)
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
virtual void SetEntries (Double_t n)
virtual void SetError (const Double_t *error)
virtual void SetErrorOption (Option_t *option="")
 Set option to compute profile errors.
virtual void SetFillAttributes ()
virtual void SetFillColor (Color_t fcolor)
 Set the fill area color.
void SetFillColor (TColorNumber)
virtual void SetFillColorAlpha (Color_t fcolor, Float_t falpha)
virtual void SetFillStyle (Style_t fstyle)
 Set the fill area style.
virtual void SetHighlight (Bool_t set=kTRUE)
virtual void SetLabelColor (Color_t color=1, Option_t *axis="X")
 Set axis labels color.
virtual void SetLabelFont (Style_t font=62, Option_t *axis="X")
 Set font number used to draw axis labels.
virtual void SetLabelOffset (Float_t offset=0.005, Option_t *axis="X")
 Set offset between axis and axis' labels.
virtual void SetLabelSize (Float_t size=0.02, Option_t *axis="X")
 Set size of axis' labels.
virtual void SetLineAttributes ()
virtual void SetLineColor (Color_t lcolor)
 Set the line color.
void SetLineColor (TColorNumber lcolor)
virtual void SetLineColorAlpha (Color_t lcolor, Float_t lalpha)
virtual void SetLineStyle (Style_t lstyle)
 Set the line style.
virtual void SetLineWidth (Width_t lwidth)
 Set the line width.
virtual void SetMarkerAttributes ()
virtual void SetMarkerColor (Color_t mcolor=1)
 Set the marker color.
void SetMarkerColor (TColorNumber lcolor)
virtual void SetMarkerColorAlpha (Color_t mcolor, Float_t malpha)
virtual void SetMarkerSize (Size_t msize=1)
 Set the marker size.
virtual void SetMarkerStyle (Style_t mstyle=1)
 Set the marker style.
virtual void SetMaximum (Double_t maximum=-1111)
virtual void SetMinimum (Double_t minimum=-1111)
void SetName (const char *name) override
 Set the name of the TNamed.
void SetNameTitle (const char *name, const char *title) override
 Set all the TNamed parameters (name and title).
virtual void SetNdivisions (Int_t n=510, Option_t *axis="X")
 Set the number of divisions to draw an axis.
virtual void SetNormFactor (Double_t factor=1)
virtual void SetOption (Option_t *option=" ")
void SetStatOverflows (EStatOverflows statOverflows)
 See GetStatOverflows for more information.
virtual void SetStats (Bool_t stats=kTRUE)
virtual void SetTickLength (Float_t length=0.02, Option_t *axis="X")
 Set the axis' tick marks length.
void SetTitle (const char *title) override
 Set the title of the TNamed.
virtual void SetTitleFont (Style_t font=62, Option_t *axis="X")
 Set the axis' title font.
virtual void SetTitleOffset (Float_t offset=1, Option_t *axis="X")
 Specify a parameter offset to control the distance between the axis and the axis' title.
virtual void SetTitleSize (Float_t size=0.02, Option_t *axis="X")
 Set the axis' title size.
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
virtual void SetXTitle (const char *title)
virtual void SetYTitle (const char *title)
virtual void SetZTitle (const char *title)
virtual TH1ShowBackground (Int_t niter=20, Option_t *option="same")
virtual Int_t ShowPeaks (Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
std::size_t size () const
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject.
virtual void Smooth (Int_t ntimes=1, Option_t *option="")
void Streamer (TBuffer &) override
 Stream an object of class TProfile.
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
void Sumw2 (Bool_t flag=kTRUE) override
 Create/delete structure to store sum of squares of weights per bin.
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
Bool_t TestBit (UInt_t f) const
Int_t TestBits (UInt_t f) const
void UseCurrentStyle () override
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.

Static Public Member Functions

static void AddDirectory (Bool_t add=kTRUE)
 Sets the flag controlling the automatic add of histograms in memory.
static Bool_t AddDirectoryStatus ()
 Check whether TH1-derived classes should register themselves to the current gDirectory.
static void Approximate (Bool_t approx=kTRUE)
 Static function to set the fgApproximate flag.
static Int_t CheckConsistency (const TH1 *h1, const TH1 *h2)
 Check histogram compatibility.
static TClassClass ()
static const char * Class_Name ()
static constexpr Version_t Class_Version ()
static const char * DeclFileName ()
static Int_t FitOptionsMake (Option_t *option, Foption_t &Foption)
static Int_t GetDefaultBufferSize ()
static Bool_t GetDefaultSumw2 ()
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
static Width_t GetMarkerLineWidth (Style_t style)
static Style_t GetMarkerStyleBase (Style_t style)
static Bool_t GetObjectStat ()
 Get status of object stat flag.
static TArrayReadArray (TBuffer &b, const TClass *clReq)
 Read TArray object from buffer.
static void SavePrimitiveFunctions (std::ostream &out, const char *varname, TList *lst)
static void SetDefaultBufferSize (Int_t bufsize=1000)
static void SetDefaultSumw2 (Bool_t sumw2=kTRUE)
static void SetDtorOnly (void *obj)
 Set destructor only flag.
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
static void SmoothArray (Int_t NN, Double_t *XX, Int_t ntimes=1)
static void StatOverflows (Bool_t flag=kTRUE)
static TH1TransformHisto (TVirtualFFT *fft, TH1 *h_output, Option_t *option)
static void WriteArray (TBuffer &b, const TArray *a)
 Write TArray object to buffer.

Public Attributes

Double_tfArray
Int_t fN

Protected Types

enum  { kOnlyPrepStep = (1ULL << (3)) }

Protected Member Functions

virtual Int_t AutoP2FindLimits (Double_t min, Double_t max)
 Buffer-based estimate of the histogram range using the power of 2 algorithm.
Int_t AxisChoice (Option_t *axis) const
 Choose an axis according to "axis".
Bool_t BoundsOk (const char *where, Int_t at) const
virtual Int_t BufferFill (Double_t x, Double_t y, Double_t w)
 accumulate arguments in buffer.
Int_t BufferFill (Double_t, Double_t) override
 accumulate arguments in buffer.
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
virtual void DoFillN (Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
virtual Double_t DoIntegral (Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2, Int_t iz1, Int_t iz2, Double_t &err, Option_t *opt, Bool_t doerr=kFALSE) const
Int_t Fill (const Double_t *v)
virtual Bool_t FindNewAxisLimits (const TAxis *axis, const Double_t point, Double_t &newMin, Double_t &newMax)
UInt_t GetAxisLabelStatus () const
Double_t GetBinErrorSqUnchecked (Int_t bin) const override
Bool_t GetStatOverflowsBehaviour () const
Bool_t IsEmpty () const
int LoggedInconsistency (const char *name, const TH1 *h1, const TH1 *h2, bool useMerge=false) const
void MakeZombie ()
Bool_t OutOfBoundsError (const char *where, Int_t i) const
 Generate an out-of-bounds error. Always returns false.
TString ProvideSaveName (Option_t *option, Bool_t testfdir=kFALSE)
Double_t RetrieveBinContent (Int_t bin) const override
 Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::GetBin.
virtual void SavePrimitiveHelp (std::ostream &out, const char *hname, Option_t *option="")
void SavePrimitiveNameTitle (std::ostream &out, const char *variable_name)
 Save object name and title into the output stream "out".
void SetBins (const Int_t *nbins, const Double_t *range)
void UpdateBinContent (Int_t bin, Double_t content) override
 Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin.

Static Protected Member Functions

static Int_t AutoP2GetBins (Int_t n)
 Auxiliary function to get the next power of 2 integer value larger then n.
static Double_t AutoP2GetPower2 (Double_t x, Bool_t next=kTRUE)
 Auxiliary function to get the power of 2 next (larger) or previous (smaller) a given x.
static bool CheckAxisLimits (const TAxis *a1, const TAxis *a2)
 Check that the axis limits of the histograms are the same.
static bool CheckBinLabels (const TAxis *a1, const TAxis *a2)
 Check that axis have same labels.
static bool CheckBinLimits (const TAxis *a1, const TAxis *a2)
 Check bin limits.
static bool CheckConsistentSubAxes (const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0)
 Check that two sub axis are the same.
static bool CheckEqualAxes (const TAxis *a1, const TAxis *a2)
 Check that the axis are the same.
static Bool_t RecomputeAxisLimits (TAxis &destAxis, const TAxis &anAxis)
static Bool_t SameLimitsAndNBins (const TAxis &axis1, const TAxis &axis2)
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".
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 TString SavePrimitiveVector (std::ostream &out, const char *prefix, Int_t len, Double_t *arr, Int_t flag=0)
 Save array in the output stream "out" as vector.

Protected Attributes

Short_t fBarOffset
 (1000*offset) for bar charts or legos
Short_t fBarWidth
 (1000*width) for bar charts or legos
TArrayD fBinEntries
 number of entries per bin
EBinErrorOpt fBinStatErrOpt
 Option for bin statistical errors.
TArrayD fBinSumw2
 Array of sum of squares of weights per bin.
Double_tfBuffer
 [fBufferSize] entry buffer
Int_t fBufferSize
 fBuffer size
TArrayD fContour
 Array to display contour levels.
Int_t fDimension
 ! Histogram dimension (1, 2 or 3 dim)
TDirectoryfDirectory
 ! Pointer to directory holding this histogram
Double_t fEntries
 Number of entries.
EErrorType fErrorMode
 Option to compute errors.
Color_t fFillColor
 Fill area color.
Style_t fFillStyle
 Fill area style.
TListfFunctions
 ->Pointer to list of functions (fits and user)
Double_tfIntegral
 ! Integral of bins used by GetRandom
Color_t fLineColor
 Line color.
Style_t fLineStyle
 Line style.
Width_t fLineWidth
 Line width.
Color_t fMarkerColor
 Marker color.
Size_t fMarkerSize
 Marker size.
Style_t fMarkerStyle
 Marker style.
Double_t fMaximum
 Maximum value for plotting.
Double_t fMinimum
 Minimum value for plotting.
TString fName
Int_t fNcells
 Number of bins(1D), cells (2D) +U/Overflows.
Double_t fNormFactor
 Normalization factor.
TString fOption
 Histogram options.
TVirtualHistPainterfPainter
 ! Pointer to histogram painter
Bool_t fScaling
 ! True when TProfile::Scale is called
EStatOverflows fStatOverflows
 Per object flag to use under/overflows in statistics.
TArrayD fSumw2
 Array of sum of squares of weights.
TString fTitle
Double_t fTsumw
 Total Sum of weights.
Double_t fTsumw2
 Total Sum of squares of weights.
Double_t fTsumwx
 Total Sum of weight*X.
Double_t fTsumwx2
 Total Sum of weight*X*X.
Double_t fTsumwy
 Total Sum of weight*Y.
Double_t fTsumwy2
 Total Sum of weight*Y*Y.
TAxis fXaxis
 X axis descriptor.
TAxis fYaxis
 Y axis descriptor.
Double_t fYmax
 Upper limit in Y (if set).
Double_t fYmin
 Lower limit in Y (if set).
TAxis fZaxis
 Z axis descriptor.

Static Protected Attributes

static Bool_t fgAddDirectory = kTRUE
 ! Flag to add histograms to the directory
static Bool_t fgApproximate = kFALSE
 bin error approximation option
static Int_t fgBufferSize = 1000
 ! Default buffer size for automatic histograms
static Bool_t fgDefaultSumw2 = kFALSE
 ! Flag to call TH1::Sumw2 automatically at histogram creation time
static Bool_t fgStatOverflows = kFALSE
 ! Flag to use under/overflows in statistics

Private Member Functions

void Build ()
 Creates histogram basic data structure.
Int_t Fill (Double_t) override
void FillN (Int_t, const Double_t *, const Double_t *, Int_t) override
Double_tGetB ()
Double_tGetB2 ()
Double_tGetW ()
Double_tGetW2 ()
void SetBins (Int_t, const Double_t *, Int_t, const Double_t *) override
void SetBins (Int_t, const Double_t *, Int_t, const Double_t *, Int_t, const Double_t *) override
void SetBins (Int_t, Double_t, Double_t, Int_t, Double_t, Double_t) override
void SetBins (Int_t, Double_t, Double_t, Int_t, Double_t, Double_t, Int_t, Double_t, Double_t) override
template<typename ValueType>
void SetSliceContent (const std::vector< Double_t > &values, const std::vector< std::pair< Int_t, Int_t > > &sliceEdges, ValueType *dataArray)
 Sets the content of a slice of bins in a histogram.
template<typename ValueType>
void SliceHistoInPlace (std::vector< Int_t > &args, ValueType *&dataArray, Int_t &fN)
 Slices a histogram in place based on the specified bin ranges for each dimension.

Static Private Member Functions

static void AddToTObjectTable (TObject *)
 Private helper function which will dispatch to TObjectTable::AddObj.

Private Attributes

UInt_t fBits
 bit field status word
UInt_t fUniqueID
 object unique identifier

Static Private Attributes

static Longptr_t fgDtorOnly = 0
 object for which to call dtor only (i.e. no delete)
static Bool_t fgObjectStat = kTRUE
 if true keep track of objects in TObjectTable

Friends

class TH1Merger
class TProfileHelper
Inheritance diagram for TProfile:
TH1D TH1 TArrayD TNamed TAttLine TAttFill TAttMarker TArray TObject

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Enumeration specifying which axes can be extended.

Enumerator
kNoAxis 

NOTE: Must always be 0 !!!

kXaxis 
kYaxis 
kZaxis 
kAllAxes 

Definition at line 121 of file TH1.h.

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
kOnlyPrepStep 

Used to request that the class specific implementation of TObject::Write just prepare the objects to be ready to be written but do not actually write them into the TBuffer.

This is just for example by TBufferMerger to request that the TTree inside the file calls TTree::FlushBaskets (outside of the merging lock) and TBufferMerger will later ask for the write (inside the merging lock). To take advantage of this feature the class needs to overload TObject::Write and use this enum value accordingly. (See TTree::Write and TObject::Write) Do not use, this feature will be migrate to the Merge function (See TClass and TTree::Merge)

Definition at line 106 of file TObject.h.

◆ anonymous enum

anonymous enum
inherited
Enumerator
kSingleKey 

write collection with single key

kOverwrite 

overwrite existing object with same name

kWriteDelete 

write object, then delete previous key with same name

Definition at line 99 of file TObject.h.

◆ anonymous enum

anonymous enum
inherited

Size of statistics data (size of array used in GetStats()/ PutStats ).

  • s[0] = sumw s[1] = sumw2
  • s[2] = sumwx s[3] = sumwx2
  • s[4] = sumwy s[5] = sumwy2 s[6] = sumwxy
  • s[7] = sumwz s[8] = sumwz2 s[9] = sumwxz s[10] = sumwyz
  • s[11] = sumwt s[12] = sumwt2 (11 and 12 used only by TProfile3D)
Enumerator
kNstat 

Size of statistics data (up to TProfile3D).

Definition at line 421 of file TH1.h.

◆ anonymous enum

anonymous enum
inherited
Enumerator
kIsOnHeap 

object is on heap

kNotDeleted 

object has not been deleted

kZombie 

object ctor failed

kInconsistent 

class overload Hash but does call RecursiveRemove in destructor

kBitMask 

Definition at line 89 of file TObject.h.

◆ EBinErrorOpt

enum TH1::EBinErrorOpt
inherited

Enumeration specifying type of statistics for bin errors.

Enumerator
kNormal 

Errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N).

kPoisson 

Errors from Poisson interval at 68.3% (1 sigma).

kPoisson2 

Errors from Poisson interval at 95% CL (~ 2 sigma).

Definition at line 114 of file TH1.h.

◆ EDeprecatedStatusBits

Enumerator
kObjInCanvas 

for backward compatibility only, use kMustCleanup

Definition at line 84 of file TObject.h.

◆ EInconsistencyBits

enum TH1::EInconsistencyBits
inherited

Enumeration specifying inconsistencies between two histograms, in increasing severity.

Enumerator
kFullyConsistent 
kDifferentLabels 
kDifferentBinLimits 
kDifferentAxisLimits 
kDifferentNumberOfBins 
kDifferentDimensions 

Definition at line 138 of file TH1.h.

◆ EStatOverflows

enum TH1::EStatOverflows
inherited

Enumeration specifying the way to treat statoverflow.

Enumerator
kIgnore 

Override global flag ignoring the overflows.

kConsider 

Override global flag considering the overflows.

kNeutral 

Adapt to the global flag.

Definition at line 130 of file TH1.h.

◆ EStatusBits

enum TH1::EStatusBits
inherited

TH1 status bits.

Enumerator
kNoStats 

Don't draw stats box.

kUserContour 

User specified contour levels.

kLogX 

X-axis in log scale.

kIsZoomed 

Bit set when zooming on Y axis.

kNoTitle 

Don't draw the histogram title.

kIsAverage 

Bin contents are average (used by Add).

kIsNotW 

Histogram is forced to be not weighted even when the histogram is filled with weighted.

kAutoBinPTwo 

different than 1.

Use Power(2)-based algorithm for autobinning

kIsHighlight 

bit set if histo is highlight

Definition at line 402 of file TH1.h.

Constructor & Destructor Documentation

◆ TProfile() [1/7]

TProfile::TProfile ( )

Default constructor for Profile histograms.

Definition at line 91 of file TProfile.cxx.

◆ TProfile() [2/7]

TProfile::TProfile ( const char * name,
const char * title,
Int_t nbins,
Double_t xlow,
Double_t xup,
Option_t * option = "" )

Normal Constructor for Profile histograms.

The first five parameters are similar to TH1D::TH1D. All values of y are accepted at filling time. To fill a profile histogram, one must use TProfile::Fill function.

Note that when filling the profile histogram the function Fill checks if the variable y is between fYmin and fYmax. If a minimum or maximum value is set for the Y scale before filling, then all values below ymin or above ymax will be discarded. Setting the minimum or maximum value for the Y scale before filling has the same effect as calling the special TProfile constructor below where ymin and ymax are specified.

H(j) is printed as the channel contents. The errors displayed are s(j) if option='S' (spread option), or e(j) if CHOPT='' (error on mean).

See TProfile::BuildOptions() for explanation of parameters

see also comments in the TH1 base class constructors

Definition at line 125 of file TProfile.cxx.

◆ TProfile() [3/7]

TProfile::TProfile ( const char * name,
const char * title,
Int_t nbins,
Double_t xlow,
Double_t xup,
Double_t ylow,
Double_t yup,
Option_t * option = "" )

Constructor for Profile histograms with range in y.

The first five parameters are similar to TH1D::TH1D. Only the values of Y between ylow and yup will be considered at filling time. ylow and yup will also be the maximum and minimum values on the y scale when drawing the profile.

See TProfile::BuildOptions for more explanations on errors

see also comments in the TH1 base class constructors

Definition at line 179 of file TProfile.cxx.

◆ TProfile() [4/7]

TProfile::TProfile ( const char * name,
const char * title,
Int_t nbins,
const Float_t * xbins,
Option_t * option = "" )

Constructor for Profile histograms with variable bin size.

See TProfile::BuildOptions() for more explanations on errors see also comments in the TH1 base class constructors

Definition at line 137 of file TProfile.cxx.

◆ TProfile() [5/7]

TProfile::TProfile ( const char * name,
const char * title,
Int_t nbins,
const Double_t * xbins,
Option_t * option = "" )

Constructor for Profile histograms with variable bin size.

See TProfile::BuildOptions for more explanations on errors see also comments in the TH1 base class constructors

Definition at line 149 of file TProfile.cxx.

◆ TProfile() [6/7]

TProfile::TProfile ( const char * name,
const char * title,
Int_t nbins,
const Double_t * xbins,
Double_t ylow,
Double_t yup,
Option_t * option = "" )

Constructor for Profile histograms with variable bin size.

See TProfile::BuildOptions for more explanations on errors

see also comments in the TH1 base class constructors

Definition at line 161 of file TProfile.cxx.

◆ TProfile() [7/7]

TProfile::TProfile ( const TProfile & profile)

Copy constructor.

Definition at line 243 of file TProfile.cxx.

◆ ~TProfile()

TProfile::~TProfile ( )
override

Default destructor for Profile histograms.

Definition at line 99 of file TProfile.cxx.

Member Function Documentation

◆ AbstractMethod()

void TObject::AbstractMethod ( const char * method) const
inherited

Call this function within a function that you don't want to define as purely virtual, in order not to force all users deriving from that class to implement that maybe (on their side) unused function; but at the same time, emit a run-time warning if they try to call it, telling that it is not implemented in the derived class: action must thus be taken on the user side to override it.

In other word, this method acts as a "runtime purely virtual" warning instead of a "compiler purely virtual" error.

Warning
This interface is a legacy function that is no longer recommended to be used by new development code.
Note
The name "AbstractMethod" does not imply that it's an abstract method in the strict C++ sense.

Definition at line 1149 of file TObject.cxx.

◆ Add() [1/3]

Bool_t TProfile::Add ( const TH1 * h1,
const TH1 * h2,
Double_t c1 = 1,
Double_t c2 = 1 )
overridevirtual

Replace contents of this profile by the addition of h1 and h2.

this = c1*h1 + c2*h2

c1 and c2 are considered as weights applied to the two summed profiles. The operation acts therefore like merging the two profiles with a weight c1 and c2

Reimplemented from TH1.

Definition at line 290 of file TProfile.cxx.

◆ Add() [2/3]

Bool_t TProfile::Add ( const TH1 * h1,
Double_t c1 = 1 )
overridevirtual

Performs the operation: this = this + c1*h1.

Reimplemented from TH1.

Definition at line 268 of file TProfile.cxx.

◆ Add() [3/3]

Bool_t TProfile::Add ( TF1 * h1,
Double_t c1 = 1,
Option_t * option = "" )
overridevirtual

Performs the operation: this = this + c1*f1.

Reimplemented from TH1.

Definition at line 258 of file TProfile.cxx.

◆ AddAt()

void TArrayD::AddAt ( Double_t c,
Int_t i )
inherited

Set the double c value at position i in the array.

Check for out of bounds. Warning: the name of the method is misleading, it actually overwrites the position i.

Definition at line 93 of file TArrayD.cxx.

◆ AddBinContent() [1/2]

void TH1D::AddBinContent ( Int_t bin)
inlineoverridevirtualinherited

Increment bin content by 1.

Passing an out-of-range bin leads to undefined behavior

Implements TH1.

Definition at line 940 of file TH1.h.

◆ AddBinContent() [2/2]

void TH1D::AddBinContent ( Int_t bin,
Double_t w )
inlineoverridevirtualinherited

Increment bin content by a weight w Passing an out-of-range bin leads to undefined behavior.

Implements TH1.

Definition at line 943 of file TH1.h.

◆ AddDirectory()

void TH1::AddDirectory ( Bool_t add = kTRUE)
staticinherited

Sets the flag controlling the automatic add of histograms in memory.

By default (fAddDirectory = kTRUE), histograms are automatically added to the current directory (gDirectory). Note that one histogram can be removed from its support directory by calling h->SetDirectory(nullptr) or h->SetDirectory(dir) to add it to the list of objects in the directory dir.

This is a static function. To call it, use TH1::AddDirectory

Deprecated
Use ROOT::Experimental::ObjectAutoRegistrationEnabled(). It can be set using an entry in rootrc or an environment variable, is initialised in a thread-safe manner and covers more cases.

Definition at line 1309 of file TH1.cxx.

◆ AddDirectoryStatus()

Bool_t TH1::AddDirectoryStatus ( )
staticinherited

Check whether TH1-derived classes should register themselves to the current gDirectory.

Note
Even if this returns true, the state of ROOT::Experimental::ObjectAutoRegistrationEnabled() might prevent the registration of histograms, since it has higher precedence.

Definition at line 764 of file TH1.cxx.

◆ AddToTObjectTable()

void TObject::AddToTObjectTable ( TObject * op)
staticprivateinherited

Private helper function which will dispatch to TObjectTable::AddObj.

Included here to avoid circular dependency between header files.

Definition at line 195 of file TObject.cxx.

◆ Adopt()

void TArrayD::Adopt ( Int_t n,
Double_t * arr )
inherited

Adopt array arr into TArrayD, i.e.

don't copy arr but use it directly in TArrayD. User may not delete arr, TArrayD dtor will do it.

Definition at line 80 of file TArrayD.cxx.

◆ AndersonDarlingTest() [1/2]

virtual Double_t TH1::AndersonDarlingTest ( const TH1 * h2,
Double_t & advalue ) const
virtualinherited

◆ AndersonDarlingTest() [2/2]

virtual Double_t TH1::AndersonDarlingTest ( const TH1 * h2,
Option_t * option = "" ) const
virtualinherited

◆ AppendPad()

void TObject::AppendPad ( Option_t * option = "")
virtualinherited

Append graphics object to current pad.

In case no current pad is set yet, create a default canvas with the name "c1".

Definition at line 204 of file TObject.cxx.

◆ Approximate()

void TProfile::Approximate ( Bool_t approx = kTRUE)
static

Static function to set the fgApproximate flag.

When the flag is true, the function GetBinError will approximate the bin error with the average profile error on all bins in the following situation only

  • the number of bins in the profile is less than 1002
  • the bin number of entries is small ( <5)
  • the estimated bin error is extremely small compared to the bin content (see TProfile::GetBinError)

Definition at line 323 of file TProfile.cxx.

◆ At()

Double_t TArrayD::At ( Int_t i) const
inlineinherited

Definition at line 79 of file TArrayD.h.

◆ AutoP2FindLimits()

Int_t TH1::AutoP2FindLimits ( Double_t xmi,
Double_t xma )
protectedvirtualinherited

Buffer-based estimate of the histogram range using the power of 2 algorithm.

Used by the autobin power of 2 algorithm.

Works on arguments (min and max from fBuffer) and internal inputs: fXmin, fXmax, NBinsX (from fXaxis), ... Result save internally in fXaxis.

Overloaded by TH2 and TH3.

Return -1 if internal inputs are inconsistent, 0 otherwise.

Definition at line 1358 of file TH1.cxx.

◆ AutoP2GetBins()

Int_t TH1::AutoP2GetBins ( Int_t n)
inlinestaticprotectedinherited

Auxiliary function to get the next power of 2 integer value larger then n.

Used by the autobin power of 2 algorithm

Definition at line 1336 of file TH1.cxx.

◆ AutoP2GetPower2()

Double_t TH1::AutoP2GetPower2 ( Double_t x,
Bool_t next = kTRUE )
inlinestaticprotectedinherited

Auxiliary function to get the power of 2 next (larger) or previous (smaller) a given x.

next = kTRUE : next larger next = kFALSE : previous smaller

Used by the autobin power of 2 algorithm

Definition at line 1323 of file TH1.cxx.

◆ AxisChoice()

Int_t TH1::AxisChoice ( Option_t * axis) const
protectedinherited

Choose an axis according to "axis".

Definition at line 14 of file Haxis.cxx.

◆ BoundsOk()

Bool_t TArray::BoundsOk ( const char * where,
Int_t at ) const
inlineprotectedinherited

Definition at line 79 of file TArray.h.

◆ Browse()

void TH1::Browse ( TBrowser * b)
overridevirtualinherited

Browse the Histogram object.

Reimplemented from TObject.

Definition at line 772 of file TH1.cxx.

◆ BufferEmpty()

Int_t TProfile::BufferEmpty ( Int_t action = 0)
overridevirtual

Fill histogram with all entries in the buffer.

  • action = -1 histogram is reset and refilled from the buffer (called by THistPainter::Paint)
  • action = 0 histogram is filled from the buffer
  • action = 1 histogram is filled and buffer is deleted The buffer is automatically deleted when the number of entries in the buffer is greater than the number of entries in the histogram

Reimplemented from TH1.

Definition at line 337 of file TProfile.cxx.

◆ BufferFill() [1/2]

Int_t TProfile::BufferFill ( Double_t x,
Double_t y,
Double_t w )
protectedvirtual

accumulate arguments in buffer.

When buffer is full, empty the buffer.

  • fBuffer[0] = number of entries in buffer
  • fBuffer[1] = w of first entry
  • fBuffer[2] = x of first entry
  • fBuffer[3] = y of first entry

Definition at line 395 of file TProfile.cxx.

◆ BufferFill() [2/2]

Int_t TProfile::BufferFill ( Double_t x,
Double_t w )
inlineoverrideprotectedvirtual

accumulate arguments in buffer.

When buffer is full, empty the buffer

  • fBuffer[0] = number of entries in buffer
  • fBuffer[1] = w of first entry
  • fBuffer[2] = x of first entry

Reimplemented from TH1.

Definition at line 50 of file TProfile.h.

◆ Build()

void TH1::Build ( )
privateinherited

Creates histogram basic data structure.

Definition at line 781 of file TH1.cxx.

◆ BuildOptions()

void TProfile::BuildOptions ( Double_t ymin,
Double_t ymax,
Option_t * option )

Set Profile histogram structure and options.

Parameters
[in]yminminimum value allowed for y
[in]ymaxmaximum value allowed for y if (ymin = ymax = 0) there are no limits on the allowed y values (ymin = -inf, ymax = +inf)
[in]optionthis is the option for the computation of the y error of the profile ( TProfile::GetBinError ) possible values for the options are:
  • ' ' (Default) the bin errors are the standard error on the mean of Y = S(Y)/SQRT(N) where S(Y) is the standard deviation (RMS) of the Y data in the bin and N is the number of bin entries (from TProfile::GetBinEntries(ibin) ) (i.e the errors are the standard error on the bin content of the profile)
  • 's' Errors are the standard deviation of Y, S(Y)
  • 'i' Errors are S(Y)/SQRT(N) (standard error on the mean as in the default) The only difference is only when the standard deviation in Y is zero. In this case the error a standard deviation = 1/SQRT(12) is assumed and the error is 1./SQRT(12*N). This approximation assumes that the Y values are integer (e.g. ADC counts) and have an implicit uncertainty of y +/- 0.5. With the assumption that the probability that y takes any value between y-0.5 and y+0.5 is uniform, its standard error is 1/SQRT(12)
  • 'g' Errors are 1./SQRT(W) where W is the sum of the weights for the bin j W is obtained as from TProfile::GetBinEntries(ibin) This errors corresponds to the standard deviation of weighted mean where each measurement Y is uncorrelated and has an error sigma, which is expressed in the weight used to fill the Profile: w = 1/sigma^2 The resulting error in TProfile is then 1./SQRT( Sum(1./sigma^2) )

In the case of Profile filled weights and with TProfile::Sumw2() called, STD(Y) is the standard deviation of the weighted sample Y and N is in this case the number of effective entries (TProfile::GetBinEffectiveEntries(ibin) )

If a bin has N data points all with the same value Y (especially possible when dealing with integers), the spread in Y for that bin is zero, and the uncertainty assigned is also zero, and the bin is ignored in making subsequent fits. To avoid this problem one can use an approximation for the standard deviation S(Y), by using the average of all the S(Y) of the other Profile bins. To use this approximation one must call before TProfile::Approximate This approximation applies only for the default and the 's' options

Definition at line 226 of file TProfile.cxx.

◆ CanExtendAllAxes()

virtual Bool_t TH1::CanExtendAllAxes ( ) const
virtualinherited

◆ CheckAxisLimits()

bool TH1::CheckAxisLimits ( const TAxis * a1,
const TAxis * a2 )
staticprotectedinherited

Check that the axis limits of the histograms are the same.

If a first and last bin is passed the axis is compared between the given range

Definition at line 1612 of file TH1.cxx.

◆ CheckBinLabels()

bool TH1::CheckBinLabels ( const TAxis * a1,
const TAxis * a2 )
staticprotectedinherited

Check that axis have same labels.

Definition at line 1583 of file TH1.cxx.

◆ CheckBinLimits()

bool TH1::CheckBinLimits ( const TAxis * a1,
const TAxis * a2 )
staticprotectedinherited

Check bin limits.

Definition at line 1556 of file TH1.cxx.

◆ CheckConsistency()

Int_t TH1::CheckConsistency ( const TH1 * h1,
const TH1 * h2 )
staticinherited

Check histogram compatibility.

The returned integer is part of EInconsistencyBits The value 0 means that the histograms are compatible

Definition at line 1694 of file TH1.cxx.

◆ CheckConsistentSubAxes()

bool TH1::CheckConsistentSubAxes ( const TAxis * a1,
Int_t firstBin1,
Int_t lastBin1,
const TAxis * a2,
Int_t firstBin2 = 0,
Int_t lastBin2 = 0 )
staticprotectedinherited

Check that two sub axis are the same.

The limits are defined by first bin and last bin N.B. no check is done in this case for variable bins

Definition at line 1655 of file TH1.cxx.

◆ CheckedHash()

ULong_t TObject::CheckedHash ( )
inlineinherited

Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.

The intent is for this routine to be called instead of directly calling the function Hash during "insert" operations. See TObject::HasInconsistenTObjectHash();

(*) The setup is consistent when all classes in the class hierarchy that overload TObject::Hash do call ROOT::CallRecursiveRemoveIfNeeded in their destructor. i.e. it is safe to call the Hash virtual function during the RecursiveRemove operation.

Definition at line 332 of file TObject.h.

◆ CheckEqualAxes()

bool TH1::CheckEqualAxes ( const TAxis * a1,
const TAxis * a2 )
staticprotectedinherited

Check that the axis are the same.

Definition at line 1626 of file TH1.cxx.

◆ Chi2Test()

Double_t TProfile::Chi2Test ( const TH1 * h2,
Option_t * option = "WW",
Double_t * res = nullptr ) const
overridevirtual

Run a Chi2Test between a TProfileD and another histogram.

If the argument is also a TProfileD, this calls TH1::Chi2Test() with the option "WW".

See also
TH1::Chi2Test()

Reimplemented from TH1.

Definition at line 424 of file TProfile.cxx.

◆ Chi2TestX()

virtual Double_t TH1::Chi2TestX ( const TH1 * h2,
Double_t & chi2,
Int_t & ndf,
Int_t & igood,
Option_t * option = "UU",
Double_t * res = nullptr ) const
virtualinherited

◆ Chisquare()

virtual Double_t TH1::Chisquare ( TF1 * f1,
Option_t * option = "" ) const
virtualinherited

◆ Class()

TClass * TProfile::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

const char * TProfile::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

constexpr Version_t TProfile::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 139 of file TProfile.h.

◆ ClassName()

const char * TObject::ClassName ( ) const
virtualinherited

Returns name of class to which the object belongs.

Definition at line 227 of file TObject.cxx.

◆ Clear()

void TNamed::Clear ( Option_t * option = "")
overridevirtualinherited

Set name and title to empty strings ("").

Reimplemented from TObject.

Reimplemented in TPrincipal, TProcessID, TStreamerInfo, TTask, TVirtualFitter, and TVirtualStreamerInfo.

Definition at line 63 of file TNamed.cxx.

◆ ClearUnderflowAndOverflow()

virtual void TH1::ClearUnderflowAndOverflow ( )
virtualinherited

◆ Clone()

TObject * TH1::Clone ( const char * newname = "") const
overridevirtualinherited

Make a clone of an object using the Streamer facility.

If the object derives from TNamed, this function is called by TNamed::Clone. TNamed::Clone uses the optional argument to set a new name to the newly created object.

If the object class has a DirectoryAutoAdd function, it will be called at the end of the function with the parameter gDirectory. This usually means that the object will be appended to the current ROOT directory.

Reimplemented from TObject.

◆ Compare()

Int_t TNamed::Compare ( const TObject * obj) const
overridevirtualinherited

Compare two TNamed objects.

Returns 0 when equal, -1 when this is smaller and +1 when bigger (like strcmp).

Reimplemented from TObject.

Reimplemented in TStructNodeProperty.

Definition at line 84 of file TNamed.cxx.

◆ ComputeIntegral()

virtual Double_t TH1::ComputeIntegral ( Bool_t onlyPositive = false,
Option_t * option = "" )
virtualinherited

Reimplemented in TH2Poly.

◆ Copy() [1/5]

void TArrayD::Copy ( TArrayD & array) const
inlineinherited

Definition at line 42 of file TArrayD.h.

◆ Copy() [2/5]

void TAttFill::Copy ( TAttFill & attfill) const
inherited

◆ Copy() [3/5]

void TAttLine::Copy ( TAttLine & attline) const
inherited

◆ Copy() [4/5]

void TAttMarker::Copy ( TAttMarker & attmarker) const
inherited

◆ Copy() [5/5]

void TProfile::Copy ( TObject & hnew) const
overridevirtual

Copy a Profile histogram to a new profile histogram.

Reimplemented from TH1D.

Definition at line 450 of file TProfile.cxx.

◆ DeclFileName()

const char * TProfile::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 139 of file TProfile.h.

◆ Delete()

void TObject::Delete ( Option_t * option = "")
virtualinherited

◆ DirectoryAutoAdd()

virtual void TH1::DirectoryAutoAdd ( TDirectory * )
virtualinherited

◆ DistancetoLine()

Int_t TAttLine::DistancetoLine ( Int_t px,
Int_t py,
Double_t xp1,
Double_t yp1,
Double_t xp2,
Double_t yp2 )
inherited

◆ DistancetoPrimitive()

Int_t TH1::DistancetoPrimitive ( Int_t px,
Int_t py )
overridevirtualinherited

Computes distance from point (px,py) to the object.

This member function must be implemented for each graphics primitive. This default function returns a big number (999999).

Reimplemented from TObject.

◆ Divide() [1/3]

Bool_t TProfile::Divide ( const TH1 * h1)
overridevirtual

Divide this profile by h1.

this = this/h1

This function accepts to divide a TProfile by a histogram

The function return kFALSE if the divide operation failed

Reimplemented from TH1.

Definition at line 495 of file TProfile.cxx.

◆ Divide() [2/3]

Bool_t TProfile::Divide ( const TH1 * h1,
const TH1 * h2,
Double_t c1 = 1,
Double_t c2 = 1,
Option_t * option = "" )
overridevirtual

Replace contents of this profile by the division of h1 by h2.

this = c1*h1/(c2*h2)

The function return kFALSE if the divide operation failed

Reimplemented from TH1.

Definition at line 574 of file TProfile.cxx.

◆ Divide() [3/3]

Bool_t TProfile::Divide ( TF1 * h1,
Double_t c1 = 1 )
overridevirtual

Performs the operation: this = this/(c1*f1).

This function is not implemented for the TProfile

Reimplemented from TH1.

Definition at line 480 of file TProfile.cxx.

◆ DoError()

void TObject::DoError ( int level,
const char * location,
const char * fmt,
va_list va ) const
protectedvirtualinherited

Interface to ErrorHandler (protected).

Reimplemented in TThread, and TTreeViewer.

Definition at line 1059 of file TObject.cxx.

◆ DoFillN()

virtual void TH1::DoFillN ( Int_t ntimes,
const Double_t * x,
const Double_t * w,
Int_t stride = 1 )
protectedvirtualinherited

◆ DoIntegral()

virtual Double_t TH1::DoIntegral ( Int_t ix1,
Int_t ix2,
Int_t iy1,
Int_t iy2,
Int_t iz1,
Int_t iz2,
Double_t & err,
Option_t * opt,
Bool_t doerr = kFALSE ) const
protectedvirtualinherited

◆ Draw()

void TH1::Draw ( Option_t * option = "")
overridevirtualinherited

Default Draw method for all objects.

Reimplemented from TObject.

◆ DrawClass()

void TObject::DrawClass ( ) const
virtualinherited

Draw class inheritance tree of the class to which this object belongs.

If a class B inherits from a class A, description of B is drawn on the right side of description of A. Member functions overridden by B are shown in class A with a blue line crossing-out the corresponding member function. The following picture is the class inheritance tree of class TPaveLabel:

Reimplemented in TGFrame, TSystemDirectory, and TSystemFile.

Definition at line 308 of file TObject.cxx.

◆ DrawClone()

TObject * TObject::DrawClone ( Option_t * option = "") const
virtualinherited

Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).

If pad was not selected - gPad will be used.

Note
For histograms, use the more specialised TH1::DrawCopy().

Reimplemented in TAxis, TCanvas, TGFrame, TSystemDirectory, and TSystemFile.

Definition at line 319 of file TObject.cxx.

◆ DrawCopy()

virtual TH1 * TH1::DrawCopy ( Option_t * option = "",
const char * name_postfix = "_copy" ) const
virtualinherited

◆ DrawNormalized()

virtual TH1 * TH1::DrawNormalized ( Option_t * option = "",
Double_t norm = 1 ) const
virtualinherited

◆ DrawPanel()

virtual void TH1::DrawPanel ( )
virtualinherited

◆ Dump()

void TObject::Dump ( ) const
virtualinherited

Dump contents of object on stdout.

Using the information in the object dictionary (class TClass) each data member is interpreted. If a data member is a pointer, the pointer value is printed

The following output is the Dump of a TArrow object:

fAngle 0 Arrow opening angle (degrees)
fArrowSize 0.2 Arrow Size
fOption.*fData
fX1 0.1 X of 1st point
fY1 0.15 Y of 1st point
fX2 0.67 X of 2nd point
fY2 0.83 Y of 2nd point
fUniqueID 0 object unique identifier
fBits 50331648 bit field status word
fFillColor 19 fill area color
fFillStyle 1001 fill area style
#define X(type, name)
Option_t Option_t TPoint TPoint angle
Option_t Option_t width
Option_t Option_t style
Style_t fFillStyle
Fill area style.
Definition TAttFill.h:25
Color_t fFillColor
Fill area color.
Definition TAttFill.h:24
Width_t fLineWidth
Line width.
Definition TAttLine.h:26
Style_t fLineStyle
Line style.
Definition TAttLine.h:25
Color_t fLineColor
Line color.
Definition TAttLine.h:24
TString fOption
Histogram options.
Definition TH1.h:166
UInt_t fUniqueID
object unique identifier
Definition TObject.h:46
UInt_t fBits
bit field status word
Definition TObject.h:47
TLine * line

Reimplemented in TClass, TCollection, TGFrame, TGPack, and TSystemFile.

Definition at line 367 of file TObject.cxx.

◆ Error()

void TObject::Error ( const char * location,
const char * fmt,
... ) const
virtualinherited

Issue error message.

Use "location" to specify the method where the error occurred. Accepts standard printf formatting arguments.

Reimplemented in TFitResult.

Definition at line 1098 of file TObject.cxx.

◆ Eval()

virtual void TH1::Eval ( TF1 * f1,
Option_t * option = "" )
virtualinherited

◆ Execute() [1/2]

void TObject::Execute ( const char * method,
const char * params,
Int_t * error = nullptr )
virtualinherited

Execute method on this object with the given parameter string, e.g.

"3.14,1,\"text\"".

Reimplemented in ROOT::R::TRInterface, TCling, TContextMenu, TInterpreter, and TMethodCall.

Definition at line 378 of file TObject.cxx.

◆ Execute() [2/2]

void TObject::Execute ( TMethod * method,
TObjArray * params,
Int_t * error = nullptr )
virtualinherited

Execute method on this object with parameters stored in the TObjArray.

The TObjArray should contain an argv vector like:

argv[0] ... argv[n] = the list of TObjString parameters
Collectable string class.
Definition TObjString.h:28
const Int_t n
Definition legend1.C:16

Reimplemented in ROOT::R::TRInterface, TCling, TContextMenu, TInterpreter, and TMethodCall.

Definition at line 398 of file TObject.cxx.

◆ ExecuteEvent()

void TH1::ExecuteEvent ( Int_t event,
Int_t px,
Int_t py )
overridevirtualinherited

Execute action corresponding to an event at (px,py).

This method must be overridden if an object can react to graphics events.

Reimplemented from TObject.

◆ ExtendAxis()

void TProfile::ExtendAxis ( Double_t x,
TAxis * axis )
overridevirtual

Profile histogram is resized along x axis such that x is in the axis range.

The new axis limits are recomputed by doubling iteratively the current axis range until the specified value x is within the limits. The algorithm makes a copy of the histogram, then loops on all bins of the old histogram to fill the extended histogram. Takes into account errors (Sumw2) if any. The axis must be extendable before invoking this function.

Ex: h->GetXaxis()->SetCanExtend(kTRUE)

Reimplemented from TH1.

Definition at line 1611 of file TProfile.cxx.

◆ Fatal()

void TObject::Fatal ( const char * location,
const char * fmt,
... ) const
virtualinherited

Issue fatal error message.

Use "location" to specify the method where the fatal error occurred. Accepts standard printf formatting arguments.

Definition at line 1126 of file TObject.cxx.

◆ FFT()

virtual TH1 * TH1::FFT ( TH1 * h_output,
Option_t * option )
virtualinherited

Reimplemented in TH2Poly.

◆ Fill() [1/6]

Int_t TProfile::Fill ( const char * namex,
Double_t y )
overridevirtual

Fill a Profile histogram (no weights).

Reimplemented from TH1.

Definition at line 707 of file TProfile.cxx.

◆ Fill() [2/6]

Int_t TProfile::Fill ( const char * namex,
Double_t y,
Double_t w )
virtual

Fill a Profile histogram with weights.

Definition at line 769 of file TProfile.cxx.

◆ Fill() [3/6]

Int_t TProfile::Fill ( const Double_t * v)
inlineprotected

Definition at line 55 of file TProfile.h.

◆ Fill() [4/6]

Int_t TProfile::Fill ( Double_t x,
Double_t y )
overridevirtual

Fill a Profile histogram (no weights).

Reimplemented from TH1.

Definition at line 677 of file TProfile.cxx.

◆ Fill() [5/6]

Int_t TProfile::Fill ( Double_t x,
Double_t y,
Double_t w )
virtual

Fill a Profile histogram with weights.

Definition at line 737 of file TProfile.cxx.

◆ Fill() [6/6]

Int_t TProfile::Fill ( Double_t )
inlineoverrideprivatevirtual

Reimplemented from TH1.

Definition at line 62 of file TProfile.h.

◆ FillBuffer()

void TNamed::FillBuffer ( char *& buffer)
virtualinherited

Encode TNamed into output buffer.

Reimplemented in TDirectoryFile, TFile, TKey, TKeySQL, TKeyXML, TSQLFile, and TXMLFile.

Definition at line 103 of file TNamed.cxx.

◆ FillN() [1/2]

void TProfile::FillN ( Int_t ntimes,
const Double_t * x,
const Double_t * y,
const Double_t * w,
Int_t stride = 1 )
overridevirtual

Fill a Profile histogram with weights.

Reimplemented from TH1.

Definition at line 803 of file TProfile.cxx.

◆ FillN() [2/2]

void TProfile::FillN ( Int_t ,
const Double_t * ,
const Double_t * ,
Int_t  )
inlineoverrideprivatevirtual

Reimplemented from TH1.

Definition at line 63 of file TProfile.h.

◆ FillRandom() [1/3]

void TH1::FillRandom ( const char * fname,
Int_t ntimes = 5000,
TRandom * rng = nullptr )
inherited

◆ FillRandom() [2/3]

virtual void TH1::FillRandom ( TF1 * f1,
Int_t ntimes = 5000,
TRandom * rng = nullptr )
virtualinherited

Reimplemented in TH2, and TH3.

◆ FillRandom() [3/3]

virtual void TH1::FillRandom ( TH1 * h,
Int_t ntimes = 5000,
TRandom * rng = nullptr )
virtualinherited

Reimplemented in TH2, and TH3.

◆ FindBin()

virtual Int_t TH1::FindBin ( Double_t x,
Double_t y = 0,
Double_t z = 0 )
virtualinherited

Reimplemented in TH2Poly.

◆ FindFirstBinAbove()

virtual Int_t TH1::FindFirstBinAbove ( Double_t threshold = 0,
Int_t axis = 1,
Int_t firstBin = 1,
Int_t lastBin = -1 ) const
virtualinherited

◆ FindFixBin()

virtual Int_t TH1::FindFixBin ( Double_t x,
Double_t y = 0,
Double_t z = 0 ) const
virtualinherited

◆ FindLastBinAbove()

virtual Int_t TH1::FindLastBinAbove ( Double_t threshold = 0,
Int_t axis = 1,
Int_t firstBin = 1,
Int_t lastBin = -1 ) const
virtualinherited

◆ FindNewAxisLimits()

virtual Bool_t TH1::FindNewAxisLimits ( const TAxis * axis,
const Double_t point,
Double_t & newMin,
Double_t & newMax )
protectedvirtualinherited

◆ FindObject() [1/2]

TObject * TH1::FindObject ( const char * name) const
overridevirtualinherited

Must be redefined in derived classes.

This function is typically used with TCollections, but can also be used to find an object by name inside this object.

Reimplemented from TObject.

◆ FindObject() [2/2]

TObject * TH1::FindObject ( const TObject * obj) const
overridevirtualinherited

Must be redefined in derived classes.

This function is typically used with TCollections, but can also be used to find an object inside this object.

Reimplemented from TObject.

◆ Fit() [1/2]

virtual TFitResultPtr TH1::Fit ( const char * formula,
Option_t * option = "",
Option_t * goption = "",
Double_t xmin = 0,
Double_t xmax = 0 )
virtualinherited

◆ Fit() [2/2]

virtual TFitResultPtr TH1::Fit ( TF1 * f1,
Option_t * option = "",
Option_t * goption = "",
Double_t xmin = 0,
Double_t xmax = 0 )
virtualinherited

◆ FitOptionsMake()

Int_t TH1::FitOptionsMake ( Option_t * option,
Foption_t & Foption )
staticinherited

◆ FitPanel()

virtual void TH1::FitPanel ( )
virtualinherited

◆ GetArray() [1/2]

Double_t * TArrayD::GetArray ( )
inlineinherited

Definition at line 44 of file TArrayD.h.

◆ GetArray() [2/2]

const Double_t * TArrayD::GetArray ( ) const
inlineinherited

Definition at line 43 of file TArrayD.h.

◆ GetAsymmetry()

TH1 * TH1::GetAsymmetry ( TH1 * h2,
Double_t c2 = 1,
Double_t dc2 = 0 )
inherited

◆ GetAt()

Double_t TArrayD::GetAt ( Int_t i) const
inlineoverridevirtualinherited

Implements TArray.

Definition at line 45 of file TArrayD.h.

◆ GetAxisColor()

Color_t TH1::GetAxisColor ( Option_t * axis = "X") const
virtualinherited

Return the number of divisions for "axis".

Definition at line 40 of file Haxis.cxx.

◆ GetAxisLabelStatus()

UInt_t TH1::GetAxisLabelStatus ( ) const
protectedinherited

◆ GetB()

Double_t * TProfile::GetB ( )
inlineprivate

Definition at line 64 of file TProfile.h.

◆ GetB2()

Double_t * TProfile::GetB2 ( )
inlineprivate

Definition at line 65 of file TProfile.h.

◆ GetBarOffset()

virtual Float_t TH1::GetBarOffset ( ) const
inlinevirtualinherited

Definition at line 500 of file TH1.h.

◆ GetBarWidth()

virtual Float_t TH1::GetBarWidth ( ) const
inlinevirtualinherited

Definition at line 501 of file TH1.h.

◆ GetBin()

virtual Int_t TH1::GetBin ( Int_t binx,
Int_t biny = 0,
Int_t binz = 0 ) const
virtualinherited

Reimplemented in TH2, and TH3.

◆ GetBinCenter()

virtual Double_t TH1::GetBinCenter ( Int_t bin) const
virtualinherited

◆ GetBinContent() [1/3]

Double_t TProfile::GetBinContent ( Int_t bin) const
overridevirtual

Return bin content of a Profile histogram.

Reimplemented from TH1.

Definition at line 851 of file TProfile.cxx.

◆ GetBinContent() [2/3]

Double_t TProfile::GetBinContent ( Int_t bin,
Int_t  ) const
inlineoverridevirtual

Reimplemented from TH1.

Definition at line 105 of file TProfile.h.

◆ GetBinContent() [3/3]

Double_t TProfile::GetBinContent ( Int_t bin,
Int_t ,
Int_t  ) const
inlineoverridevirtual

Reimplemented from TH1.

Definition at line 106 of file TProfile.h.

◆ GetBinEffectiveEntries()

Double_t TProfile::GetBinEffectiveEntries ( Int_t bin) const
virtual

Return bin effective entries for a weighted filled Profile histogram.

In case of an unweighted profile, it is equivalent to the number of entries per bin The effective entries is defined as the square of the sum of the weights divided by the sum of the weights square. TProfile::Sumw2() must be called before filling the profile with weights. Only by calling this method the sum of the square of the weights per bin is stored.

Definition at line 880 of file TProfile.cxx.

◆ GetBinEntries()

Double_t TProfile::GetBinEntries ( Int_t bin) const
virtual

Return bin entries of a Profile histogram.

Definition at line 864 of file TProfile.cxx.

◆ GetBinError() [1/3]

Double_t TProfile::GetBinError ( Int_t bin) const
overridevirtual

Return bin error of a Profile histogram.

Computing errors: A moving field

The computation of errors for a TProfile has evolved with the versions of ROOT. The difficulty is in computing errors for bins with low statistics.

  • prior to version 3.00, we had no special treatment of low statistic bins. As a result, these bins had huge errors. The reason is that the expression eprim2 is very close to 0 (rounding problems) or 0.
  • in version 3.00 (18 Dec 2000), the algorithm is protected for values of eprim2 very small and the bin errors set to the average bin errors, following recommendations from a group of users.
  • in version 3.01 (19 Apr 2001), it is realized that the algorithm above should be applied only to low statistic bins.
  • in version 3.02 (26 Sep 2001), the same group of users recommend instead to take two times the average error on all bins for these low statistics bins giving a very small value for eprim2.
  • in version 3.04 (Nov 2002), the algorithm is modified/protected for the case when a TProfile is projected (ProjectionX). The previous algorithm generated a N^2 problem when projecting a TProfile with a large number of bins (eg 100000).
  • in version 3.05/06, a new static function TProfile::Approximate is introduced to enable or disable (default) the approximation.

Ideas for improvements of this algorithm are welcome. No suggestions received since our call for advice to roottalk in Jul 2002. see for instance: http://root.cern/root/roottalk/roottalk02/2916.html

Reimplemented from TH1.

Definition at line 915 of file TProfile.cxx.

◆ GetBinError() [2/3]

Double_t TProfile::GetBinError ( Int_t bin,
Int_t  ) const
inlineoverridevirtual

Reimplemented from TH1.

Definition at line 108 of file TProfile.h.

◆ GetBinError() [3/3]

Double_t TProfile::GetBinError ( Int_t bin,
Int_t ,
Int_t  ) const
inlineoverridevirtual

Reimplemented from TH1.

Definition at line 109 of file TProfile.h.

◆ GetBinErrorLow()

virtual Double_t TH1::GetBinErrorLow ( Int_t bin) const
virtualinherited

Reimplemented in TH2, and TH3.

◆ GetBinErrorOption()

virtual EBinErrorOpt TH1::GetBinErrorOption ( ) const
inlinevirtualinherited

Definition at line 517 of file TH1.h.

◆ GetBinErrorSqUnchecked()

Double_t TProfile::GetBinErrorSqUnchecked ( Int_t bin) const
inlineoverrideprotectedvirtual

Reimplemented from TH1.

Definition at line 59 of file TProfile.h.

◆ GetBinErrorUp()

virtual Double_t TH1::GetBinErrorUp ( Int_t bin) const
virtualinherited

Reimplemented in TH2, and TH3.

◆ GetBinLowEdge()

virtual Double_t TH1::GetBinLowEdge ( Int_t bin) const
virtualinherited

◆ GetBinSumw2() [1/2]

virtual TArrayD * TProfile::GetBinSumw2 ( )
inlinevirtual

Definition at line 112 of file TProfile.h.

◆ GetBinSumw2() [2/2]

virtual const TArrayD * TProfile::GetBinSumw2 ( ) const
inlinevirtual

Definition at line 113 of file TProfile.h.

◆ GetBinWidth()

virtual Double_t TH1::GetBinWidth ( Int_t bin) const
virtualinherited

◆ GetBinWithContent()

virtual Double_t TH1::GetBinWithContent ( Double_t c,
Int_t & binx,
Int_t firstx = 0,
Int_t lastx = 0,
Double_t maxdiff = 0 ) const
virtualinherited

◆ GetBinXYZ()

virtual void TH1::GetBinXYZ ( Int_t binglobal,
Int_t & binx,
Int_t & biny,
Int_t & binz ) const
virtualinherited

◆ GetBuffer()

const Double_t * TH1::GetBuffer ( ) const
inlineinherited

Definition at line 483 of file TH1.h.

◆ GetBufferLength()

Int_t TH1::GetBufferLength ( ) const
inlineinherited

Definition at line 481 of file TH1.h.

◆ GetBufferSize()

Int_t TH1::GetBufferSize ( ) const
inlineinherited

Definition at line 482 of file TH1.h.

◆ GetCellContent()

virtual Double_t TH1::GetCellContent ( Int_t binx,
Int_t biny ) const
inlinevirtualinherited

Definition at line 682 of file TH1.h.

◆ GetCellError()

virtual Double_t TH1::GetCellError ( Int_t binx,
Int_t biny ) const
inlinevirtualinherited

Definition at line 684 of file TH1.h.

◆ GetCenter()

virtual void TH1::GetCenter ( Double_t * center) const
virtualinherited

◆ GetContour()

virtual Int_t TH1::GetContour ( Double_t * levels = nullptr)
virtualinherited

◆ GetContourLevel()

virtual Double_t TH1::GetContourLevel ( Int_t level) const
virtualinherited

◆ GetContourLevelPad()

virtual Double_t TH1::GetContourLevelPad ( Int_t level) const
virtualinherited

◆ GetCumulative()

TH1 * TH1::GetCumulative ( Bool_t forward = kTRUE,
const char * suffix = "_cumulative" ) const
inherited

◆ GetDefaultBufferSize()

Int_t TH1::GetDefaultBufferSize ( )
staticinherited

◆ GetDefaultSumw2()

Bool_t TH1::GetDefaultSumw2 ( )
staticinherited

◆ GetDimension()

virtual Int_t TH1::GetDimension ( ) const
inlinevirtualinherited

Definition at line 527 of file TH1.h.

◆ GetDirectory()

TDirectory * TH1::GetDirectory ( ) const
inlineinherited

Definition at line 523 of file TH1.h.

◆ GetDrawOption()

Option_t * TObject::GetDrawOption ( ) const
virtualinherited

Get option used by the graphics system to draw this object.

Note that before calling object.GetDrawOption(), you must have called object.Draw(..) before in the current pad.

Reimplemented in TBrowser, TFitEditor, TGedFrame, TGFileBrowser, TRootBrowser, and TRootBrowserLite.

Definition at line 445 of file TObject.cxx.

◆ GetDtorOnly()

Longptr_t TObject::GetDtorOnly ( )
staticinherited

Return destructor only flag.

Definition at line 1196 of file TObject.cxx.

◆ GetEffectiveEntries()

virtual Double_t TH1::GetEffectiveEntries ( ) const
virtualinherited

◆ GetEntries()

virtual Double_t TH1::GetEntries ( ) const
virtualinherited

◆ GetErrorOption()

Option_t * TProfile::GetErrorOption ( ) const

Return option to compute profile errors.

Definition at line 923 of file TProfile.cxx.

◆ GetFillColor()

virtual Color_t TAttFill::GetFillColor ( ) const
inlinevirtualinherited

Return the fill area color.

Reimplemented in TGraphMultiErrors, TGWin32, TGWin32VirtualXProxy, and TGX11.

Definition at line 32 of file TAttFill.h.

◆ GetFillStyle()

virtual Style_t TAttFill::GetFillStyle ( ) const
inlinevirtualinherited

Return the fill area style.

Reimplemented in TGraphMultiErrors, TGWin32, TGWin32VirtualXProxy, and TGX11.

Definition at line 33 of file TAttFill.h.

◆ GetFunction()

virtual TF1 * TH1::GetFunction ( const char * name) const
virtualinherited

◆ GetIconName()

const char * TObject::GetIconName ( ) const
virtualinherited

Returns mime type name of object.

Used by the TBrowser (via TGMimeTypes class). Override for class of which you would like to have different icons for objects of the same class.

Reimplemented in ROOT::Experimental::XRooFit::xRooNode, TASImage, TBranch, TBranchElement, TGeoVolume, TGMainFrame, TKey, TMethodBrowsable, TSystemFile, and TVirtualBranchBrowsable.

Definition at line 472 of file TObject.cxx.

◆ GetIntegral()

virtual Double_t * TH1::GetIntegral ( )
virtualinherited

◆ GetKurtosis()

virtual Double_t TH1::GetKurtosis ( Int_t axis = 1) const
virtualinherited

◆ GetLabelColor()

Color_t TH1::GetLabelColor ( Option_t * axis = "X") const
virtualinherited

Return the "axis" label color.

Definition at line 53 of file Haxis.cxx.

◆ GetLabelFont()

Style_t TH1::GetLabelFont ( Option_t * axis = "X") const
virtualinherited

Return the "axis" label font.

Definition at line 66 of file Haxis.cxx.

◆ GetLabelOffset()

Float_t TH1::GetLabelOffset ( Option_t * axis = "X") const
virtualinherited

Return the "axis" label offset.

Definition at line 79 of file Haxis.cxx.

◆ GetLabelSize()

Float_t TH1::GetLabelSize ( Option_t * axis = "X") const
virtualinherited

Return the "axis" label size.

Definition at line 92 of file Haxis.cxx.

◆ GetLineColor()

virtual Color_t TAttLine::GetLineColor ( ) const
inlinevirtualinherited

Return the line color.

Reimplemented in TGraphMultiErrors, and TGWin32VirtualXProxy.

Definition at line 36 of file TAttLine.h.

◆ GetLineStyle()

virtual Style_t TAttLine::GetLineStyle ( ) const
inlinevirtualinherited

Return the line style.

Reimplemented in TGraphMultiErrors, TGWin32, TGWin32VirtualXProxy, and TGX11.

Definition at line 37 of file TAttLine.h.

◆ GetLineWidth()

virtual Width_t TAttLine::GetLineWidth ( ) const
inlinevirtualinherited

Return the line width.

Reimplemented in TGraphMultiErrors, TGWin32, TGWin32VirtualXProxy, and TGX11.

Definition at line 38 of file TAttLine.h.

◆ GetListOfFunctions()

TList * TH1::GetListOfFunctions ( ) const
inlineinherited

Definition at line 488 of file TH1.h.

◆ GetLowEdge()

virtual void TH1::GetLowEdge ( Double_t * edge) const
virtualinherited

◆ GetMarkerColor()

virtual Color_t TAttMarker::GetMarkerColor ( ) const
inlinevirtualinherited

Return the marker color.

Reimplemented in TGWin32VirtualXProxy.

Definition at line 33 of file TAttMarker.h.

◆ GetMarkerLineWidth()

Width_t TAttMarker::GetMarkerLineWidth ( Style_t style)
staticinherited

◆ GetMarkerSize()

virtual Size_t TAttMarker::GetMarkerSize ( ) const
inlinevirtualinherited

Return the marker size.

Reimplemented in TGWin32VirtualXProxy.

Definition at line 35 of file TAttMarker.h.

◆ GetMarkerStyle()

virtual Style_t TAttMarker::GetMarkerStyle ( ) const
inlinevirtualinherited

Return the marker style.

Reimplemented in TGWin32VirtualXProxy.

Definition at line 34 of file TAttMarker.h.

◆ GetMarkerStyleBase()

Style_t TAttMarker::GetMarkerStyleBase ( Style_t style)
staticinherited

◆ GetMaximum()

virtual Double_t TH1::GetMaximum ( Double_t maxval = FLT_MAX) const
virtualinherited

Reimplemented in TH2Poly.

◆ GetMaximumBin() [1/2]

virtual Int_t TH1::GetMaximumBin ( ) const
virtualinherited

◆ GetMaximumBin() [2/2]

virtual Int_t TH1::GetMaximumBin ( Int_t & locmax,
Int_t & locmay,
Int_t & locmaz ) const
virtualinherited

◆ GetMaximumStored()

virtual Double_t TH1::GetMaximumStored ( ) const
inlinevirtualinherited

Definition at line 533 of file TH1.h.

◆ GetMean()

virtual Double_t TH1::GetMean ( Int_t axis = 1) const
virtualinherited

◆ GetMeanError()

virtual Double_t TH1::GetMeanError ( Int_t axis = 1) const
virtualinherited

◆ GetMinimum()

virtual Double_t TH1::GetMinimum ( Double_t minval = -FLT_MAX) const
virtualinherited

Reimplemented in TH2Poly.

◆ GetMinimumAndMaximum()

virtual void TH1::GetMinimumAndMaximum ( Double_t & min,
Double_t & max ) const
virtualinherited

◆ GetMinimumBin() [1/2]

virtual Int_t TH1::GetMinimumBin ( ) const
virtualinherited

◆ GetMinimumBin() [2/2]

virtual Int_t TH1::GetMinimumBin ( Int_t & locmix,
Int_t & locmiy,
Int_t & locmiz ) const
virtualinherited

◆ GetMinimumStored()

virtual Double_t TH1::GetMinimumStored ( ) const
inlinevirtualinherited

Definition at line 537 of file TH1.h.

◆ GetName()

const char * TNamed::GetName ( ) const
inlineoverridevirtualinherited

Returns name of object.

This default method returns the class name. Classes that give objects a name should override this method.

Reimplemented from TObject.

Definition at line 49 of file TNamed.h.

◆ GetNbinsX()

virtual Int_t TH1::GetNbinsX ( ) const
inlinevirtualinherited

Definition at line 541 of file TH1.h.

◆ GetNbinsY()

virtual Int_t TH1::GetNbinsY ( ) const
inlinevirtualinherited

Definition at line 542 of file TH1.h.

◆ GetNbinsZ()

virtual Int_t TH1::GetNbinsZ ( ) const
inlinevirtualinherited

Definition at line 543 of file TH1.h.

◆ GetNcells()

virtual Int_t TH1::GetNcells ( ) const
inlinevirtualinherited

Definition at line 544 of file TH1.h.

◆ GetNdivisions()

Int_t TH1::GetNdivisions ( Option_t * axis = "X") const
virtualinherited

Return the number of divisions for "axis".

Definition at line 27 of file Haxis.cxx.

◆ GetNormFactor()

virtual Double_t TH1::GetNormFactor ( ) const
inlinevirtualinherited

Definition at line 545 of file TH1.h.

◆ GetObjectInfo()

char * TH1::GetObjectInfo ( Int_t px,
Int_t py ) const
overridevirtualinherited

Returns string containing info about the object at position (px,py).

This method is typically overridden by classes of which the objects can report peculiarities for different positions. Returned string will be re-used (lock in MT environment).

Reimplemented from TObject.

◆ GetObjectStat()

Bool_t TObject::GetObjectStat ( )
staticinherited

Get status of object stat flag.

Definition at line 1181 of file TObject.cxx.

◆ GetOption()

Option_t * TH1::GetOption ( ) const
inlineoverridevirtualinherited

Reimplemented from TObject.

Definition at line 547 of file TH1.h.

◆ GetPainter()

TVirtualHistPainter * TH1::GetPainter ( Option_t * option = "")
inherited

◆ GetQuantiles()

virtual Int_t TH1::GetQuantiles ( Int_t n,
Double_t * xp,
const Double_t * p = nullptr )
virtualinherited

◆ GetRandom()

virtual Double_t TH1::GetRandom ( TRandom * rng = nullptr,
Option_t * option = "" ) const
virtualinherited

◆ GetRMS()

Double_t TH1::GetRMS ( Int_t axis = 1) const
inlineinherited

This function returns the Standard Deviation (Sigma) of the distribution not the Root Mean Square (RMS).

The name "RMS" is been often used as a synonym for the Standard Deviation and it was introduced many years ago (Hbook/PAW times). We keep the name GetRMS for continuity as an alias to GetStdDev. GetStdDev() should be used instead.

Definition at line 566 of file TH1.h.

◆ GetRMSError()

Double_t TH1::GetRMSError ( Int_t axis = 1) const
inlineinherited

Definition at line 567 of file TH1.h.

◆ GetSize()

Int_t TArray::GetSize ( ) const
inlineinherited

Definition at line 47 of file TArray.h.

◆ GetSkewness()

virtual Double_t TH1::GetSkewness ( Int_t axis = 1) const
virtualinherited

◆ GetStatOverflows()

EStatOverflows TH1::GetStatOverflows ( ) const
inlineinherited

Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more information.

Definition at line 570 of file TH1.h.

◆ GetStatOverflowsBehaviour()

Bool_t TH1::GetStatOverflowsBehaviour ( ) const
inlineprotectedinherited

Definition at line 391 of file TH1.h.

◆ GetStats()

void TProfile::GetStats ( Double_t * stats) const
overridevirtual

fill the array stats from the contents of this profile.

The array stats must be correctly dimensioned in the calling program.

  • stats[0] = sumw
  • stats[1] = sumw2
  • stats[2] = sumwx
  • stats[3] = sumwx2
  • stats[4] = sumwy
  • stats[5] = sumwy2

If no axis-subrange is specified (via TAxis::SetRange), the array stats is simply a copy of the statistics quantities computed at filling time. If a sub-range is specified, the function recomputes these quantities from the bin contents in the current axis range.

Reimplemented from TH1.

Definition at line 948 of file TProfile.cxx.

◆ GetStdDev()

virtual Double_t TH1::GetStdDev ( Int_t axis = 1) const
virtualinherited

◆ GetStdDevError()

virtual Double_t TH1::GetStdDevError ( Int_t axis = 1) const
virtualinherited

◆ GetSum()

Stat_t TArrayD::GetSum ( ) const
inlineinherited

Definition at line 46 of file TArrayD.h.

◆ GetSumOfAllWeights()

Double_t TH1::GetSumOfAllWeights ( const bool includeOverflow,
Double_t * sumWeightSquare = nullptr ) const
inherited

◆ GetSumOfWeights()

virtual Double_t TH1::GetSumOfWeights ( ) const
inlinevirtualinherited

Return the sum of weights across all bins excluding under/overflows.

See also
TH1::GetSumOfAllWeights()

Definition at line 559 of file TH1.h.

◆ GetSumw2() [1/2]

virtual TArrayD * TH1::GetSumw2 ( )
inlinevirtualinherited

Definition at line 560 of file TH1.h.

◆ GetSumw2() [2/2]

virtual const TArrayD * TH1::GetSumw2 ( ) const
inlinevirtualinherited

Definition at line 561 of file TH1.h.

◆ GetSumw2N()

virtual Int_t TH1::GetSumw2N ( ) const
inlinevirtualinherited

Definition at line 562 of file TH1.h.

◆ GetTickLength()

Float_t TH1::GetTickLength ( Option_t * axis = "X") const
virtualinherited

Return the "axis" tick length.

Definition at line 105 of file Haxis.cxx.

◆ GetTitle()

const char * TNamed::GetTitle ( ) const
inlineoverridevirtualinherited

Returns title of object.

This default method returns the class title (i.e. description). Classes that give objects a title should override this method.

Reimplemented from TObject.

Definition at line 50 of file TNamed.h.

◆ GetTitleFont()

Style_t TH1::GetTitleFont ( Option_t * axis = "X") const
virtualinherited

Return the "axis" title font.

Definition at line 118 of file Haxis.cxx.

◆ GetTitleOffset()

Float_t TH1::GetTitleOffset ( Option_t * axis = "X") const
virtualinherited

Return the "axis" title offset.

Definition at line 131 of file Haxis.cxx.

◆ GetTitleSize()

Float_t TH1::GetTitleSize ( Option_t * axis = "X") const
virtualinherited

Return the "axis" title size.

Definition at line 144 of file Haxis.cxx.

◆ GetUniqueID()

UInt_t TObject::GetUniqueID ( ) const
virtualinherited

Return the unique object id.

Definition at line 480 of file TObject.cxx.

◆ GetW()

Double_t * TProfile::GetW ( )
inlineprivate

Definition at line 66 of file TProfile.h.

◆ GetW2()

Double_t * TProfile::GetW2 ( )
inlineprivate

Definition at line 67 of file TProfile.h.

◆ GetXaxis() [1/2]

TAxis * TH1::GetXaxis ( )
inlineinherited

Definition at line 571 of file TH1.h.

◆ GetXaxis() [2/2]

const TAxis * TH1::GetXaxis ( ) const
inlineinherited

Definition at line 574 of file TH1.h.

◆ GetYaxis() [1/2]

TAxis * TH1::GetYaxis ( )
inlineinherited

Definition at line 572 of file TH1.h.

◆ GetYaxis() [2/2]

const TAxis * TH1::GetYaxis ( ) const
inlineinherited

Definition at line 575 of file TH1.h.

◆ GetYmax()

virtual Double_t TProfile::GetYmax ( ) const
inlinevirtual

Definition at line 117 of file TProfile.h.

◆ GetYmin()

virtual Double_t TProfile::GetYmin ( ) const
inlinevirtual

Definition at line 116 of file TProfile.h.

◆ GetZaxis() [1/2]

TAxis * TH1::GetZaxis ( )
inlineinherited

Definition at line 573 of file TH1.h.

◆ GetZaxis() [2/2]

const TAxis * TH1::GetZaxis ( ) const
inlineinherited

Definition at line 576 of file TH1.h.

◆ HandleTimer()

Bool_t TObject::HandleTimer ( TTimer * timer)
virtualinherited

Execute action in response of a timer timing out.

This method must be overridden if an object has to react to timers.

Reimplemented in TGCommandPlugin, TGDNDManager, TGFileContainer, TGHtml, TGLEventHandler, TGPopupMenu, TGraphTime, TGScrollBar, TGShutter, TGTextEdit, TGTextEditor, TGTextEntry, TGTextView, TGToolTip, TGuiBldDragManager, TGWindow, and TTreeViewer.

Definition at line 516 of file TObject.cxx.

◆ Hash()

ULong_t TNamed::Hash ( ) const
inlineoverridevirtualinherited

Return hash value for this object.

Note: If this routine is overloaded in a derived class, this derived class should also add

void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
Definition TROOT.h:406

Otherwise, when RecursiveRemove is called (by ~TObject or example) for this type of object, the transversal of THashList and THashTable containers will will have to be done without call Hash (and hence be linear rather than logarithmic complexity). You will also see warnings like

Error in <ROOT::Internal::TCheckHashRecursiveRemoveConsistency::CheckRecursiveRemove>: The class SomeName overrides
TObject::Hash but does not call TROOT::RecursiveRemove in its destructor.
ULong_t Hash() const override
Return hash value for this object.
Definition TNamed.h:51
Mother of all ROOT objects.
Definition TObject.h:42
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1098
void RecursiveRemove(TObject *obj) override
Recursively remove this object from the list of Cleanups.
Definition TROOT.cxx:2651

Reimplemented from TObject.

Definition at line 51 of file TNamed.h.

◆ HasInconsistentHash()

Bool_t TObject::HasInconsistentHash ( ) const
inlineinherited

Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.

missing call to RecursiveRemove in destructor).

Note: Since the consistency is only tested for during inserts, this routine will return true for object that have never been inserted whether or not they have a consistent setup. This has no negative side-effect as searching for the object with the right or wrong Hash will always yield a not-found answer (Since anyway no hash can be guaranteed unique, there is always a check)

Definition at line 366 of file TObject.h.

◆ Info()

void TObject::Info ( const char * location,
const char * fmt,
... ) const
virtualinherited

Issue info message.

Use "location" to specify the method where the warning occurred. Accepts standard printf formatting arguments.

Definition at line 1072 of file TObject.cxx.

◆ InheritsFrom() [1/2]

Bool_t TObject::InheritsFrom ( const char * classname) const
virtualinherited

Returns kTRUE if object inherits from class "classname".

Reimplemented in TClass.

Definition at line 549 of file TObject.cxx.

◆ InheritsFrom() [2/2]

Bool_t TObject::InheritsFrom ( const TClass * cl) const
virtualinherited

Returns kTRUE if object inherits from TClass cl.

Reimplemented in TClass.

Definition at line 557 of file TObject.cxx.

◆ Inspect()

void TObject::Inspect ( ) const
virtualinherited

Dump contents of this object in a graphics canvas.

Same action as Dump but in a graphical form. In addition pointers to other objects can be followed.

The following picture is the Inspect of a histogram object:

Reimplemented in ROOT::Experimental::XRooFit::xRooNode, TGFrame, TInspectorObject, and TSystemFile.

Definition at line 570 of file TObject.cxx.

◆ Integral() [1/2]

virtual Double_t TH1::Integral ( Int_t binx1,
Int_t binx2,
Option_t * option = "" ) const
virtualinherited

Reimplemented in TH2, and TH3.

◆ Integral() [2/2]

virtual Double_t TH1::Integral ( Option_t * option = "") const
virtualinherited

Reimplemented in TH2, TH2Poly, and TH3.

◆ IntegralAndError()

virtual Double_t TH1::IntegralAndError ( Int_t binx1,
Int_t binx2,
Double_t & err,
Option_t * option = "" ) const
virtualinherited

Reimplemented in TH2, and TH3.

◆ Interpolate() [1/3]

virtual Double_t TH1::Interpolate ( Double_t x) const
virtualinherited

Reimplemented in TH2, TH2Poly, and TH3.

◆ Interpolate() [2/3]

virtual Double_t TH1::Interpolate ( Double_t x,
Double_t y ) const
virtualinherited

Reimplemented in TH2, TH2Poly, and TH3.

◆ Interpolate() [3/3]

virtual Double_t TH1::Interpolate ( Double_t x,
Double_t y,
Double_t z ) const
virtualinherited

Reimplemented in TH2, TH2Poly, and TH3.

◆ InvertBit()

void TObject::InvertBit ( UInt_t f)
inlineinherited

Definition at line 206 of file TObject.h.

◆ IsA()

TClass * TProfile::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TH1D.

Definition at line 139 of file TProfile.h.

◆ IsBinOverflow()

Bool_t TH1::IsBinOverflow ( Int_t bin,
Int_t axis = 0 ) const
inherited

◆ IsBinUnderflow()

Bool_t TH1::IsBinUnderflow ( Int_t bin,
Int_t axis = 0 ) const
inherited

◆ IsDestructed()

Bool_t TObject::IsDestructed ( ) const
inlineinherited

IsDestructed.

Note
This function must be non-virtual as it can be used on destructed (but not yet modified) memory. This is used for example in TClonesArray to record the element that have been destructed but not deleted and thus are ready for re-use (by operator new with placement).
Returns
true if this object's destructor has been run.

Definition at line 186 of file TObject.h.

◆ IsEmpty()

Bool_t TH1::IsEmpty ( ) const
protectedinherited

◆ IsEqual()

Bool_t TObject::IsEqual ( const TObject * obj) const
virtualinherited

Default equal comparison (objects are equal if they have the same address in memory).

More complicated classes might want to override this function.

Reimplemented in TGObject, TObjString, TPair, and TQCommand.

Definition at line 589 of file TObject.cxx.

◆ IsFolder()

◆ IsHighlight()

virtual Bool_t TH1::IsHighlight ( ) const
inlinevirtualinherited

Definition at line 585 of file TH1.h.

◆ IsOnHeap()

Bool_t TObject::IsOnHeap ( ) const
inlineinherited

Definition at line 160 of file TObject.h.

◆ IsSortable()

Bool_t TNamed::IsSortable ( ) const
inlineoverridevirtualinherited

Reimplemented from TObject.

Reimplemented in TStructNodeProperty.

Definition at line 52 of file TNamed.h.

◆ IsTransparent()

Bool_t TAttFill::IsTransparent ( ) const
inlinevirtualinherited

Reimplemented in TGWin32VirtualXProxy.

Definition at line 49 of file TAttFill.h.

◆ IsZombie()

Bool_t TObject::IsZombie ( ) const
inlineinherited

Definition at line 161 of file TObject.h.

◆ KolmogorovTest()

virtual Double_t TH1::KolmogorovTest ( const TH1 * h2,
Option_t * option = "" ) const
virtualinherited

Reimplemented in TH2, and TH3.

◆ LabelsDeflate()

void TProfile::LabelsDeflate ( Option_t * axis = "X")
overridevirtual

Reduce the number of bins for this axis to the number of bins having a label.

Reimplemented from TH1.

Definition at line 1000 of file TProfile.cxx.

◆ LabelsInflate()

void TProfile::LabelsInflate ( Option_t * options = "X")
overridevirtual

Double the number of bins for axis.

Refill histogram This function is called by TAxis::FindBin(const char *label)

Reimplemented from TH1.

Definition at line 1010 of file TProfile.cxx.

◆ LabelsOption()

void TProfile::LabelsOption ( Option_t * option = "h",
Option_t * axis = "X" )
overridevirtual

Set option(s) to draw axis with labels.

option might have the following values:

  • "a" sort by alphabetic order
  • ">" sort by decreasing values
  • "<" sort by increasing values
  • "h" draw labels horizontal
  • "v" draw labels vertical
  • "u" draw labels up (end of label right adjusted)
  • "d" draw labels down (start of label left adjusted)

Reimplemented from TH1.

Definition at line 1028 of file TProfile.cxx.

◆ LoggedInconsistency()

int TH1::LoggedInconsistency ( const char * name,
const TH1 * h1,
const TH1 * h2,
bool useMerge = false ) const
protectedinherited

Definition at line 893 of file TH1.cxx.

◆ ls()

void TNamed::ls ( Option_t * option = "") const
overridevirtualinherited

List TNamed name and title.

Reimplemented from TObject.

Reimplemented in ROOT::Experimental::XRooFit::xRooBrowser, TNode, TROOT, TStreamerBase, TStreamerElement, TStreamerInfo, TStreamerSTL, TTask, TText, and TVirtualStreamerInfo.

Definition at line 112 of file TNamed.cxx.

◆ MakeZombie()

void TObject::MakeZombie ( )
inlineprotectedinherited

Definition at line 55 of file TObject.h.

◆ MayNotUse()

void TObject::MayNotUse ( const char * method) const
inherited

Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).

Definition at line 1160 of file TObject.cxx.

◆ Merge() [1/2]

Long64_t TH1::Merge ( TCollection * list,
Option_t * option )
inherited

◆ Merge() [2/2]

Long64_t TProfile::Merge ( TCollection * li)
overridevirtual

Merge all histograms in the collection in this histogram.

This function computes the min/max for the x axis, compute a new number of bins, if necessary, add bin contents, errors and statistics. If overflows are present and limits are different the function will fail. The function returns the total number of entries in the result histogram if the merge is successful, -1 otherwise.

IMPORTANT remark. The axis x may have different number of bins and different limits, BUT the largest bin width must be a multiple of the smallest bin width and the upper limit must also be a multiple of the bin width.

Reimplemented from TH1.

Definition at line 1219 of file TProfile.cxx.

◆ Modify() [1/3]

virtual void TAttFill::Modify ( )
virtualinherited

◆ Modify() [2/3]

virtual void TAttLine::Modify ( )
virtualinherited

◆ Modify() [3/3]

virtual void TAttMarker::Modify ( )
virtualinherited

◆ ModifyOn() [1/3]

virtual void TAttFill::ModifyOn ( TVirtualPad & pad)
virtualinherited

◆ ModifyOn() [2/3]

virtual void TAttLine::ModifyOn ( TVirtualPad & pad)
virtualinherited

◆ ModifyOn() [3/3]

virtual void TAttMarker::ModifyOn ( TVirtualPad & pad)
virtualinherited

◆ Multiply() [1/3]

Bool_t TProfile::Multiply ( const TH1 * h1)
overridevirtual

Multiply this profile by h1.

this = this*h1

Reimplemented from TH1.

Definition at line 1271 of file TProfile.cxx.

◆ Multiply() [2/3]

Bool_t TProfile::Multiply ( const TH1 * h1,
const TH1 * h2,
Double_t c1 = 1,
Double_t c2 = 1,
Option_t * option = "" )
overridevirtual

Replace contents of this profile by multiplication of h1 by h2.

this = (c1*h1)*(c2*h2)

Reimplemented from TH1.

Definition at line 1283 of file TProfile.cxx.

◆ Multiply() [3/3]

Bool_t TProfile::Multiply ( TF1 * f1,
Double_t c1 = 1 )
overridevirtual

Performs the operation: this = this*c1*f1.

The function return kFALSE if the Multiply operation failed

Reimplemented from TH1.

Definition at line 1229 of file TProfile.cxx.

◆ Normalize()

virtual void TH1::Normalize ( Option_t * option = "")
virtualinherited

◆ Notify()

Bool_t TObject::Notify ( )
virtualinherited

This method must be overridden to handle object notification (the base implementation is no-op).

Different objects in ROOT use the Notify method for different purposes, in coordination with other objects that call this method at the appropriate time.

For example, TLeaf uses it to load class information; TBranchRef to load contents of referenced branches TBranchRef; most notably, based on Notify, TChain implements a callback mechanism to inform interested parties when it switches to a new sub-tree.

Reimplemented in h1analysis, h1analysisTreeReader, TARInterruptHandler, TASInputHandler, TASInterruptHandler, TASLogHandler, TASSigPipeHandler, TBlinkTimer, TBranchElement, TBranchRef, TBreakLineCom, TBrowserTimer, TCollection, TDelCharCom, TDelTextCom, TFileHandler, TGContainerKeyboardTimer, TGContainerScrollTimer, TGInputHandler, TGLRedrawTimer, TGTextEditHist, TGuiBldDragManagerRepeatTimer, TIdleTimer, TInsCharCom, TInsTextCom, TInterruptHandler, TLeafObject, TMessageHandler, TNotifyLink< Type >, TNotifyLink< RNoCleanupNotifierHelper >, TNotifyLink< ROOT::Detail::TBranchProxy >, TNotifyLink< TTreeReader >, TPopupDelayTimer, TProcessEventTimer, TRefTable, TRepeatTimer, TSBRepeatTimer, TSelector, TSelectorDraw, TSelectorEntries, TSignalHandler, TSingleShotCleaner, TSocketHandler, TStdExceptionHandler, TSysEvtHandler, TTermInputHandler, TThreadTimer, TTimeOutTimer, TTimer, TTipDelayTimer, TTree, TTreeFormula, TTreeFormulaManager, TTreeReader, TViewTimer, and TViewUpdateTimer.

Definition at line 618 of file TObject.cxx.

◆ Obsolete()

void TObject::Obsolete ( const char * method,
const char * asOfVers,
const char * removedFromVers ) const
inherited

Use this method to declare a method obsolete.

Specify as of which version the method is obsolete and as from which version it will be removed.

Definition at line 1169 of file TObject.cxx.

◆ operator delete() [1/3]

void TObject::operator delete ( void * ptr,
size_t size )
inherited

Operator delete for sized deallocation.

Definition at line 1234 of file TObject.cxx.

◆ operator delete() [2/3]

void TObject::operator delete ( void * ptr)
inherited

Operator delete.

Definition at line 1212 of file TObject.cxx.

◆ operator delete() [3/3]

void TObject::operator delete ( void * ptr,
void * vp )
inherited

Only called by placement new when throwing an exception.

Definition at line 1266 of file TObject.cxx.

◆ operator delete[]() [1/3]

void TObject::operator delete[] ( void * ptr,
size_t size )
inherited

Operator delete [] for sized deallocation.

Definition at line 1245 of file TObject.cxx.

◆ operator delete[]() [2/3]

void TObject::operator delete[] ( void * ptr)
inherited

Operator delete [].

Definition at line 1223 of file TObject.cxx.

◆ operator delete[]() [3/3]

void TObject::operator delete[] ( void * ptr,
void * vp )
inherited

Only called by placement new[] when throwing an exception.

Definition at line 1274 of file TObject.cxx.

◆ operator new() [1/2]

void * TObject::operator new ( size_t sz)
inlineinherited

Definition at line 189 of file TObject.h.

◆ operator new() [2/2]

void * TObject::operator new ( size_t sz,
void * vp )
inlineinherited

Definition at line 191 of file TObject.h.

◆ operator new[]() [1/2]

void * TObject::operator new[] ( size_t sz)
inlineinherited

Definition at line 190 of file TObject.h.

◆ operator new[]() [2/2]

void * TObject::operator new[] ( size_t sz,
void * vp )
inlineinherited

Definition at line 192 of file TObject.h.

◆ operator=()

TProfile & TProfile::operator= ( const TProfile & profile)

Definition at line 248 of file TProfile.cxx.

◆ operator[]() [1/2]

Double_t & TArrayD::operator[] ( Int_t i)
inlineinherited

Definition at line 85 of file TArrayD.h.

◆ operator[]() [2/2]

Double_t TArrayD::operator[] ( Int_t i) const
inlineinherited

Definition at line 92 of file TArrayD.h.

◆ OutOfBoundsError()

Bool_t TArray::OutOfBoundsError ( const char * where,
Int_t i ) const
protectedinherited

Generate an out-of-bounds error. Always returns false.

Definition at line 29 of file TArray.cxx.

◆ Paint()

void TH1::Paint ( Option_t * option = "")
overridevirtualinherited

This method must be overridden if a class wants to paint itself.

The difference between Paint() and Draw() is that when a object draws itself it is added to the display list of the pad in which it is drawn (and automatically redrawn whenever the pad is redrawn). While paint just draws the object without adding it to the pad display list.

Reimplemented from TObject.

◆ Pop()

void TObject::Pop ( )
virtualinherited

Pop on object drawn in a pad to the top of the display list.

I.e. it will be drawn last and on top of all other primitives.

Reimplemented in TFrame, TPad, and TVirtualPad.

Definition at line 640 of file TObject.cxx.

◆ Print()

void TH1::Print ( Option_t * option = "") const
overridevirtualinherited

This method must be overridden when a class wants to print itself.

Reimplemented from TObject.

◆ ProjectionX()

TH1D * TProfile::ProjectionX ( const char * name = "_px",
Option_t * option = "e" ) const

Project this profile into a 1-D histogram along X.

The projection is always of the type TH1D.

  • if option "E" is specified the errors of the projected histogram are computed and set to be equal to the errors of the profile. Option "E" is defined as the default one in the header file.
  • if option "" is specified the histogram errors are simply the sqrt of its content
  • if option "B" is specified, the content of bin of the returned histogram will be equal to the GetBinEntries(bin) of the profile, otherwise (default) it will be equal to GetBinContent(bin)
  • if option "C=E" the bin contents of the projection are set to the bin errors of the profile
  • if option "W" is specified the bin content of the projected histogram is set to the product of the bin content of the profile and the entries. With this option the returned histogram will be equivalent to the one obtained by filling directly a TH1D using the 2-nd value as a weight. This makes sense only for profile filled with weights =1. If not, the error of the projected histogram obtained with this option will not be correct.
  • option "width" does not exist for this method. If needed, call TH1::Normalize on the result.

Definition at line 1311 of file TProfile.cxx.

◆ ProvideSaveName()

TString TH1::ProvideSaveName ( Option_t * option,
Bool_t testfdir = kFALSE )
protectedinherited

◆ PutStats()

void TProfile::PutStats ( Double_t * stats)
overridevirtual

Replace current statistics with the values in array stats.

Reimplemented from TH1.

Definition at line 1386 of file TProfile.cxx.

◆ Read()

Int_t TObject::Read ( const char * name)
virtualinherited

Read contents of object with specified name from the current directory.

First the key with the given name is searched in the current directory, next the key buffer is deserialized into the object. The object must have been created before via the default constructor. See TObject::Write().

Reimplemented in TBuffer, TKey, TKeySQL, and TKeyXML.

Definition at line 673 of file TObject.cxx.

◆ ReadArray()

TArray * TArray::ReadArray ( TBuffer & b,
const TClass * clReq )
staticinherited

Read TArray object from buffer.

Simplified version of TBuffer::ReadObject (does not keep track of multiple references to same array).

Definition at line 40 of file TArray.cxx.

◆ Rebin()

TH1 * TProfile::Rebin ( Int_t ngroup = 2,
const char * newname = "",
const Double_t * xbins = nullptr )
overridevirtual

Rebin this profile grouping ngroup bins together.

case 1 xbins=0

if newname is not blank a new temporary profile hnew is created. else the current profile is modified (default) The parameter ngroup indicates how many bins of this have to me merged into one bin of hnew If the original profile has errors stored (via Sumw2), the resulting profile has new errors correctly calculated.

examples: if hp is an existing TProfile histogram with 100 bins

hp->Rebin(); //merges two bins in one in hp: previous contents of hp are lost
hp->Rebin(5); //merges five bins in one in hp
TProfile *hnew = hp->Rebin(5,"hnew"); // creates a new profile hnew
//merging 5 bins of hp in one bin

NOTE: If ngroup is not an exact divider of the number of bins, the top limit of the rebinned profile is changed to the upper edge of the bin=newbins*ngroup and the corresponding bins are added to the overflow bin. Statistics will be recomputed from the new bin contents.

case 2 xbins!=0

a new profile is created (you should specify newname). The parameter ngroup is the number of variable size bins in the created profile The array xbins must contain ngroup+1 elements that represent the low-edge of the bins. The data of the old bins are added to the new bin which contains the bin center of the old bins. It is possible that information from the old binning are attached to the under-/overflow bins of the new binning.

examples: if hp is an existing TProfile with 100 bins

Double_t xbins[25] = {...} array of low-edges (xbins[25] is the upper edge of last bin
hp->Rebin(24,"hpnew",xbins); //creates a new variable bin size profile hpnew
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73

Reimplemented from TH1.

Definition at line 1438 of file TProfile.cxx.

◆ RebinAxis()

virtual void TH1::RebinAxis ( Double_t x,
TAxis * axis )
inlinevirtualinherited

Definition at line 686 of file TH1.h.

◆ RebinX()

virtual TH1 * TH1::RebinX ( Int_t ngroup = 2,
const char * newname = "" )
inlinevirtualinherited

Reimplemented in TH2, TH3, and TProfile2D.

Definition at line 602 of file TH1.h.

◆ Rebuild()

virtual void TH1::Rebuild ( Option_t * option = "")
virtualinherited

◆ RecomputeAxisLimits()

Bool_t TH1::RecomputeAxisLimits ( TAxis & destAxis,
const TAxis & anAxis )
staticprotectedinherited

◆ RecursiveRemove()

void TH1::RecursiveRemove ( TObject * obj)
overridevirtualinherited

Recursively remove this object from a list.

Typically implemented by classes that can contain multiple references to a same object.

Reimplemented from TObject.

◆ Reset() [1/3]

void TArrayD::Reset ( )
inlineinherited

Definition at line 47 of file TArrayD.h.

◆ Reset() [2/3]

void TArrayD::Reset ( Double_t val)
inlineinherited

Definition at line 48 of file TArrayD.h.

◆ Reset() [3/3]

void TProfile::Reset ( Option_t * option = "")
overridevirtual

Reset contents of a Profile histogram.

Reimplemented from TH1D.

Definition at line 1625 of file TProfile.cxx.

◆ ResetAttFill()

virtual void TAttFill::ResetAttFill ( Option_t * option = "")
virtualinherited

Reimplemented in TGWin32VirtualXProxy.

◆ ResetAttLine()

virtual void TAttLine::ResetAttLine ( Option_t * option = "")
virtualinherited

Reimplemented in TGWin32VirtualXProxy.

◆ ResetAttMarker()

virtual void TAttMarker::ResetAttMarker ( Option_t * toption = "")
virtualinherited

Reimplemented in TGWin32VirtualXProxy.

◆ ResetBit()

void TObject::ResetBit ( UInt_t f)
inlineinherited

Definition at line 203 of file TObject.h.

◆ ResetStats()

virtual void TH1::ResetStats ( )
virtualinherited

◆ RetrieveBinContent()

Double_t TProfile::RetrieveBinContent ( Int_t bin) const
inlineoverrideprotectedvirtual

Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::GetBin.

Reimplemented from TH1D.

Definition at line 57 of file TProfile.h.

◆ SameLimitsAndNBins()

Bool_t TH1::SameLimitsAndNBins ( const TAxis & axis1,
const TAxis & axis2 )
staticprotectedinherited

◆ SaveAs()

void TH1::SaveAs ( const char * filename = "hist",
Option_t * option = "" ) const
overridevirtualinherited

Save this object in the file specified by filename.

  • if "filename" contains ".root" the object is saved in filename as root binary file.
  • if "filename" contains ".xml" the object is saved in filename as a xml ascii file.
  • if "filename" contains ".cc" the object is saved in filename as C code independent from ROOT. The code is generated via SavePrimitive(). Specific code should be implemented in each object to handle this option. Like in TF1::SavePrimitive().
  • otherwise the object is written to filename as a CINT/C++ script. The C++ code to rebuild this object is generated via SavePrimitive(). The "option" parameter is passed to SavePrimitive. By default it is an empty string. It can be used to specify the Draw option in the code generated by SavePrimitive.

    The function is available via the object context menu.

Reimplemented from TObject.

◆ SaveFillAttributes()

virtual void TAttFill::SaveFillAttributes ( std::ostream & out,
const char * name,
Int_t coldef = 1,
Int_t stydef = 1001 )
virtualinherited

◆ SaveLineAttributes()

virtual void TAttLine::SaveLineAttributes ( std::ostream & out,
const char * name,
Int_t coldef = 1,
Int_t stydef = 1,
Int_t widdef = 1 )
virtualinherited

◆ SaveMarkerAttributes()

virtual void TAttMarker::SaveMarkerAttributes ( std::ostream & out,
const char * name,
Int_t coldef = 1,
Int_t stydef = 1,
Int_t sizdef = 1 )
virtualinherited

◆ SavePrimitive()

void TProfile::SavePrimitive ( std::ostream & out,
Option_t * option = "" )
overridevirtual

Save primitive as a C++ statement(s) on output stream out.

Reimplemented from TH1.

Definition at line 1640 of file TProfile.cxx.

◆ SavePrimitiveConstructor()

void TObject::SavePrimitiveConstructor ( std::ostream & out,
TClass * cl,
const char * variable_name,
const char * constructor_agrs = "",
Bool_t empty_line = kTRUE )
staticprotectedinherited

Save object constructor in the output stream "out".

Can be used as first statement when implementing SavePrimitive() method for the object

Definition at line 777 of file TObject.cxx.

◆ SavePrimitiveDraw()

void TObject::SavePrimitiveDraw ( std::ostream & out,
const char * variable_name,
Option_t * option = nullptr )
staticprotectedinherited

Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.

Definition at line 845 of file TObject.cxx.

◆ SavePrimitiveFunctions()

void TH1::SavePrimitiveFunctions ( std::ostream & out,
const char * varname,
TList * lst )
staticinherited

◆ SavePrimitiveHelp()

virtual void TH1::SavePrimitiveHelp ( std::ostream & out,
const char * hname,
Option_t * option = "" )
protectedvirtualinherited

◆ SavePrimitiveNameTitle()

void TNamed::SavePrimitiveNameTitle ( std::ostream & out,
const char * variable_name )
protectedinherited

Save object name and title into the output stream "out".

Definition at line 135 of file TNamed.cxx.

◆ SavePrimitiveVector()

TString TObject::SavePrimitiveVector ( std::ostream & out,
const char * prefix,
Int_t len,
Double_t * arr,
Int_t flag = 0 )
staticprotectedinherited

Save array in the output stream "out" as vector.

Create unique variable name based on prefix value Returns name of vector which can be used in constructor or in other places of C++ code If flag === kTRUE, just add empty line If flag === 111, check if array is empty and return nullptr or <vectorname>.data()

Definition at line 796 of file TObject.cxx.

◆ Scale()

void TProfile::Scale ( Double_t c1 = 1,
Option_t * option = "" )
overridevirtual

Multiply this profile by a constant c1.

this = c1*this

This function uses the services of TProfile::Add

Reimplemented from TH1.

Definition at line 1727 of file TProfile.cxx.

◆ Set() [1/2]

void TArrayD::Set ( Int_t n)
overridevirtualinherited

Set size of this array to n doubles.

A new array is created, the old contents copied to the new array, then the old array is deleted. This function should not be called if the array was declared via Adopt.

Implements TArray.

Definition at line 105 of file TArrayD.cxx.

◆ Set() [2/2]

void TArrayD::Set ( Int_t n,
const Double_t * array )
inherited

Set size of this array to n doubles and set the contents This function should not be called if the array was declared via Adopt.

Definition at line 132 of file TArrayD.cxx.

◆ SetAt()

void TArrayD::SetAt ( Double_t v,
Int_t i )
inlineoverridevirtualinherited

Implements TArray.

Definition at line 51 of file TArrayD.h.

◆ SetAxisColor()

void TH1::SetAxisColor ( Color_t color = 1,
Option_t * axis = "X" )
virtualinherited

Set color to draw the axis line and tick marks.

axis specifies which axis ("x","y","z"), default = "x" if axis="xyz" set all 3 axes

Definition at line 187 of file Haxis.cxx.

◆ SetAxisRange()

void TH1::SetAxisRange ( Double_t xmin,
Double_t xmax,
Option_t * axis = "X" )
virtualinherited

Set the "axis" range.

Definition at line 201 of file Haxis.cxx.

◆ SetBarOffset()

virtual void TH1::SetBarOffset ( Float_t offset = 0.25)
inlinevirtualinherited

Definition at line 612 of file TH1.h.

◆ SetBarWidth()

virtual void TH1::SetBarWidth ( Float_t width = 0.5)
inlinevirtualinherited

Definition at line 613 of file TH1.h.

◆ SetBinContent() [1/3]

virtual void TH1::SetBinContent ( Int_t bin,
Double_t content )
virtualinherited

Reimplemented in TH2, TH2Poly, and TH3.

◆ SetBinContent() [2/3]

virtual void TH1::SetBinContent ( Int_t bin,
Int_t ,
Double_t content )
inlinevirtualinherited

Reimplemented in TH2, TH2Poly, and TH3.

Definition at line 615 of file TH1.h.

◆ SetBinContent() [3/3]

virtual void TH1::SetBinContent ( Int_t bin,
Int_t ,
Int_t ,
Double_t content )
inlinevirtualinherited

Reimplemented in TH2, TH2Poly, and TH3.

Definition at line 616 of file TH1.h.

◆ SetBinEntries()

void TProfile::SetBinEntries ( Int_t bin,
Double_t w )
virtual

Set the number of entries in bin.

Definition at line 1735 of file TProfile.cxx.

◆ SetBinError() [1/3]

virtual void TH1::SetBinError ( Int_t bin,
Double_t error )
virtualinherited

Reimplemented in TH2Poly.

◆ SetBinError() [2/3]

virtual void TH1::SetBinError ( Int_t binx,
Int_t biny,
Double_t error )
virtualinherited

Reimplemented in TH2Poly.

◆ SetBinError() [3/3]

virtual void TH1::SetBinError ( Int_t binx,
Int_t biny,
Int_t binz,
Double_t error )
virtualinherited

Reimplemented in TH2Poly.

◆ SetBinErrorOption()

virtual void TH1::SetBinErrorOption ( EBinErrorOpt type)
inlinevirtualinherited

Definition at line 629 of file TH1.h.

◆ SetBins() [1/7]

void TProfile::SetBins ( const Int_t * nbins,
const Double_t * range )
inlineprotected

Definition at line 54 of file TProfile.h.

◆ SetBins() [2/7]

void TProfile::SetBins ( Int_t nbins,
Double_t xmin,
Double_t xmax )
overridevirtual

Redefine x axis parameters.

Reimplemented from TH1.

Definition at line 1743 of file TProfile.cxx.

◆ SetBins() [3/7]

void TProfile::SetBins ( Int_t nx,
const Double_t * xbins )
overridevirtual

Redefine x axis parameters.

Reimplemented from TH1.

Definition at line 1753 of file TProfile.cxx.

◆ SetBins() [4/7]

void TProfile::SetBins ( Int_t ,
const Double_t * ,
Int_t ,
const Double_t *  )
inlineoverrideprivatevirtual

Reimplemented from TH1.

Definition at line 70 of file TProfile.h.

◆ SetBins() [5/7]

void TProfile::SetBins ( Int_t ,
const Double_t * ,
Int_t ,
const Double_t * ,
Int_t ,
const Double_t *  )
inlineoverrideprivatevirtual

Reimplemented from TH1.

Definition at line 74 of file TProfile.h.

◆ SetBins() [6/7]

void TProfile::SetBins ( Int_t ,
Double_t ,
Double_t ,
Int_t ,
Double_t ,
Double_t  )
inlineoverrideprivatevirtual

Reimplemented from TH1.

Definition at line 68 of file TProfile.h.

◆ SetBins() [7/7]

void TProfile::SetBins ( Int_t ,
Double_t ,
Double_t ,
Int_t ,
Double_t ,
Double_t ,
Int_t ,
Double_t ,
Double_t  )
inlineoverrideprivatevirtual

Reimplemented from TH1.

Definition at line 72 of file TProfile.h.

◆ SetBinsLength()

void TProfile::SetBinsLength ( Int_t n = -1)
overridevirtual

Set total number of bins including under/overflow.

Reallocate bin contents array

Reimplemented from TH1D.

Definition at line 1764 of file TProfile.cxx.

◆ SetBit() [1/2]

void TObject::SetBit ( UInt_t f)
inlineinherited

Definition at line 202 of file TObject.h.

◆ SetBit() [2/2]

void TObject::SetBit ( UInt_t f,
Bool_t set )
inherited

Set or unset the user status bits as specified in f.

Definition at line 888 of file TObject.cxx.

◆ SetBuffer()

void TProfile::SetBuffer ( Int_t bufsize,
Option_t * option = "" )
overridevirtual

Set the buffer size in units of 8 bytes (double).

Reimplemented from TH1.

Definition at line 1773 of file TProfile.cxx.

◆ SetCanExtend()

virtual UInt_t TH1::SetCanExtend ( UInt_t extendBitMask)
virtualinherited

◆ SetCellContent()

virtual void TH1::SetCellContent ( Int_t binx,
Int_t biny,
Double_t content )
inlinevirtualinherited

Definition at line 688 of file TH1.h.

◆ SetCellError()

virtual void TH1::SetCellError ( Int_t binx,
Int_t biny,
Double_t content )
inlinevirtualinherited

Definition at line 690 of file TH1.h.

◆ SetColors()

virtual void TH1::SetColors ( Color_t linecolor = -1,
Color_t markercolor = -1,
Color_t fillcolor = -1 )
virtualinherited

◆ SetContent()

virtual void TH1::SetContent ( const Double_t * content)
virtualinherited

◆ SetContour()

virtual void TH1::SetContour ( Int_t nlevels,
const Double_t * levels = nullptr )
virtualinherited

◆ SetContourLevel()

virtual void TH1::SetContourLevel ( Int_t level,
Double_t value )
virtualinherited

◆ SetDefaultBufferSize()

void TH1::SetDefaultBufferSize ( Int_t bufsize = 1000)
staticinherited

◆ SetDefaultSumw2()

void TH1::SetDefaultSumw2 ( Bool_t sumw2 = kTRUE)
staticinherited

◆ SetDirectory()

virtual void TH1::SetDirectory ( TDirectory * dir)
virtualinherited

◆ SetDrawOption()

void TObject::SetDrawOption ( Option_t * option = "")
virtualinherited

Set drawing option for object.

This option only affects the drawing style and is stored in the option field of the TObjOptLink supporting a TPad's primitive list (TList). Note that it does not make sense to call object.SetDrawOption(option) before having called object.Draw().

Reimplemented in RooPlot, TAxis, TBrowser, TGedFrame, TGFrame, TPad, TPaveStats, TRootBrowserLite, TSystemDirectory, and TSystemFile.

Definition at line 871 of file TObject.cxx.

◆ SetDtorOnly()

void TObject::SetDtorOnly ( void * obj)
staticinherited

Set destructor only flag.

Definition at line 1204 of file TObject.cxx.

◆ SetEntries()

virtual void TH1::SetEntries ( Double_t n)
inlinevirtualinherited

Definition at line 639 of file TH1.h.

◆ SetError()

virtual void TH1::SetError ( const Double_t * error)
virtualinherited

◆ SetErrorOption()

void TProfile::SetErrorOption ( Option_t * option = "")
virtual

Set option to compute profile errors.

The computation of the bin errors is based on the parameter option:

-' ' (Default) The bin errors are the standard error on the mean of the bin profiled values (Y), i.e. the standard error of the bin contents. Note that if TProfile::Approximate() is called, an approximation is used when the spread in Y is 0 and the number of bin entries is > 0 -'s' The bin errors are the standard deviations of the Y bin values Note that if TProfile::Approximate() is called, an approximation is used when the spread in Y is 0 and the number of bin entries is > 0 -'i' Errors are as in default case (standard errors of the bin contents) The only difference is for the case when the spread in Y is zero. In this case for N > 0 the error is 1./SQRT(12.*N) -'g' Errors are 1./SQRT(W) for W not equal to 0 and 0 for W = 0. W is the sum in the bin of the weights of the profile. This option is for combining measurements y +/- dy, and the profile is filled with values y and weights w = 1/dy**2

See TProfile::BuildOptions for a detailed explanation of all options

Definition at line 1812 of file TProfile.cxx.

◆ SetFillAttributes()

virtual void TAttFill::SetFillAttributes ( )
virtualinherited

Reimplemented in TGWin32VirtualXProxy.

◆ SetFillColor() [1/2]

virtual void TAttFill::SetFillColor ( Color_t fcolor)
inlinevirtualinherited

Set the fill area color.

Reimplemented in TGQuartz, TGraphMultiErrors, TGWin32, TGWin32VirtualXProxy, TGX11, TPDF, TPostScript, TSpider, TSVG, TTeXDump, and TVirtualX.

Definition at line 40 of file TAttFill.h.

◆ SetFillColor() [2/2]

void TAttFill::SetFillColor ( TColorNumber )
inherited

◆ SetFillColorAlpha()

virtual void TAttFill::SetFillColorAlpha ( Color_t fcolor,
Float_t falpha )
virtualinherited

Reimplemented in TGraphMultiErrors.

◆ SetFillStyle()

virtual void TAttFill::SetFillStyle ( Style_t fstyle)
inlinevirtualinherited

Set the fill area style.

Reimplemented in TGQuartz, TGraphMultiErrors, TGWin32, TGWin32VirtualXProxy, TGX11, TPad, TSpider, and TVirtualX.

Definition at line 42 of file TAttFill.h.

◆ SetHighlight()

virtual void TH1::SetHighlight ( Bool_t set = kTRUE)
virtualinherited

◆ SetLabelColor()

void TH1::SetLabelColor ( Color_t color = 1,
Option_t * axis = "X" )
virtualinherited

Set axis labels color.

axis specifies which axis ("x","y","z"), default = "x" if axis="xyz" set all 3 axes

Definition at line 226 of file Haxis.cxx.

◆ SetLabelFont()

void TH1::SetLabelFont ( Style_t font = 62,
Option_t * axis = "X" )
virtualinherited

Set font number used to draw axis labels.

font : Text font code = 10*fontnumber + precision Font numbers must be between 1 and 14 precision = 1 fast hardware fonts (steps in the size) precision = 2 scalable and rotatable hardware fonts

The default font number is 62. axis specifies which axis ("x","y","z"), default = "x" if axis="xyz" set all 3 axes

Definition at line 249 of file Haxis.cxx.

◆ SetLabelOffset()

void TH1::SetLabelOffset ( Float_t offset = 0.005,
Option_t * axis = "X" )
virtualinherited

Set offset between axis and axis' labels.

The offset is expressed as a percent of the pad height. axis specifies which axis ("x","y","z"), default = "x" if axis="xyz" set all 3 axes

Definition at line 267 of file Haxis.cxx.

◆ SetLabelSize()

void TH1::SetLabelSize ( Float_t size = 0.02,
Option_t * axis = "X" )
virtualinherited

Set size of axis' labels.

The size is expressed as a percent of the pad height. axis specifies which axis ("x","y","z"), default = "x" if axis="xyz" set all 3 axes

Definition at line 285 of file Haxis.cxx.

◆ SetLineAttributes()

virtual void TAttLine::SetLineAttributes ( )
virtualinherited

Reimplemented in TGWin32VirtualXProxy.

◆ SetLineColor() [1/2]

◆ SetLineColor() [2/2]

void TAttLine::SetLineColor ( TColorNumber lcolor)
inherited

◆ SetLineColorAlpha()

virtual void TAttLine::SetLineColorAlpha ( Color_t lcolor,
Float_t lalpha )
virtualinherited

Reimplemented in TGraphMultiErrors.

◆ SetLineStyle()

virtual void TAttLine::SetLineStyle ( Style_t lstyle)
inlinevirtualinherited

◆ SetLineWidth()

virtual void TAttLine::SetLineWidth ( Width_t lwidth)
inlinevirtualinherited

◆ SetMarkerAttributes()

virtual void TAttMarker::SetMarkerAttributes ( )
virtualinherited

Reimplemented in TGWin32VirtualXProxy.

◆ SetMarkerColor() [1/2]

virtual void TAttMarker::SetMarkerColor ( Color_t mcolor = 1)
inlinevirtualinherited

◆ SetMarkerColor() [2/2]

void TAttMarker::SetMarkerColor ( TColorNumber lcolor)
inherited

◆ SetMarkerColorAlpha()

virtual void TAttMarker::SetMarkerColorAlpha ( Color_t mcolor,
Float_t malpha )
virtualinherited

◆ SetMarkerSize()

virtual void TAttMarker::SetMarkerSize ( Size_t msize = 1)
inlinevirtualinherited

Set the marker size.

Note that the marker styles number 1 6 and 7 (the dots), cannot be scaled. They are meant to be very fast to draw and are always drawn with the same number of pixels; therefore this method does not apply on them.

Reimplemented in ROOT::Experimental::REvePointSet, ROOT::Experimental::REvePointSetArray, ROOT::Experimental::REveTrackList, TEvePointSet, TEvePointSetArray, TEveTrackList, TGQuartz, TGWin32, TGWin32VirtualXProxy, TGX11, TTeXDump, and TVirtualX.

Definition at line 48 of file TAttMarker.h.

◆ SetMarkerStyle()

virtual void TAttMarker::SetMarkerStyle ( Style_t mstyle = 1)
inlinevirtualinherited

◆ SetMaximum()

virtual void TH1::SetMaximum ( Double_t maximum = -1111)
inlinevirtualinherited

Definition at line 652 of file TH1.h.

◆ SetMinimum()

virtual void TH1::SetMinimum ( Double_t minimum = -1111)
inlinevirtualinherited

Definition at line 653 of file TH1.h.

◆ SetName()

void TH1::SetName ( const char * name)
overridevirtualinherited

Set the name of the TNamed.

WARNING: if the object is a member of a THashTable or THashList container the container must be Rehash()'ed after SetName(). For example the list of objects in the current directory is a THashList.

Reimplemented from TNamed.

◆ SetNameTitle()

void TH1::SetNameTitle ( const char * name,
const char * title )
overridevirtualinherited

Set all the TNamed parameters (name and title).

WARNING: if the name is changed and the object is a member of a THashTable or THashList container the container must be Rehash()'ed after SetName(). For example the list of objects in the current directory is a THashList.

Reimplemented from TNamed.

◆ SetNdivisions()

void TH1::SetNdivisions ( Int_t n = 510,
Option_t * axis = "X" )
virtualinherited

Set the number of divisions to draw an axis.

ndiv : Number of divisions.

 n = N1 + 100*N2 + 10000*N3
 N1=number of primary divisions.
 N2=number of secondary divisions.
 N3=number of 3rd divisions.
     e.g.:
     nndi=0 --> no tick marks.
     nndi=2 --> 2 divisions, one tick mark in the middle
                of the axis.

axis specifies which axis ("x","y","z"), default = "x" if axis="xyz" set all 3 axes

Definition at line 170 of file Haxis.cxx.

◆ SetNormFactor()

virtual void TH1::SetNormFactor ( Double_t factor = 1)
inlinevirtualinherited

Definition at line 658 of file TH1.h.

◆ SetObjectStat()

void TObject::SetObjectStat ( Bool_t stat)
staticinherited

Turn on/off tracking of objects in the TObjectTable.

Definition at line 1188 of file TObject.cxx.

◆ SetOption()

virtual void TH1::SetOption ( Option_t * option = " ")
inlinevirtualinherited

Definition at line 660 of file TH1.h.

◆ SetSliceContent()

template<typename ValueType>
void TH1::SetSliceContent ( const std::vector< Double_t > & values,
const std::vector< std::pair< Int_t, Int_t > > & sliceEdges,
ValueType * dataArray )
inlineprivateinherited

Sets the content of a slice of bins in a histogram.

This function allows setting the content of a slice of bins in a histogram by specifying the edges of the slice and the corresponding values to assign.

Template Parameters
ValueTypeThe type of the histogram's data.
Parameters
valuesA vector of values to assign to the bins in the specified slice.
sliceEdgesA vector of pairs specifying the low and upper edges of the slice for each dimension.
dataArrayA pointer to the histogram's data array.

Definition at line 301 of file TH1.h.

◆ SetStatOverflows()

void TH1::SetStatOverflows ( EStatOverflows statOverflows)
inlineinherited

See GetStatOverflows for more information.

Definition at line 665 of file TH1.h.

◆ SetStats()

virtual void TH1::SetStats ( Bool_t stats = kTRUE)
virtualinherited

◆ SetTickLength()

void TH1::SetTickLength ( Float_t length = 0.02,
Option_t * axis = "X" )
virtualinherited

Set the axis' tick marks length.

axis specifies which axis ("x","y","z"), default = "x" if axis="xyz" set all 3 axes

Definition at line 302 of file Haxis.cxx.

◆ SetTitle()

void TH1::SetTitle ( const char * title)
overridevirtualinherited

Set the title of the TNamed.

Reimplemented from TNamed.

◆ SetTitleFont()

void TH1::SetTitleFont ( Style_t font = 62,
Option_t * axis = "X" )
virtualinherited

Set the axis' title font.

  • if axis =="x" set the X axis title font
  • if axis =="y" set the Y axis title font
  • if axis =="z" set the Z axis title font any other value of axis will set the pad title font

if axis="xyz" set all 3 axes

Definition at line 323 of file Haxis.cxx.

◆ SetTitleOffset()

void TH1::SetTitleOffset ( Float_t offset = 1,
Option_t * axis = "X" )
virtualinherited

Specify a parameter offset to control the distance between the axis and the axis' title.

  • offset = 1 means : use the default distance
  • offset = 1.2 means: the distance will be 1.2*(default distance)
  • offset = 0.8 means: the distance will be 0.8*(default distance)

axis specifies which axis ("x","y","z"), default = "x" if axis="xyz" set all 3 axes

Definition at line 345 of file Haxis.cxx.

◆ SetTitleSize()

void TH1::SetTitleSize ( Float_t size = 0.02,
Option_t * axis = "X" )
virtualinherited

Set the axis' title size.

  • if axis = "x" set the X axis title size
  • if axis = "y" set the Y axis title size
  • if axis = "z" set the Z axis title size

if axis ="xyz" set all 3 axes

Definition at line 365 of file Haxis.cxx.

◆ SetUniqueID()

void TObject::SetUniqueID ( UInt_t uid)
virtualinherited

Set the unique object id.

Definition at line 899 of file TObject.cxx.

◆ SetXTitle()

virtual void TH1::SetXTitle ( const char * title)
inlinevirtualinherited

Definition at line 667 of file TH1.h.

◆ SetYTitle()

virtual void TH1::SetYTitle ( const char * title)
inlinevirtualinherited

Definition at line 668 of file TH1.h.

◆ SetZTitle()

virtual void TH1::SetZTitle ( const char * title)
inlinevirtualinherited

Definition at line 669 of file TH1.h.

◆ ShowBackground()

virtual TH1 * TH1::ShowBackground ( Int_t niter = 20,
Option_t * option = "same" )
virtualinherited

◆ ShowPeaks()

virtual Int_t TH1::ShowPeaks ( Double_t sigma = 2,
Option_t * option = "",
Double_t threshold = 0.05 )
virtualinherited

Reimplemented in TH2.

◆ size()

std::size_t TArray::size ( ) const
inlineinherited

Definition at line 50 of file TArray.h.

◆ Sizeof()

Int_t TNamed::Sizeof ( ) const
virtualinherited

Return size of the TNamed part of the TObject.

Reimplemented in TDirectory, TDirectoryFile, TFile, TKey, TSQLFile, and TXMLFile.

Definition at line 182 of file TNamed.cxx.

◆ SliceHistoInPlace()

template<typename ValueType>
void TH1::SliceHistoInPlace ( std::vector< Int_t > & args,
ValueType *& dataArray,
Int_t & fN )
inlineprivateinherited

Slices a histogram in place based on the specified bin ranges for each dimension.

This function modifies the histogram by extracting a sub-region defined by the provided bin ranges for each dimension. The resulting histogram will have updated bin counts, edges, and contents. Bin contents outside the range fall into the flow bins. The histogram's internal data array is freed and reallocated by this function. This function is used by the python implementation of the Unified Histogram Interface (UHI) for slicing.

Template Parameters
ValueTypeThe type of the histogram's data.
Parameters
argsA vector of integers specifying the low and upper edges of the slice for each dimension.
dataArrayA pointer to the histogram's data array.
fNThe size of dataArray.

Definition at line 206 of file TH1.h.

◆ Smooth()

virtual void TH1::Smooth ( Int_t ntimes = 1,
Option_t * option = "" )
virtualinherited

Reimplemented in TH2.

◆ SmoothArray()

void TH1::SmoothArray ( Int_t NN,
Double_t * XX,
Int_t ntimes = 1 )
staticinherited

◆ StatOverflows()

void TH1::StatOverflows ( Bool_t flag = kTRUE)
staticinherited

◆ Streamer()

void TProfile::Streamer ( TBuffer & R__b)
overridevirtual

Stream an object of class TProfile.

Reimplemented from TH1D.

Definition at line 1820 of file TProfile.cxx.

◆ StreamerNVirtual()

void TProfile::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 139 of file TProfile.h.

◆ Sumw2()

void TProfile::Sumw2 ( Bool_t flag = kTRUE)
overridevirtual

Create/delete structure to store sum of squares of weights per bin.

This is needed to compute the correct statistical quantities of a profile filled with weights

This function is automatically called when the histogram is created if the static function TH1::SetDefaultSumw2 has been called before. If flag is false the structure is deleted

Reimplemented from TH1.

Definition at line 1860 of file TProfile.cxx.

◆ SysError()

void TObject::SysError ( const char * location,
const char * fmt,
... ) const
virtualinherited

Issue system error message.

Use "location" to specify the method where the system error occurred. Accepts standard printf formatting arguments.

Definition at line 1112 of file TObject.cxx.

◆ TestBit()

Bool_t TObject::TestBit ( UInt_t f) const
inlineinherited

Definition at line 204 of file TObject.h.

◆ TestBits()

Int_t TObject::TestBits ( UInt_t f) const
inlineinherited

Definition at line 205 of file TObject.h.

◆ TransformHisto()

TH1 * TH1::TransformHisto ( TVirtualFFT * fft,
TH1 * h_output,
Option_t * option )
staticinherited

◆ UpdateBinContent()

void TH1D::UpdateBinContent ( Int_t bin,
Double_t content )
inlineoverrideprotectedvirtualinherited

Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin.

Implements TH1.

Definition at line 960 of file TH1.h.

◆ UseCurrentStyle()

void TH1::UseCurrentStyle ( )
overridevirtualinherited

Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.

Reimplemented from TObject.

◆ Warning()

void TObject::Warning ( const char * location,
const char * fmt,
... ) const
virtualinherited

Issue warning message.

Use "location" to specify the method where the warning occurred. Accepts standard printf formatting arguments.

Definition at line 1084 of file TObject.cxx.

◆ Write() [1/2]

Int_t TObject::Write ( const char * name = nullptr,
Int_t option = 0,
Int_t bufsize = 0 )
virtualinherited

Write this object to the current directory.

For more see the const version of this method.

Reimplemented in ROOT::TBufferMergerFile, TBuffer, TCollection, TDirectory, TDirectoryFile, TFile, TMap, TParallelMergingFile, TSQLFile, TTree, and TXMLFile.

Definition at line 989 of file TObject.cxx.

◆ Write() [2/2]

Int_t TObject::Write ( const char * name = nullptr,
Int_t option = 0,
Int_t bufsize = 0 ) const
virtualinherited

Write this object to the current directory.

The data structure corresponding to this object is serialized. The corresponding buffer is written to the current directory with an associated key with name "name".

Writing an object to a file involves the following steps:

  • Creation of a support TKey object in the current directory. The TKey object creates a TBuffer object.
  • The TBuffer object is filled via the class::Streamer function.
  • If the file is compressed (default) a second buffer is created to hold the compressed buffer.
  • Reservation of the corresponding space in the file by looking in the TFree list of free blocks of the file.
  • The buffer is written to the file.

Bufsize can be given to force a given buffer size to write this object. By default, the buffersize will be taken from the average buffer size of all objects written to the current file so far.

If a name is specified, it will be the name of the key. If name is not given, the name of the key will be the name as returned by GetName().

The option can be a combination of: kSingleKey, kOverwrite or kWriteDelete Using the kOverwrite option a previous key with the same name is overwritten. The previous key is deleted before writing the new object. Using the kWriteDelete option a previous key with the same name is deleted only after the new object has been written. This option is safer than kOverwrite but it is slower. NOTE: Neither kOverwrite nor kWriteDelete reduces the size of a TFile– the space is simply freed up to be overwritten; in the case of a TTree, it is more complicated. If one opens a TTree, appends some entries, then writes it out, the behaviour is effectively the same. If, however, one creates a new TTree and writes it out in this way, only the metadata is replaced, effectively making the old data invisible without deleting it. TTree::Delete() can be used to mark all disk space occupied by a TTree as free before overwriting its metadata this way. The kSingleKey option is only used by TCollection::Write() to write a container with a single key instead of each object in the container with its own key.

An object is read from the file into memory via TKey::Read() or via TObject::Read().

The function returns the total number of bytes written to the file. It returns 0 if the object cannot be written.

Reimplemented in TBuffer, TCollection, TDirectory, TDirectoryFile, TFile, TMap, TParallelMergingFile, TSQLFile, TTree, and TXMLFile.

Definition at line 964 of file TObject.cxx.

◆ WriteArray()

void TArray::WriteArray ( TBuffer & b,
const TArray * a )
staticinherited

Write TArray object to buffer.

Simplified version of TBuffer::WriteObject (does not keep track of multiple references to the same array).

Definition at line 81 of file TArray.cxx.

◆ TH1Merger

friend class TH1Merger
friend

Definition at line 36 of file TProfile.h.

◆ TProfileHelper

friend class TProfileHelper
friend

Definition at line 35 of file TProfile.h.

Member Data Documentation

◆ fArray

Double_t* TArrayD::fArray
inherited

Definition at line 30 of file TArrayD.h.

◆ fBarOffset

Short_t TH1::fBarOffset
protectedinherited

(1000*offset) for bar charts or legos

Definition at line 154 of file TH1.h.

◆ fBarWidth

Short_t TH1::fBarWidth
protectedinherited

(1000*width) for bar charts or legos

Definition at line 155 of file TH1.h.

◆ fBinEntries

TArrayD TProfile::fBinEntries
protected

number of entries per bin

Definition at line 39 of file TProfile.h.

◆ fBinStatErrOpt

EBinErrorOpt TH1::fBinStatErrOpt
protectedinherited

Option for bin statistical errors.

Definition at line 174 of file TH1.h.

◆ fBinSumw2

TArrayD TProfile::fBinSumw2
protected

Array of sum of squares of weights per bin.

Definition at line 46 of file TProfile.h.

◆ fBits

UInt_t TObject::fBits
privateinherited

bit field status word

Definition at line 47 of file TObject.h.

◆ fBuffer

Double_t* TH1::fBuffer
protectedinherited

[fBufferSize] entry buffer

Definition at line 169 of file TH1.h.

◆ fBufferSize

Int_t TH1::fBufferSize
protectedinherited

fBuffer size

Definition at line 168 of file TH1.h.

◆ fContour

TArrayD TH1::fContour
protectedinherited

Array to display contour levels.

Definition at line 164 of file TH1.h.

◆ fDimension

Int_t TH1::fDimension
protectedinherited

! Histogram dimension (1, 2 or 3 dim)

Definition at line 171 of file TH1.h.

◆ fDirectory

TDirectory* TH1::fDirectory
protectedinherited

! Pointer to directory holding this histogram

Definition at line 170 of file TH1.h.

◆ fEntries

Double_t TH1::fEntries
protectedinherited

Number of entries.

Definition at line 156 of file TH1.h.

◆ fErrorMode

EErrorType TProfile::fErrorMode
protected

Option to compute errors.

Definition at line 40 of file TProfile.h.

◆ fFillColor

Color_t TAttFill::fFillColor
protectedinherited

Fill area color.

Definition at line 24 of file TAttFill.h.

◆ fFillStyle

Style_t TAttFill::fFillStyle
protectedinherited

Fill area style.

Definition at line 25 of file TAttFill.h.

◆ fFunctions

TList* TH1::fFunctions
protectedinherited

->Pointer to list of functions (fits and user)

Definition at line 167 of file TH1.h.

◆ fgAddDirectory

Bool_t TH1::fgAddDirectory = kTRUE
staticprotectedinherited

! Flag to add histograms to the directory

Definition at line 177 of file TH1.h.

◆ fgApproximate

Bool_t TProfile::fgApproximate = kFALSE
staticprotected

bin error approximation option

Definition at line 48 of file TProfile.h.

◆ fgBufferSize

Int_t TH1::fgBufferSize = 1000
staticprotectedinherited

! Default buffer size for automatic histograms

Definition at line 176 of file TH1.h.

◆ fgDefaultSumw2

Bool_t TH1::fgDefaultSumw2 = kFALSE
staticprotectedinherited

! Flag to call TH1::Sumw2 automatically at histogram creation time

Definition at line 179 of file TH1.h.

◆ fgDtorOnly

Longptr_t TObject::fgDtorOnly = 0
staticprivateinherited

object for which to call dtor only (i.e. no delete)

Definition at line 49 of file TObject.h.

◆ fgObjectStat

Bool_t TObject::fgObjectStat = kTRUE
staticprivateinherited

if true keep track of objects in TObjectTable

Definition at line 50 of file TObject.h.

◆ fgStatOverflows

Bool_t TH1::fgStatOverflows = kFALSE
staticprotectedinherited

! Flag to use under/overflows in statistics

Definition at line 178 of file TH1.h.

◆ fIntegral

Double_t* TH1::fIntegral
protectedinherited

! Integral of bins used by GetRandom

Definition at line 172 of file TH1.h.

◆ fLineColor

Color_t TAttLine::fLineColor
protectedinherited

Line color.

Definition at line 24 of file TAttLine.h.

◆ fLineStyle

Style_t TAttLine::fLineStyle
protectedinherited

Line style.

Definition at line 25 of file TAttLine.h.

◆ fLineWidth

Width_t TAttLine::fLineWidth
protectedinherited

Line width.

Definition at line 26 of file TAttLine.h.

◆ fMarkerColor

Color_t TAttMarker::fMarkerColor
protectedinherited

Marker color.

Definition at line 24 of file TAttMarker.h.

◆ fMarkerSize

Size_t TAttMarker::fMarkerSize
protectedinherited

Marker size.

Definition at line 26 of file TAttMarker.h.

◆ fMarkerStyle

Style_t TAttMarker::fMarkerStyle
protectedinherited

Marker style.

Definition at line 25 of file TAttMarker.h.

◆ fMaximum

Double_t TH1::fMaximum
protectedinherited

Maximum value for plotting.

Definition at line 161 of file TH1.h.

◆ fMinimum

Double_t TH1::fMinimum
protectedinherited

Minimum value for plotting.

Definition at line 162 of file TH1.h.

◆ fN

Int_t TArray::fN
inherited

Definition at line 38 of file TArray.h.

◆ fName

TString TNamed::fName
protectedinherited

Definition at line 32 of file TNamed.h.

◆ fNcells

Int_t TH1::fNcells
protectedinherited

Number of bins(1D), cells (2D) +U/Overflows.

Definition at line 150 of file TH1.h.

◆ fNormFactor

Double_t TH1::fNormFactor
protectedinherited

Normalization factor.

Definition at line 163 of file TH1.h.

◆ fOption

TString TH1::fOption
protectedinherited

Histogram options.

Definition at line 166 of file TH1.h.

◆ fPainter

TVirtualHistPainter* TH1::fPainter
protectedinherited

! Pointer to histogram painter

Definition at line 173 of file TH1.h.

◆ fScaling

Bool_t TProfile::fScaling
protected

! True when TProfile::Scale is called

Definition at line 43 of file TProfile.h.

◆ fStatOverflows

EStatOverflows TH1::fStatOverflows
protectedinherited

Per object flag to use under/overflows in statistics.

Definition at line 175 of file TH1.h.

◆ fSumw2

TArrayD TH1::fSumw2
protectedinherited

Array of sum of squares of weights.

Definition at line 165 of file TH1.h.

◆ fTitle

TString TNamed::fTitle
protectedinherited

Definition at line 33 of file TNamed.h.

◆ fTsumw

Double_t TH1::fTsumw
protectedinherited

Total Sum of weights.

Definition at line 157 of file TH1.h.

◆ fTsumw2

Double_t TH1::fTsumw2
protectedinherited

Total Sum of squares of weights.

Definition at line 158 of file TH1.h.

◆ fTsumwx

Double_t TH1::fTsumwx
protectedinherited

Total Sum of weight*X.

Definition at line 159 of file TH1.h.

◆ fTsumwx2

Double_t TH1::fTsumwx2
protectedinherited

Total Sum of weight*X*X.

Definition at line 160 of file TH1.h.

◆ fTsumwy

Double_t TProfile::fTsumwy
protected

Total Sum of weight*Y.

Definition at line 44 of file TProfile.h.

◆ fTsumwy2

Double_t TProfile::fTsumwy2
protected

Total Sum of weight*Y*Y.

Definition at line 45 of file TProfile.h.

◆ fUniqueID

UInt_t TObject::fUniqueID
privateinherited

object unique identifier

Definition at line 46 of file TObject.h.

◆ fXaxis

TAxis TH1::fXaxis
protectedinherited

X axis descriptor.

Definition at line 151 of file TH1.h.

◆ fYaxis

TAxis TH1::fYaxis
protectedinherited

Y axis descriptor.

Definition at line 152 of file TH1.h.

◆ fYmax

Double_t TProfile::fYmax
protected

Upper limit in Y (if set).

Definition at line 42 of file TProfile.h.

◆ fYmin

Double_t TProfile::fYmin
protected

Lower limit in Y (if set).

Definition at line 41 of file TProfile.h.

◆ fZaxis

TAxis TH1::fZaxis
protectedinherited

Z axis descriptor.

Definition at line 153 of file TH1.h.