Log of /trunk/hist/hist/src/TH1K.cxx
Parent Directory
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: 6836 byte(s)
Diff to
previous 35245
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
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/src/TH1K.cxx
File length: 6824 byte(s)
Diff to
previous 15082
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
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/src/TH1K.cxx
File length: 7396 byte(s)
Diff to
previous 7071
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
7071 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 11 08:27:12 2003 UTC (11 years, 5 months ago) by
brun
Original Path:
trunk/hist/src/TH1K.cxx
File length: 7385 byte(s)
Diff to
previous 3748
Add a new static member
Bool_t fgStatOverflows;
and a corresponding setter
static void StatOverflows(Bool_t flag=kTRUE)
All histogram Fill functions modified to test this new flag.
By default the flag is off.
Note that the mean value/RMS is computed using the bins in the currently
defined range (see TAxis::SetRange). By default the range includes
all bins from 1 to nbins included, excluding underflows and overflows.
To force the underflows and overflows in the computation, one must
call the static function TH1::StatOverflows(kTRUE) before filling
the histogram.
Revision
1655 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Wed Feb 21 15:23:16 2001 UTC (13 years, 11 months ago) by
brun
Original Path:
trunk/hist/src/TH1K.cxx
File length: 5588 byte(s)
New class TH1K developed by Victor Perevoztchikov <perev@bnl.gov>.
//*-* TH1K class supports the nearest K Neighbours method,
//*-* widely used in cluster analysis.
//*-* This method is especially useful for small statistics.
//*-*
//*-* In this method :
//*-* DensityOfProbability ~ 1/DistanceToNearestKthNeighbour
//*-*
//*-* Ctr TH1K::TH1K(name,title,nbins,xlow,xup,K=0)
//*-* differs from TH1F only by "K"
//*-* K - is the order of K Neighbours method, usually >=3
//*-* K = 0, means default, where K is selected by TH1K in such a way
//*-* that DistanceToNearestKthNeighbour > BinWidth and K >=3
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.