FreeHEP API
Version current

hep.aida.ref.histogram
Class Cloud

java.lang.Object
  extended byhep.aida.ref.event.AIDAObservable
      extended byhep.aida.ref.ManagedObject
          extended byhep.aida.ref.histogram.AbstractBaseHistogram
              extended byhep.aida.ref.histogram.Cloud
All Implemented Interfaces:
Connectable, hep.aida.IBaseHistogram, hep.aida.ICloud, hep.aida.dev.IDevManagedObject, hep.aida.IManagedObject, IsObservable
Direct Known Subclasses:
Cloud1D, Cloud2D, Cloud3D

public abstract class Cloud
extends AbstractBaseHistogram
implements hep.aida.ICloud, IsObservable

Source Code:
Cloud.java

Field Summary
protected  int arraySize
           
static int CLOUD_ARRAY_ENTRIES
           
protected  int maxEntries
           
protected  int validEntries
           
 
Fields inherited from class hep.aida.ref.ManagedObject
fillable
 
Fields inherited from class hep.aida.ref.event.AIDAObservable
connectionDidChange, isConnected, isValid
 
Constructor Summary
protected Cloud(String name, String title, int dimension, int maxEntries, String options)
          Create a Cloud.
 
Method Summary
protected  boolean autoConvert()
          Check if the Cloud is set to convert to an Histogram automatically.
abstract  void convertToHistogram()
          Convert the ICloud to an IHistogram using the default number of bins.
protected  EventObject createEvent()
           
 String getOptions()
          Get the options with which the Cloud was created.
protected abstract  hep.aida.IHistogram hist()
           
 void initCloud(int maxEntries, String options)
           
abstract  boolean isConverted()
          Check if the ICloud has been converted to an IHistogram.
protected  double margin()
           
 int maxEntries()
          Get the maximum number of entries after which the Cloud will convert to an Histogram.
 int nanEntries()
          Number of entries whose coordinate or weight is NaN.
 void reset()
          Reset the histogram; as if just created.
abstract  void scale(double scaleFactor)
          Scale the weights by a given factor.
abstract  double sumOfWeights()
          Get the sum of weights of of all the entries
 
Methods inherited from class hep.aida.ref.histogram.AbstractBaseHistogram
annotation, dimension, entries, setAnnotation, setTitle, title
 
Methods inherited from class hep.aida.ref.ManagedObject
isFillable, name, setFillable, setName, type
 
Methods inherited from class hep.aida.ref.event.AIDAObservable
addListener, fireStateChanged, fireStateChanged, fireStateChanged, isConnected, removeAllListeners, removeListener, setConnected, setIsValidAfterNotify, setValid, setValidForAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, entries, setTitle, title
 
Methods inherited from interface hep.aida.ref.event.IsObservable
addListener, removeAllListeners, removeListener, setValid
 
Methods inherited from interface hep.aida.ref.event.Connectable
isConnected, setConnected
 

Field Detail

arraySize

protected int arraySize

maxEntries

protected int maxEntries

CLOUD_ARRAY_ENTRIES

public static final int CLOUD_ARRAY_ENTRIES
See Also:
Constant Field Values

validEntries

protected int validEntries
Constructor Detail

Cloud

protected Cloud(String name,
                String title,
                int dimension,
                int maxEntries,
                String options)
Create a Cloud.

Parameters:
name - The name of the Cloud as a ManagedObject.
title - The title of the Cloud.
dimension - The Cloud's dimension.
maxEntries - The maximum number of entries after which the Cloud will convert to a Histogram. If maxEntries is negative the Cloud will not convert automatically.
options - A String containing options (e.g. "autoconvert=false")
Method Detail

createEvent

protected EventObject createEvent()
Overrides:
createEvent in class AIDAObservable

reset

public void reset()
Reset the histogram; as if just created.

Specified by:
reset in interface hep.aida.IBaseHistogram
Overrides:
reset in class AbstractBaseHistogram

sumOfWeights

public abstract double sumOfWeights()
Get the sum of weights of of all the entries

Specified by:
sumOfWeights in interface hep.aida.ICloud
Returns:
The sum of the weights of all the entries.

convertToHistogram

public abstract void convertToHistogram()
Convert the ICloud to an IHistogram using the default number of bins.

Specified by:
convertToHistogram in interface hep.aida.ICloud

isConverted

public abstract boolean isConverted()
Check if the ICloud has been converted to an IHistogram.

Specified by:
isConverted in interface hep.aida.ICloud
Returns:
true if it has been converted.

scale

public abstract void scale(double scaleFactor)
Scale the weights by a given factor.

Specified by:
scale in interface hep.aida.ICloud
Parameters:
scaleFactor - The scale factor.

autoConvert

protected boolean autoConvert()
Check if the Cloud is set to convert to an Histogram automatically.

Returns:
true if it will convert automatically, false otherwise.

maxEntries

public int maxEntries()
Get the maximum number of entries after which the Cloud will convert to an Histogram.

Specified by:
maxEntries in interface hep.aida.ICloud
Returns:
The maximum number of entries.

getOptions

public String getOptions()
Get the options with which the Cloud was created.

Returns:
The String of options.

initCloud

public void initCloud(int maxEntries,
                      String options)

margin

protected double margin()

hist

protected abstract hep.aida.IHistogram hist()

nanEntries

public int nanEntries()
Description copied from class: AbstractBaseHistogram
Number of entries whose coordinate or weight is NaN. Such entries are counted as allEntries but don't contribute to the statistics.

Specified by:
nanEntries in interface hep.aida.IBaseHistogram
Specified by:
nanEntries in class AbstractBaseHistogram
Returns:
The number of entries whose value or weight is NaN.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.