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

Constructor Index

 o Histogram(String)
Create a new histogram.
 o Histogram(String, HistogramFolder)
Create a new histogram in a folder.

Method Index

 o fill(Date)
Fill a histogram with a single date.
 o fill(Date, double)
Fill a histogram with a single date.
 o fill(double)
Fill a histogram with a single double.
 o fill(double, double)
Fill a histogram with a single double.
 o fill(int)
Fill a histogram with a single int.
 o fill(int, double)
Fill a histogram with a single int.
 o fill(String)
Fill a histogram with a single string.
 o fill(String, double)
Fill a histogram with a single string.
 o find(String)
Returns the Histogram object with the given name.
 o find(String, HistogramFolder)
Returns the Histogram object with the given name.
 o getArea()
Invokes the corresponding method on the current partition.
 o getBin(int)
Invokes the corresponding method on the current partition.
 o getBinAt(Date)
Invokes the corresponding method on the current partition.
 o getBinAt(double)
Invokes the corresponding method on the current partition.
 o getBinAt(int)
Invokes the corresponding method on the current partition.
 o getBinAt(String)
Invokes the corresponding method on the current partition.
 o getBins()
Invokes the corresponding method on the current partition.
 o getEntries()
Invokes the corresponding method on the current partition.
 o getError(int)
Invokes the corresponding method on the current partition.
 o getMean()
Invokes the corresponding method on the current partition.
 o getMinusError(int)
Invokes the corresponding method on the current partition.
 o getMinusErrors()
Invokes the corresponding method on the current partition.
 o getName()
 o getOverflow()
Invokes the corresponding method on the current partition.
 o getPartition()
Returns the partition used by this histogram.
 o getPeer()
 o getPlusError(int)
Invokes the corresponding method on the current partition.
 o getPlusErrors()
Invokes the corresponding method on the current partition.
 o getRMS()
Invokes the corresponding method on the current partition.
 o getUnderflow()
Invokes the corresponding method on the current partition.
 o hasAsymmetricErrorBars()
Invokes the corresponding method on the current partition.
 o partitionDestroyedNotify()
Notifies the histogram that the partition has been destroyed.
 o setPartition(Abstract1DPartition)
Use this method to set the partition for this histogram.
 o setPeer(NamedObjectPeer)

Constructors

 o 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.
 o 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

Methods

 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o getBinAt
 public int getBinAt(double x) throws NoSuchBinException
Invokes the corresponding method on the current partition.

See Also:
getPartition, getBinAt
 o getBinAt
 public int getBinAt(int x) throws NoSuchBinException
Invokes the corresponding method on the current partition.

See Also:
getPartition, getBinAt
 o getBinAt
 public int getBinAt(String x) throws NoSuchBinException
Invokes the corresponding method on the current partition.

See Also:
getPartition, getBinAt
 o getBinAt
 public int getBinAt(Date x) throws NoSuchBinException
Invokes the corresponding method on the current partition.

See Also:
getPartition, getBinAt
 o getBin
 public double getBin(int bin) throws NoSuchBinException
Invokes the corresponding method on the current partition.

See Also:
getPartition, getBin
 o hasAsymmetricErrorBars
 public boolean hasAsymmetricErrorBars()
Invokes the corresponding method on the current partition.

See Also:
getPartition, hasAsymmetricErrorBars
 o getPlusError
 public double getPlusError(int bin)
Invokes the corresponding method on the current partition.

See Also:
getPartition, getPlusError
 o getMinusError
 public double getMinusError(int bin)
Invokes the corresponding method on the current partition.

See Also:
getPartition, getMinusError
 o getPlusErrors
 public double[] getPlusErrors()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getPlusErrors
 o getMinusErrors
 public double[] getMinusErrors()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getMinusErrors
 o getError
 protected double getError(int bin)
Invokes the corresponding method on the current partition.

See Also:
getPartition, getError
 o getBins
 public double[] getBins()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getBins
 o getOverflow
 public double getOverflow()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getOverflow
 o getUnderflow
 public double getUnderflow()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getUnderflow
 o getEntries
 public int getEntries()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getEntries
 o getArea
 public double getArea()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getArea
 o getMean
 public double getMean()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getMean
 o getRMS
 public double getRMS()
Invokes the corresponding method on the current partition.

See Also:
getPartition, getRMS
 o 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.

 o partitionDestroyedNotify
 public void partitionDestroyedNotify()
Notifies the histogram that the partition has been destroyed.

 o getPartition
 public Abstract1DPartition getPartition()
Returns the partition used by this histogram.

 o getName
 public String getName()
 o 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.
 o 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.
 o getPeer
 public NamedObjectPeer getPeer()
 o setPeer
 public void setPeer(NamedObjectPeer peer)

All Packages  Class Hierarchy  This Package  Previous  Next  Index