Log of /trunk/hist/hist/inc/TVirtualHistPainter.h
Parent Directory
Revision
25487 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 22 12:44:13 2008 UTC (6 years, 4 months ago) by
moneta
File length: 2567 byte(s)
Diff to
previous 22694
Import changes from math development branch, in particular a re-implementation of
fitting methods for the histogram and graph objects.
NOTE: Since some files are removed, a make clean-hist is needed in order to be able
to compile hist after an svn update.
The implementation of TH1::Fit, TGraph::Fit, TGraph2D::Fit and TMultiGraph::Fit is
done in a common function implemented in HFitImpl.cxx (HFit::Fit).
In addition the file HFitInterface.h define ROOT::Fit::FitObject functions passing
option directly via Foption class and not by a string. They are used by the FitPanel.
Remove previously existing files THistFitInterface.cxx (and *.h) and
TGraphFitInterface.cxx (and *.h). The code is now in the HFitInterface.cxx (and *.h)
files.
Use plugin manager directly to open the Fit Panel. Do not pass anymore via the THistPainter.
Changes in TH1::FitPanel, TGraph::FitPanel.
Add FitPanel() method for TGraph2D and TMultiGraph.
Add new class TBackCompFitter, providing a backward compatible implementation of
TVirtualFitter using the new fitting class. It is constructed from the fitter class
and can be used to retrieve the fit information (result and configuration) via the
TVirtualFitter API from FitConfig and FitResult. A static istance is created after
calling the Fit method.
Other changes are:
TGraph:
- when creating a graph from an histogram, don't use the same name.
Otherwise it will conflict later with histogram created internally by the TGraph.
TH2:
add protected method TH2::DoFitSlices and TH2::DoProfile as common implementations
for (FitSlicesX,FitSclicesY) and (ProfileX, ProfileY).
pass the global statistics in DoProjection when range is (1,NBIN)
TBinimialEfficiencyFit:
add possibility to set verbose option, and set different precision and
max iterations for minimizing.
Revision
14609 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 10 06:55:14 2006 UTC (8 years, 9 months ago) by
brun
Original Path:
trunk/hist/inc/TVirtualHistPainter.h
File length: 2806 byte(s)
Diff to
previous 14357
-In TVirtualHistPainter.h replace the previous functions:
virtual void SetShowProjectionX() = 0;
virtual void SetShowProjectionY() = 0;
by one single function working for TH2 and TH3
virtual void SetShowProjection(const char *option) = 0;
-In THistPainter add the following functions:
virtual void SetShowProjection(const char *option);
virtual void ShowProjectionX(Int_t px, Int_t py);
virtual void ShowProjectionY(Int_t px, Int_t py);
virtual void ShowProjection3(Int_t px, Int_t py);
-In THistPainter.cxx implement the new function
void THistPainter::ShowProjection3(Int_t px, Int_t py)
// Show projection (specified by fShowProjection) of a TH3
// The drawing option for the projection is in fShowOption.
-In TH3, add the new function:
void TH3::SetShowProjection(const char *option)
// When the mouse is moved in a pad containing a 3-d view of this histogram
// a second canvas shows a projection type given as option.
// To stop the generation of the projections, delete the canvas
// containing the projection.
// option may contain a combination of the characters x,y,z,e
// option = "x" return the x projection into a TH1D histogram
// option = "y" return the y projection into a TH1D histogram
// option = "z" return the z projection into a TH1D histogram
// option = "xy" return the x versus y projection into a TH2D histogram
// option = "yx" return the y versus x projection into a TH2D histogram
// option = "xz" return the x versus z projection into a TH2D histogram
// option = "zx" return the z versus x projection into a TH2D histogram
// option = "yz" return the y versus z projection into a TH2D histogram
// option = "zy" return the z versus y projection into a TH2D histogram
// option can also include the drawing option for the projection, eg to draw
// the xy projection using the draw option "box" do
// myhist.SetShowProjection("xy box");
// This function is typically called from the context menu.
Note that this function is only partially implemented. It works only for the option "xy".
It is included in CVS as a framework for additional developments. see
http://root.cern.ch/phpBB2/viewtopic.php?t=3289
Revision
14357 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Mar 21 15:40:56 2006 UTC (8 years, 10 months ago) by
brun
Original Path:
trunk/hist/inc/TVirtualHistPainter.h
File length: 2839 byte(s)
Diff to
previous 14342
Add two new functions in TH2:
These new functions can be selected via the TH2 context menu.
They are a full implementation of the tutorial DynamicSlices.C
void TH2::SetShowProjectionX()
// When the mouse is moved in a pad containing a 2-d view of this histogram
// a second canvas shows the projection along X corresponding to the
// mouse position along Y.
// To stop the generation of the projections, delete the canvas
// containing the projection.
void TH2::SetShowProjectionY()
// When the mouse is moved in a pad containing a 2-d view of this histogram
// a second canvas shows the projection along Y corresponding to the
// mouse position along X.
// To stop the generation of the projections, delete the canvas
// containing the projection.
Revision
14336 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 20 21:43:44 2006 UTC (8 years, 10 months ago) by
pcanal
Original Path:
trunk/hist/inc/TVirtualHistPainter.h
File length: 2597 byte(s)
Diff to
previous 9885
Reduce direct dependencies on TClass.h, TROOT.h and TStreamerInfo.h.
Warning: This means that some file that relied on the indirect
inclusion of these header file might now fail to compile with
an error message mention that gROOT is no known or that TClass,
TROOT or TStreamerInfo is incompletely defined. Simply add the
proper include directive.
Revision
9885 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 3 10:51:36 2004 UTC (10 years, 4 months ago) by
brun
Original Path:
trunk/hist/inc/TVirtualHistPainter.h
File length: 2582 byte(s)
Diff to
previous 8048
From Olivier:
- TH2::ProjectionX, TH2::ProjectionY, TH2::ProfileX and TH2::ProfileY can
now be performed according to graphical cuts.
Using a TCutG object, it is possible to select a sub-range of a 2-D histogram.
One must create a graphical cut (mouse or C++) and specify the name
of the cut between [] in the option.
For example, with a TCutG named "cutg", one can call:
myhist->ProjectionX(" ",firstybin,lastybin,"[cutg]");
To invert the cut, it is enough to put a "-" in front of its name:
myhist->ProjectionX(" ",firstybin,lastybin,"[-cutg]");
It is possible to apply several cuts:
myhist->ProjectionX(" ",firstybin,lastybin,[cutg1,cutg2]");
Example:
{
TCanvas *c = new TCanvas("c","example",0,0,700,600);
c->Divide(1,2);
TCutG *gcut = new TCutG("gcut",8);
gcut->SetPoint(0,-0.646552,0.932203);
gcut->SetPoint(1,-1.26437,0.105932);
gcut->SetPoint(2,-0.574713,-1.10169);
gcut->SetPoint(3,0.948276,-0.338983);
gcut->SetPoint(4,1.07759,0.720339);
gcut->SetPoint(5,-0.316092,-0.0847458);
gcut->SetPoint(6,-0.45977,0.402542);
gcut->SetPoint(7,-0.646552,0.932203);
TFile f("hsimple.root")
TH2F *hpxpy = (TH2F*)f.Get("hpxpy");
TH1D *hppx = hpxpy->ProjectionX("",1,40,"[gcut]");
c->cd(1);
hpxpy->SetFillColor(kBlue);
hpxpy->DrawCopy("box");
hpxpy->SetFillColor(kRed);
hpxpy->Draw("same box [gcut]");
c->cd(2);
hppx->Draw();
}
Revision
3915 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 7 09:10:23 2002 UTC (12 years, 11 months ago) by
brun
Original Path:
trunk/hist/inc/TVirtualHistPainter.h
File length: 2339 byte(s)
Diff to
previous 3427
New feature added by Philippe:
I am taking advantage of the fact that we have one painter per histogram
to individualize a little better the stats box.
The HistPainter now handles a pointer to the stats box. In particular this
means that you can rename it and still have it being updated. The stats can
also now be retrieved via hist->GetPainter()->GetStats(); The HistPainter
now keeps contact with the PaveStats box whether its name have changed or not.
Revision
1205 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 13 15:13:57 2000 UTC (14 years, 1 month ago) by
brun
Original Path:
trunk/hist/inc/TVirtualHistPainter.h
File length: 2138 byte(s)
Diff to
previous 3
W A R N I N G !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================
A very long list of changes in this pre-release of version 3.00.
We have modified the signature of many functions (in particular TObject)
to introduce more constness in the system.
You must change your code if your class derives from TObject and uses
one of the modified functions such as ls, Print, Compare, Hash, etc.
The modified functions in TObject have the following signature:
virtual TObject *Clone() const;
virtual Int_t Compare(const TObject *obj) const;
virtual void Delete(Option_t *option=""); // *MENU*
virtual void DrawClass() const; // *MENU*
virtual void DrawClone(Option_t *option="") const; // *MENU*
virtual void Dump() const; // *MENU*
virtual TObject *FindObject(const TObject *obj) const;
virtual char *GetObjectInfo(Int_t px, Int_t py) const;
virtual ULong_t Hash() const;
virtual void Inspect() const; // *MENU*
virtual Bool_t IsEqual(const TObject *obj) const;
virtual void ls(Option_t *option="") const;
virtual void Print(Option_t *option="") const;
A similar operation has been done with classes such as TH1, TVirtualPad,
TTree, etc.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.