AIDA API
Version 3.3

hep.aida
Interface ICloud1D

All Superinterfaces:
IBaseHistogram, ICloud

public interface ICloud1D
extends ICloud

User level interface to a 1D Cloud.

Author:
The AIDA team (http://aida.freehep.org/)

Method Summary
 void convert(double[] binEdges)
          Convert internally the ICloud1D to an IHistogram1D with given bin edges.
 void convert(int nBins, double lowerEdge, double upperEdge)
          Convert internally the ICloud1D to an IHistogram1D with given number of bins, upper edge and lower edge.
 void fill(double x)
          Fill the ICloud1D with a value and a corresponding weight.
 void fill(double x, double weight)
          Fill the ICloud1D with a value and a corresponding weight.
 void fillHistogram(IHistogram1D hist)
          Project the ICloud1D on an IHistogram1D.
 IHistogram1D histogram()
          Get the internal IHistogram1D in which the ICloud1D converted to.
 double lowerEdge()
          Get the lower edge of the ICloud1D.
 double mean()
          Get the mean of the ICloud1D.
 double rms()
          Get the RMS of the ICloud1D.
 void setConversionParameters(int bins, double lowerEdge, double upperEdge)
          Set the parameters for the ICloud conversion to an IHistogram.
 double upperEdge()
          Get the upper edge of the ICloud1D.
 double value(int index)
          Get the value corresponding to a given entry.
 double weight(int index)
          Get the weight corresponding to a given entry.
 
Methods inherited from interface hep.aida.ICloud
convertToHistogram, isConverted, maxEntries, scale, sumOfWeights
 
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, entries, nanEntries, reset, setTitle, title
 

Method Detail

fill

public void fill(double x)
          throws IllegalArgumentException
Fill the ICloud1D with a value and a corresponding weight. If either the value or the weight is NaN the entry will be recorded but it will not contribue to the statistics.

Parameters:
x - The value.
Throws:
IllegalArgumentException - If the ICloud1D is full or if the weight's value is not between 0 and 1.

fill

public void fill(double x,
                 double weight)
          throws IllegalArgumentException
Fill the ICloud1D with a value and a corresponding weight. If either the value or the weight is NaN the entry will be recorded but it will not contribue to the statistics.

Parameters:
x - The value.
weight - The corresponding weight. By default it is 1.
Throws:
IllegalArgumentException - If the ICloud1D is full or if the weight's value is not between 0 and 1.

lowerEdge

public double lowerEdge()
Get the lower edge of the ICloud1D.

Returns:
The lower edge.

upperEdge

public double upperEdge()
Get the upper edge of the ICloud1D.

Returns:
The upper edge.

value

public double value(int index)
             throws AlreadyConvertedException
Get the value corresponding to a given entry.

Parameters:
index - The entry's index.
Returns:
The value of the index-th entry.
Throws:
AlreadyConvertedException - If the ICloud1D has already been converted.

weight

public double weight(int index)
              throws AlreadyConvertedException
Get the weight corresponding to a given entry.

Parameters:
index - The entry's index.
Returns:
The weight of the index-th entry.
Throws:
AlreadyConvertedException - If the ICloud has already been converted.

mean

public double mean()
Get the mean of the ICloud1D.

Returns:
The mean.

rms

public double rms()
Get the RMS of the ICloud1D.

Returns:
The RMS.

convert

public void convert(int nBins,
                    double lowerEdge,
                    double upperEdge)
             throws AlreadyConvertedException
Convert internally the ICloud1D to an IHistogram1D with given number of bins, upper edge and lower edge.

Parameters:
nBins - The number of bins.
lowerEdge - The lower edge.
upperEdge - The upper edge.
Throws:
AlreadyConvertedException - If the ICloud1D has already been converted.

convert

public void convert(double[] binEdges)
             throws AlreadyConvertedException
Convert internally the ICloud1D to an IHistogram1D with given bin edges.

Parameters:
binEdges - The bins edges.
Throws:
AlreadyConvertedException - If the ICloud1D has already been converted.

histogram

public IHistogram1D histogram()
                       throws RuntimeException
Get the internal IHistogram1D in which the ICloud1D converted to.

Returns:
The histogram.
Throws:
RuntimeException - If the ICloud1D did not convert either automatically or because of a convert() method invocation.

fillHistogram

public void fillHistogram(IHistogram1D hist)
                   throws RuntimeException
Project the ICloud1D on an IHistogram1D.

Parameters:
hist - The IHistogram1D to be filled.
Throws:
RuntimeException - If the ICloud1D is already converted.

setConversionParameters

public void setConversionParameters(int bins,
                                    double lowerEdge,
                                    double upperEdge)
                             throws IllegalArgumentException
Set the parameters for the ICloud conversion to an IHistogram.

Parameters:
bins - The number of bins of the conversion IHistogram.
lowerEdge - The lower edge of the conversion IHistogram.
upperEdge - The upper edge of the conversion IHistogram.
Throws:
IllegalArgumentException

AIDA API
Version 3.3

Copyright © 2000-2004 AIDA Team, All Rights Reserved.