FreeHEP API
Version current

hep.aida.ref.histogram
Class DataPointSet

java.lang.Object
  extended byhep.aida.ref.event.AIDAObservable
      extended byhep.aida.ref.ManagedObject
          extended byhep.aida.ref.histogram.DataPointSet
All Implemented Interfaces:
AIDAListener, Connectable, hep.aida.IDataPointSet, hep.aida.dev.IDevManagedObject, hep.aida.IManagedObject, IsObservable

public class DataPointSet
extends ManagedObject
implements hep.aida.IDataPointSet, IsObservable, AIDAListener

Basic user-level interface class for holding and managing a single set of "data points".

Author:
The AIDA team @ SLAC.
Source Code:
DataPointSet.java

Field Summary
 
Fields inherited from class hep.aida.ref.ManagedObject
fillable
 
Fields inherited from class hep.aida.ref.event.AIDAObservable
connectionDidChange, isConnected, isValid
 
Constructor Summary
protected DataPointSet()
           
  DataPointSet(String name, String title, int dimOfPoints)
           
  DataPointSet(String name, String title, int dimOfPoints, int defaultCapacity)
           
  DataPointSet(String name, String title, int dimOfPoints, int defaultCapacity, String options)
           
  DataPointSet(String name, String title, int dimOfPoints, String options)
           
 
Method Summary
 hep.aida.IDataPoint addPoint()
           
 void addPoint(hep.aida.IDataPoint point)
           
 hep.aida.IAnnotation annotation()
           
 void clear()
           
protected  EventObject createEvent()
           
 int dimension()
           
protected  void finalize()
           
 double lowerExtent(int coord)
           
 hep.aida.IDataPoint point(int index)
           
 void removePoint(int index)
           
 void scale(double scaleFactor)
           
 void scaleErrors(double scaleFactor)
           
 void scaleValues(double scaleFactor)
           
 void setAnnotation(hep.aida.IAnnotation annotation)
           
 void setCoordinate(int coord, double[] values, double[] errors)
           
 void setCoordinate(int coord, double[] values, double[] errp, double[] errm)
           
protected  void setDimension(int dimOfPoints)
          Non-AIDA methods.
 void setPoint(int index, hep.aida.IDataPoint point)
          Set the IDataPoint at a give index in the set.
 void setTitle(String title)
           
 int size()
           
 void stateChanged(EventObject e)
           
 String title()
           
 double upperExtent(int coord)
           
 
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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.aida.ref.event.IsObservable
addListener, removeAllListeners, removeListener, setValid
 
Methods inherited from interface hep.aida.ref.event.Connectable
isConnected, setConnected
 

Constructor Detail

DataPointSet

protected DataPointSet()

DataPointSet

public DataPointSet(String name,
                    String title,
                    int dimOfPoints)

DataPointSet

public DataPointSet(String name,
                    String title,
                    int dimOfPoints,
                    int defaultCapacity)

DataPointSet

public DataPointSet(String name,
                    String title,
                    int dimOfPoints,
                    String options)

DataPointSet

public DataPointSet(String name,
                    String title,
                    int dimOfPoints,
                    int defaultCapacity,
                    String options)
Method Detail

createEvent

protected EventObject createEvent()
Overrides:
createEvent in class AIDAObservable

annotation

public hep.aida.IAnnotation annotation()
Specified by:
annotation in interface hep.aida.IDataPointSet

setAnnotation

public void setAnnotation(hep.aida.IAnnotation annotation)

title

public String title()
Specified by:
title in interface hep.aida.IDataPointSet

setTitle

public void setTitle(String title)
              throws IllegalArgumentException
Specified by:
setTitle in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

dimension

public int dimension()
Specified by:
dimension in interface hep.aida.IDataPointSet

clear

public void clear()
Specified by:
clear in interface hep.aida.IDataPointSet

size

public int size()
Specified by:
size in interface hep.aida.IDataPointSet

point

public hep.aida.IDataPoint point(int index)
Specified by:
point in interface hep.aida.IDataPointSet

setPoint

public void setPoint(int index,
                     hep.aida.IDataPoint point)
              throws IllegalArgumentException
Set the IDataPoint at a give index in the set. This method is not in the IDataSet interface and is here for efficiency reasons

Parameters:
index - The IDataPoint index.
point - The corresponding IDataPoint to be set at the index
Throws:
IllegalArgumentException - If the index is < 0 or >= size().

addPoint

public hep.aida.IDataPoint addPoint()
                             throws RuntimeException
Specified by:
addPoint in interface hep.aida.IDataPointSet
Throws:
RuntimeException

addPoint

public void addPoint(hep.aida.IDataPoint point)
              throws IllegalArgumentException
Specified by:
addPoint in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

removePoint

public void removePoint(int index)
                 throws IllegalArgumentException
Specified by:
removePoint in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

lowerExtent

public double lowerExtent(int coord)
                   throws IllegalArgumentException
Specified by:
lowerExtent in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

upperExtent

public double upperExtent(int coord)
                   throws IllegalArgumentException
Specified by:
upperExtent in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

scale

public void scale(double scaleFactor)
           throws IllegalArgumentException
Specified by:
scale in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

scaleValues

public void scaleValues(double scaleFactor)
                 throws IllegalArgumentException
Specified by:
scaleValues in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

scaleErrors

public void scaleErrors(double scaleFactor)
                 throws IllegalArgumentException
Specified by:
scaleErrors in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

setCoordinate

public void setCoordinate(int coord,
                          double[] values,
                          double[] errors)
                   throws IllegalArgumentException
Specified by:
setCoordinate in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

setCoordinate

public void setCoordinate(int coord,
                          double[] values,
                          double[] errp,
                          double[] errm)
                   throws IllegalArgumentException
Specified by:
setCoordinate in interface hep.aida.IDataPointSet
Throws:
IllegalArgumentException

setDimension

protected void setDimension(int dimOfPoints)
Non-AIDA methods.


finalize

protected void finalize()
                 throws Throwable
Throws:
Throwable

stateChanged

public void stateChanged(EventObject e)
Specified by:
stateChanged in interface AIDAListener

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.