Log of /trunk/hist/hist/inc/TAxis.h
Parent Directory
Revision
48400 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 23 17:44:21 2013 UTC (2 years ago) by
moneta
File length: 9846 byte(s)
Diff to
previous 48031
from Gabriel:
- through use of RetrieveBinContent / GetBinErrorSqUnchecked and code cleanup -> achieved a 1.5x-2x speedup for TH1::Chi2Test
- reverted changes made to GetBinContent methods for 2 or 3 dimensions: these should still call TH1::GetBinContent since it is possible to have to call BufferEmpty
- made TAxis::GetLabels const -> as a consequence, deleted unnecessary const casts in TH1 code
- replaced GetBinError(bin) * GetBinError(bin) with GetBinErrorSqUnchecked(bin) in TH1::Merge
Revision
47909 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 7 10:28:04 2012 UTC (2 years, 1 month ago) by
moneta
File length: 9831 byte(s)
Diff to
previous 44507
from Gabriel:
Introduce possibility to rebin each axis individually
see https://savannah.cern.ch/bugs/?89628
Added a new bit in TAxis to tag an axis as alphanumeric
(i.e. when it contains only labels)
fixed kDecimal problem. Put now as Bit 7 of TObject bits, instead of using TAxis::fBits2
Add new methods:
TH1::SetCanRebin() which can enable/disable rebinning for all axes or for each axis individually
This will replace the TH1::kCanRebin bit which will be deprecated
TH1::CanRebinAllAxes() added to provide the functionality of TestBit(TH1::kCanRebin)
inline some TAxis methods
update stressHistogram to use new methods SetCanRebin and CanRebin
Revision
44507 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by
axel
File length: 6899 byte(s)
Diff to
previous 43736
Remove
using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.
Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.
Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.
Revision
43736 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 13 15:16:34 2012 UTC (2 years, 9 months ago) by
pcanal
File length: 6894 byte(s)
Diff to
previous 36506
Since the TAxis copy constructor exist, implement the assignment operator too (and fix TAxis::Copy to no longer leak memory)
Revision
36506 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 4 20:58:59 2010 UTC (4 years, 2 months ago) by
brun
File length: 6913 byte(s)
Diff to
previous 27982
From Chris Crawford. see : https://savannah.cern.ch/patch/?3978
Implement a new function (also in context menu)
void TAxis::ZoomOut(Double_t factor, Double_t offset)
// Zoom out by a factor of 'factor' (default =2)
// uses previous zoom factor by default
// Keep center defined by 'offset' fixed
// ie. -1 at left of current range, 0 in center, +1 at right
Revision
27982 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Mar 28 19:05:50 2009 UTC (5 years, 9 months ago) by
brun
File length: 6833 byte(s)
Diff to
previous 22694
Implement a new function as suggested at http://root.cern.ch/phpBB2/viewtopic.php?t=8263
Double_t TAxis::GetBinCenterLog(Int_t bin) const
{
// Return center of bin in log
// With a log-equidistant binning for a bin with low and up edges, the mean is :
// 0.5*(ln low + ln up) i.e. sqrt(low*up) in logx (e.g. sqrt(10^0*10^2) = 10).
//Imagine a bin with low=1 and up=100 :
// - the center in lin is (100-1)/2=50.5
// - the center in log would be sqrt(1*100)=10 (!=log(50.5))
// NB: if the low edge of the bin is negative, the function returns the bin center
// as computed by TAxis::GetBinCenter
Revision
15672 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 3 16:10:46 2006 UTC (8 years, 6 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 6869 byte(s)
Diff to
previous 15134
from Axel:
Change the signature of SavePrimitive from
void SavePrimitive(ofstream &out, Option_t *option);
to
void SavePrimitive(ostream &out, Option_t *option = "");
With this change one can do, eg
myhist.SavePrimitive(std::cout);
WARNING: do rm -f tree/src/*.o
Revision
15134 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 6870 byte(s)
Diff to
previous 15085
From Federico Carminati:
"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."
Revision
13485 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Dec 4 10:51:27 2005 UTC (9 years, 1 month ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 7063 byte(s)
Diff to
previous 9838
Replace all references to Axis_t and Stat_t by Double_t in all histogram classes.
Following several recent requests, implement new functions
to search the bin with a specified content.
Double_t TH1::GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx, Int_t lastx,Double_t maxdiff) const
{
// compute first binx in the range [firstx,lastx] for which
// diff = abs(bin_content-c) <= maxdiff
// In case several bins in the specified range with diff=0 are found
// the first bin found is returned in binx.
// In case several bins in the specified range satisfy diff <=maxdiff
// the bin with the smallest difference is returned in binx.
// In all cases the function returns the smallest difference.
//
// NOTE1: if firstx <= 0, firstx is set to bin 1
// if (lastx < firstx then firstx is set to the number of bins
// ie if firstx=0 and lastx=0 (default) the search is on all bins.
// NOTE2: if maxdiff=0 (default), the first bin with content=c is returned.
Double_t TH2::GetBinWithContent2(Double_t c, Int_t &binx, Int_t &biny, Int_t firstx, Int_t lastx, Int_t firsty, Int_t lasty, Double_t maxdiff) const
{
// compute first cell (binx,biny) in the range [firstx,lastx](firsty,lasty] for which
// diff = abs(cell_content-c) <= maxdiff
// In case several cells in the specified range with diff=0 are found
// the first cell found is returned in binx,biny.
// In case several cells in the specified range satisfy diff <=maxdiff
// the cell with the smallest difference is returned in binx,biny.
// In all cases the function returns the smallest difference.
//
// NOTE1: if firstx <= 0, firstx is set to bin 1
// if (lastx < firstx then firstx is set to the number of bins in X
// ie if firstx=0 and lastx=0 (default) the search is on all bins in X.
// if firsty <= 0, firsty is set to bin 1
// if (lasty < firsty then firsty is set to the number of bins in Y
// ie if firsty=0 and lasty=0 (default) the search is on all bins in Y.
// NOTE2: if maxdiff=0 (default), the first cell with content=c is returned.
Double_t TH3::GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny, Int_t &binz, Int_t firstx, Int_t lastx, Int_t firsty, Int_t lasty, Int_t firstz, Int_t lastz, Double_t maxdiff) const
{
// compute first cell (binx,biny,binz) in the range [firstx,lastx](firsty,lasty][firstz,lastz] for which
// diff = abs(cell_content-c) <= maxdiff
// In case several cells in the specified range with diff=0 are found
// the first cell found is returned in binx,biny,binz.
// In case several cells in the specified range satisfy diff <=maxdiff
// the cell with the smallest difference is returned in binx,biny,binz.
// In all cases the function returns the smallest difference.
//
// NOTE1: if firstx <= 0, firstx is set to bin 1
// if (lastx < firstx then firstx is set to the number of bins in X
// ie if firstx=0 and lastx=0 (default) the search is on all bins in X.
// if firsty <= 0, firsty is set to bin 1
// if (lasty < firsty then firsty is set to the number of bins in Y
// ie if firsty=0 and lasty=0 (default) the search is on all bins in Y.
// if firstz <= 0, firstz is set to bin 1
// if (lastz < firstz then firstz is set to the number of bins in Z
// ie if firstz=0 and lastz=0 (default) the search is on all bins in Z.
// NOTE2: if maxdiff=0 (default), the first cell with content=c is returned.
Revision
9217 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 16 08:23:27 2004 UTC (10 years, 7 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 6823 byte(s)
Diff to
previous 8376
In TAxis class
==============
Add a new data member
UShort_t fBits2; //second bit status word
Add new enum kDecimals
Add new functions:
Bool_t GetDecimals() const;
virtual void SetDecimals(Bool_t dot=kTRUE); // *TOGGLE*
// Set the Decimals flag
// By default, blank characters are stripped, and then the
// label is correctly aligned. The dot, if last character of the string,
// is also stripped, unless this option is specified.
// One can disable the option by calling axis.SetDecimals(kTRUE).
// The flag (in fBits2) is passed to the drawing function TGaxis::PaintAxis
in TGaxis class
===============
Add new function:
virtual void SetDecimals(Bool_t dot=kTRUE);
(same as TAxis::SetDecimals)
Modify TGaxis::PaintAxis to take into account the SetDecimals:
// Format of labels.
// -----------------
//
// Blank characters are stripped, and then the
// label is correctly aligned. the dot, if last
// character of the string, is also stripped,
// unless the option "." (a dot, or period) is specified.
// if SetDecimals(kTRUE) has been called (bit TAxis::kDecimals set).
// all labels have the same number of decimals after the "."
// The same is true if gStyle->SetStripDecimals(kFALSE) has been called.
Revision
7654 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 25 17:12:30 2003 UTC (11 years, 2 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 6174 byte(s)
Diff to
previous 7266
From Olivier:
Implement suggestion from Damir Buskulic:
- Take into account the decimal part of the time offset.
- New parameter "option" in SetTimeOffset. Default value is "local"
meaning the time offset should be consider as a local time. It can
be set to "gmt" meaning the time offset should be consider as GMT time.
Revision
7266 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 12 09:18:01 2003 UTC (11 years, 4 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 6148 byte(s)
Diff to
previous 6413
Add new function TAxis::SetMoreLogLabels to draw more labels in case
of an axis in log scale with a small number of decades.
The options is kept in TAxis via the new bit kMoreLogLabels.
The corresponding changes in TGaxis to automatically import the TAxis option.
The bits in TGaxis duplicating the bits in TAxis have been removed.
The new function SetMoreLogLabels is visible in the TAxis context menu.
Revision
5543 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 5 11:37:36 2002 UTC (12 years, 2 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 5887 byte(s)
Diff to
previous 5518
Add a new option in TAxis and TGaxis to center the bin labels
on the center of the bin instead of the tick marks.
This option makes sense only when the number of bins is equal
to the number of tick marks.
The new function TAxis::CenterLabels sets the bit kCenterLabels.
CenterLabels is visible in the TAxis context menu.
Revision
3866 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Feb 4 23:27:43 2002 UTC (12 years, 11 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 5753 byte(s)
Diff to
previous 3673
Add new options in the TAxis enum:
kTickPlus = BIT(9),
kTickMinus = BIT(10)
Add new functions:
virtual const char *GetTicks() const;
virtual void SetTicks(Option_t *option="+"); // *MENU*
void TAxis::SetTicks(Option_t *option)
{
// set ticks orientation
// option = "+" ticks drawn on the "positive side" (default)
// option = "-" ticks drawn on the "negative side"
// option = "+-" ticks drawn on both sides
Revision
3550 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 2 21:43:13 2002 UTC (13 years ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 5522 byte(s)
Diff to
previous 3441
Add new member THashList* fLabels.
Add new enum: kLabelsHori, kLabelsVert, kLabelsDown, kLabelsUp.
Increment class version to 7.
Add new functions:
Int_t FindBin(const char *label);
const char *GetBinLabel(Int_t bin) const;
THashList *GetLabels() {return fLabels;}
void LabelsOption(Option_t *option="h"); // *MENU*
void SetBinLabel(Int_t bin, const char *label);
Revision
3158 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Nov 3 16:51:35 2001 UTC (13 years, 2 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 4936 byte(s)
Diff to
previous 3143
Add new function TAxis::SetRangeUser(Axis_t ufirst, Axis_t ulast).
This function is a shortcut calling TAxis::SetRange(Int_t binfirst, Int_t binlast).
The new function is visible in the context menu.
Revision
3143 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Oct 31 11:21:26 2001 UTC (13 years, 2 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 4857 byte(s)
Diff to
previous 3127
Add a new enum member kNoExponent and a new function TAxis::SetNoExponent.
The function may be called to prevent an exponent (10^N) to be used
when drawing the axis via TGaxis.
The new function is declared in the context menu.
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/TAxis.h
File length: 4646 byte(s)
Diff to
previous 957
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.
Revision
213 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 15 06:51:49 2000 UTC (14 years, 7 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 4580 byte(s)
Diff to
previous 130
Added new constructors and functions to support both Float_t* and Double_t*
virtual void TAxis::Set(Int_t nbins, Float_t *xbins);
virtual void TAxis::Set(Int_t nbins, Double_t *xbins);
TH1(const char *name,const char *title,Int_t nbinsx,Float_t *xbins);
TH1(const char *name,const char *title,Int_t nbinsx,Double_t *xbins);
TH1C(const char *name,const char *title,Int_t nbinsx,Float_t *xbins);
TH1C(const char *name,const char *title,Int_t nbinsx,Double_t *xbins);
TH1S(const char *name,const char *title,Int_t nbinsx,Float_t *xbins);
TH1S(const char *name,const char *title,Int_t nbinsx,Double_t *xbins);
TH1F(const char *name,const char *title,Int_t nbinsx,Float_t *xbins);
TH1F(const char *name,const char *title,Int_t nbinsx,Double_t *xbins);
TH1D(const char *name,const char *title,Int_t nbinsx,Float_t *xbins);
TH1D(const char *name,const char *title,Int_t nbinsx,Double_t *xbins);
TH2(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins);
TH2(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins);
TH2C(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins);
TH2C(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins);
TH2S(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins);
TH2S(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins);
TH2F(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins);
TH2F(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins);
TH2D(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins);
TH2D(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins);
TH3(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins
,Int_t nbinsz,Float_t *zbins);
TH3(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins
,Int_t nbinsz,Double_t *zbins);
TH3C(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins
,Int_t nbinsz,Float_t *zbins);
TH3C(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins
,Int_t nbinsz,Double_t *zbins);
TH3S(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins
,Int_t nbinsz,Float_t *zbins);
TH3S(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins
,Int_t nbinsz,Double_t *zbins);
TH3F(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins
,Int_t nbinsz,Float_t *zbins);
TH3F(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins
,Int_t nbinsz,Double_t *zbins);
TH3D(const char *name,const char *title,Int_t nbinsx,Float_t *xbins
,Int_t nbinsy,Float_t *ybins
,Int_t nbinsz,Float_t *zbins);
TH3D(const char *name,const char *title,Int_t nbinsx,Double_t *xbins
,Int_t nbinsy,Double_t *ybins
,Int_t nbinsz,Double_t *zbins);
Revision
130 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 13 10:34:10 2000 UTC (14 years, 7 months ago) by
brun
Original Path:
trunk/hist/inc/TAxis.h
File length: 4522 byte(s)
Diff to
previous 101
- Many changes in the histogramming package to use Double_t instead of Float_t.
TAxis members fXmin, fXmax in double precision. Corresponding Getter/Setter
functions modified:
virtual Int_t FindBin(Axis_t x);
virtual Int_t FindFixBin(Axis_t x);
virtual Axis_t GetBinCenter(Int_t bin);
virtual Axis_t GetBinLowEdge(Int_t bin);
virtual Axis_t GetBinUpEdge(Int_t bin);
virtual Axis_t GetBinWidth(Int_t bin);
virtual void GetCenter(Axis_t *center);
Axis_t GetXmin() const {return fXmin;}
Axis_t GetXmax() const {return fXmax;}
virtual void Set(Int_t nbins, Axis_t xmin, Axis_t xmax);
virtual void Set(Int_t nbins, Axis_t *xbins);
virtual void SetLimits(Axis_t xmin, Axis_t xmax);
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.