All Packages Class Hierarchy This Package Previous Next Index
Class hep.analysis.Histogram
java.lang.Object
|
+----hep.analysis.Histogram
- public class Histogram
- extends Object
- implements NamedObject
Class Histogram is used by user analysis programs to create and fill a wide
variety of histograms. Histograms must each have unique names assigned to
them at creation time.
Each histogram must have its own partition. You can set the partition using
the setPartition()
method, but if you don't, a default partition
will be selected the first time you invoke a fill(..)
method.
The partition used will depend on which fill method you call. See the notes on
the individual fill(..)
methods below to see which default
partitions are used.
- See Also:
- setPartition
-
Histogram(String)
- Create a new histogram.
-
Histogram(String, HistogramFolder)
- Create a new histogram in a folder.
-
fill(Date)
-
Fill a histogram with a single date.
-
fill(Date, double)
-
Fill a histogram with a single date.
-
fill(double)
-
Fill a histogram with a single double.
-
fill(double, double)
-
Fill a histogram with a single double.
-
fill(int)
-
Fill a histogram with a single int.
-
fill(int, double)
-
Fill a histogram with a single int.
-
fill(String)
-
Fill a histogram with a single string.
-
fill(String, double)
-
Fill a histogram with a single string.
-
find(String)
- Returns the Histogram object with the given name.
-
find(String, HistogramFolder)
- Returns the Histogram object with the given name.
-
getArea()
- Invokes the corresponding method on the current partition.
-
getBin(int)
- Invokes the corresponding method on the current partition.
-
getBinAt(Date)
- Invokes the corresponding method on the current partition.
-
getBinAt(double)
- Invokes the corresponding method on the current partition.
-
getBinAt(int)
- Invokes the corresponding method on the current partition.
-
getBinAt(String)
- Invokes the corresponding method on the current partition.
-
getBins()
- Invokes the corresponding method on the current partition.
-
getEntries()
- Invokes the corresponding method on the current partition.
-
getError(int)
- Invokes the corresponding method on the current partition.
-
getMean()
- Invokes the corresponding method on the current partition.
-
getMinusError(int)
- Invokes the corresponding method on the current partition.
-
getMinusErrors()
- Invokes the corresponding method on the current partition.
-
getName()
-
-
getOverflow()
- Invokes the corresponding method on the current partition.
-
getPartition()
- Returns the partition used by this histogram.
-
getPeer()
-
-
getPlusError(int)
- Invokes the corresponding method on the current partition.
-
getPlusErrors()
- Invokes the corresponding method on the current partition.
-
getRMS()
- Invokes the corresponding method on the current partition.
-
getUnderflow()
- Invokes the corresponding method on the current partition.
-
hasAsymmetricErrorBars()
- Invokes the corresponding method on the current partition.
-
partitionDestroyedNotify()
- Notifies the histogram that the partition has been destroyed.
-
setPartition(Abstract1DPartition)
- Use this method to set the partition for this histogram.
-
setPeer(NamedObjectPeer)
-
Histogram
public Histogram(String name)
- Create a new histogram.
- Parameters:
- name - The name of the histogram. If a histogram of this name
already exists its contents are cleared and a reference
to the previously existing histogram is returned.
Histogram
public Histogram(String name,
HistogramFolder parent)
- Create a new histogram in a folder.
- Parameters:
- name - The name of the histogram. If a histogram of this name
already exists its contents are cleared and a reference
to the previously existing histogram is returned.
- parent - the HistogramFolder in which to store this Hsitogram
fill
public void fill(double x)
- Fill a histogram with a single double. This method creates a SimplePartition
if no partition has been set, and fills the partition with the given value.
- Parameters:
- x - X coordinate
- See Also:
- SimplePartition
fill
public void fill(double x,
double value)
- Fill a histogram with a single double. This method creates a SimplePartition
if no partition has been set, and fills the partition with the given value.
- Parameters:
- x - X coordinate
- value - Value (weight) to be assigned to this fill operation
- See Also:
- SimplePartition
fill
public void fill(int x)
- Fill a histogram with a single int. This method creates a SimpleIntPartition
if no partition has been set, and fills the partition with the given value.
- Parameters:
- x - X coordinate
- See Also:
- SimpleIntPartition
fill
public void fill(int x,
double value)
- Fill a histogram with a single int. This method creates a SimpleIntPartition
if no partition has been set, and fills the partition with the given value.
- Parameters:
- x - X coordinate
- value - Value (weight) to be assigned to this fill operation
- See Also:
- SimpleIntPartition
fill
public void fill(String x)
- Fill a histogram with a single string. This method creates a StringPartition
if no partition has been set, and fills the partition with the given value.
- Parameters:
- x - String value to fill
- See Also:
- StringPartition
fill
public void fill(String x,
double value)
- Fill a histogram with a single string. This method creates a StringPartition
if no partition has been set, and fills the partition with the given value.
- Parameters:
- x - String value to fill
- value - Value (weight) to be assigned to this fill operation
- See Also:
- StringPartition
fill
public void fill(Date x)
- Fill a histogram with a single date. This method creates a SimpleDatePartition
if no partition has been set, and fills the partition with the given value.
- Parameters:
- x - Date value to fill
- See Also:
- SimpleDatePartition
fill
public void fill(Date x,
double value)
- Fill a histogram with a single date. This method creates a SimpleDatePartition
if no partition has been set, and fills the partition with the given value.
- Parameters:
- x - Date value to fill
- value - Value (weight) to be assigned to this fill operation
- See Also:
- SimpleDatePartition
getBinAt
public int getBinAt(double x) throws NoSuchBinException
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getBinAt
getBinAt
public int getBinAt(int x) throws NoSuchBinException
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getBinAt
getBinAt
public int getBinAt(String x) throws NoSuchBinException
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getBinAt
getBinAt
public int getBinAt(Date x) throws NoSuchBinException
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getBinAt
getBin
public double getBin(int bin) throws NoSuchBinException
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getBin
hasAsymmetricErrorBars
public boolean hasAsymmetricErrorBars()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, hasAsymmetricErrorBars
getPlusError
public double getPlusError(int bin)
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getPlusError
getMinusError
public double getMinusError(int bin)
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getMinusError
getPlusErrors
public double[] getPlusErrors()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getPlusErrors
getMinusErrors
public double[] getMinusErrors()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getMinusErrors
getError
protected double getError(int bin)
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getError
getBins
public double[] getBins()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getBins
getOverflow
public double getOverflow()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getOverflow
getUnderflow
public double getUnderflow()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getUnderflow
getEntries
public int getEntries()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getEntries
getArea
public double getArea()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getArea
getMean
public double getMean()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getMean
getRMS
public double getRMS()
- Invokes the corresponding method on the current partition.
- See Also:
- getPartition, getRMS
setPartition
public void setPartition(Abstract1DPartition p)
- Use this method to set the partition for this histogram. If
you do not set a partion, a default partition will be used
the first time you call a
fill(..)
method. The
type of partition will depend on which fill(..)
method you use. See the notes on the individual
fill(..)
methods to see which default is used.
partitionDestroyedNotify
public void partitionDestroyedNotify()
- Notifies the histogram that the partition has been destroyed.
getPartition
public Abstract1DPartition getPartition()
- Returns the partition used by this histogram.
getName
public String getName()
find
public static Histogram find(String name)
- Returns the Histogram object with the given name. Looks
in the default folder. If it doesn't find one, it creates it in the current folder.
- Parameters:
- name - the name of the histogram to find
- Returns:
- the Histogram object with the name given by the parameter
name
.
find
public static Histogram find(String name,
HistogramFolder parent)
- Returns the Histogram object with the given name. Looks
in the given folder. If it doesn't find one, it creates it in the named folder.
- Parameters:
- name - the name of the histogram to find
- parent - the folder to look in
- Returns:
- the Histogram object with the name given by the parameter
name
.
getPeer
public NamedObjectPeer getPeer()
setPeer
public void setPeer(NamedObjectPeer peer)
All Packages Class Hierarchy This Package Previous Next Index