FreeHEP API
Version current

hep.aida.ref.remote
Class RemoteHistogram1D

java.lang.Object
  extended byhep.aida.ref.event.AIDAObservable
      extended byhep.aida.ref.ManagedObject
          extended byhep.aida.ref.remote.RemoteManagedObject
              extended byhep.aida.ref.remote.RemoteHistogram1D
All Implemented Interfaces:
Connectable, hep.aida.IBaseHistogram, hep.aida.dev.IDevManagedObject, hep.aida.IHistogram, hep.aida.IHistogram1D, hep.aida.IManagedObject, IsObservable
Direct Known Subclasses:
RemoteProfile1D

public class RemoteHistogram1D
extends RemoteManagedObject
implements hep.aida.IHistogram1D

This is implementation of IHistogram1D that can not be modified by the user. This is a simple implementation that does not guarantee internal consistency. So extra care should be taken when setting data for this class. This Class is designed to work with the IDevMutableStore, but can work with other Stores - overwrite makeSureDataIsValid() method. Don't forget to call "setDataValid" after you fill new data, as only this method fires events to notify AIDAListeners about change. Also please note that in our current AIDA implementation: UNDERFLOW_BIN = -2, OVERFLOW_BIN = -1, bins = [0, nBins-1] But we keep them here as: UNDERFLOW_BIN = 0, OVERFLOW_BIN = nBins+1, bins = [1, nBins]

Author:
serbo
Source Code:
RemoteHistogram1D.java

Field Summary
 
Fields inherited from class hep.aida.ref.remote.RemoteManagedObject
aidaType, dataIsValid, DEFAULT_DOUBLE, DEFAULT_FLOAT, DEFAULT_INT, DEFAULT_LONG, remoteLogger, stateDidChange, store, treePath
 
Fields inherited from class hep.aida.ref.ManagedObject
fillable
 
Fields inherited from class hep.aida.ref.event.AIDAObservable
connectionDidChange, isConnected, isValid
 
Constructor Summary
RemoteHistogram1D(IDevMutableStore store, String name)
           
RemoteHistogram1D(IDevMutableStore store, String name, String title, int bins, double min, double max)
           
RemoteHistogram1D(String name)
          Creates a new instance of RemoteHistogram1D
 
Method Summary
 void add(hep.aida.IHistogram1D iHistogram1D)
           
 int allEntries()
           
 hep.aida.IAnnotation annotation()
           
 hep.aida.IAxis axis()
           
 int binEntries(int param)
           
 double binError(int param)
           
 double binHeight(int param)
           
 double binMean(int param)
           
 double binRms(int param)
           
 int coordToIndex(double param)
           
protected  EventObject createEvent()
           
 int dimension()
           
 int entries()
           
 double equivalentBinEntries()
           
 int extraEntries()
           
 void fill(double param)
           
 void fill(double param, double param1)
           
 double maxBinHeight()
           
 double mean()
           
 double minBinHeight()
           
 int nanEntries()
           
 void reset()
           
 double rms()
           
 void scale(double param)
           
 void setAxis(int bins, double min, double max)
           
 void setEntries(int[] h)
           
 void setEquivalentBinEntries(double d)
           
 void setErrors(double[] h)
           
 void setHeights(double[] h)
           
 void setMean(double mean)
           
 void setMeans(double[] h)
           
 void setNanEntries(int i)
           
 void setRms(double rms)
           
 void setRmss(double[] h)
           
 void setTitle(String title)
           
 double sumAllBinHeights()
           
 double sumBinHeights()
           
 double sumExtraBinHeights()
           
 String title()
           
 
Methods inherited from class hep.aida.ref.remote.RemoteManagedObject
getStore, getTreePath, isDataValid, makeSureDataIsValid, setConnected, setDataValid, setStore, setTreeFolder, setValid, setValidForAll, type
 
Methods inherited from class hep.aida.ref.ManagedObject
isFillable, name, setFillable, setName
 
Methods inherited from class hep.aida.ref.event.AIDAObservable
addListener, fireStateChanged, fireStateChanged, fireStateChanged, isConnected, removeAllListeners, removeListener, setIsValidAfterNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.aida.ref.event.IsObservable
addListener, removeAllListeners, removeListener
 
Methods inherited from interface hep.aida.ref.event.Connectable
isConnected
 

Constructor Detail

RemoteHistogram1D

public RemoteHistogram1D(String name)
Creates a new instance of RemoteHistogram1D


RemoteHistogram1D

public RemoteHistogram1D(IDevMutableStore store,
                         String name)

RemoteHistogram1D

public RemoteHistogram1D(IDevMutableStore store,
                         String name,
                         String title,
                         int bins,
                         double min,
                         double max)
Method Detail

createEvent

protected EventObject createEvent()
Overrides:
createEvent in class AIDAObservable

setAxis

public void setAxis(int bins,
                    double min,
                    double max)

setEquivalentBinEntries

public void setEquivalentBinEntries(double d)

setNanEntries

public void setNanEntries(int i)

setRms

public void setRms(double rms)

setMean

public void setMean(double mean)

setHeights

public void setHeights(double[] h)

setEntries

public void setEntries(int[] h)

setErrors

public void setErrors(double[] h)

setMeans

public void setMeans(double[] h)

setRmss

public void setRmss(double[] h)

annotation

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

axis

public hep.aida.IAxis axis()
Specified by:
axis in interface hep.aida.IHistogram1D

dimension

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

mean

public double mean()
Specified by:
mean in interface hep.aida.IHistogram1D

rms

public double rms()
Specified by:
rms in interface hep.aida.IHistogram1D

equivalentBinEntries

public double equivalentBinEntries()
Specified by:
equivalentBinEntries in interface hep.aida.IHistogram

entries

public int entries()
Specified by:
entries in interface hep.aida.IBaseHistogram

allEntries

public int allEntries()
Specified by:
allEntries in interface hep.aida.IHistogram

extraEntries

public int extraEntries()
Specified by:
extraEntries in interface hep.aida.IHistogram

nanEntries

public int nanEntries()
Specified by:
nanEntries in interface hep.aida.IBaseHistogram

maxBinHeight

public double maxBinHeight()
Specified by:
maxBinHeight in interface hep.aida.IHistogram

minBinHeight

public double minBinHeight()
Specified by:
minBinHeight in interface hep.aida.IHistogram

sumAllBinHeights

public double sumAllBinHeights()
Specified by:
sumAllBinHeights in interface hep.aida.IHistogram

sumBinHeights

public double sumBinHeights()
Specified by:
sumBinHeights in interface hep.aida.IHistogram

sumExtraBinHeights

public double sumExtraBinHeights()
Specified by:
sumExtraBinHeights in interface hep.aida.IHistogram

binEntries

public int binEntries(int param)
               throws IllegalArgumentException
Specified by:
binEntries in interface hep.aida.IHistogram1D
Throws:
IllegalArgumentException

binError

public double binError(int param)
                throws IllegalArgumentException
Specified by:
binError in interface hep.aida.IHistogram1D
Throws:
IllegalArgumentException

binHeight

public double binHeight(int param)
                 throws IllegalArgumentException
Specified by:
binHeight in interface hep.aida.IHistogram1D
Throws:
IllegalArgumentException

binMean

public double binMean(int param)
               throws IllegalArgumentException
Specified by:
binMean in interface hep.aida.IHistogram1D
Throws:
IllegalArgumentException

binRms

public double binRms(int param)

coordToIndex

public int coordToIndex(double param)
Specified by:
coordToIndex in interface hep.aida.IHistogram1D

title

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

setTitle

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

add

public void add(hep.aida.IHistogram1D iHistogram1D)
         throws IllegalArgumentException
Specified by:
add in interface hep.aida.IHistogram1D
Throws:
IllegalArgumentException

fill

public void fill(double param)
          throws IllegalArgumentException
Specified by:
fill in interface hep.aida.IHistogram1D
Throws:
IllegalArgumentException

fill

public void fill(double param,
                 double param1)
          throws IllegalArgumentException
Specified by:
fill in interface hep.aida.IHistogram1D
Throws:
IllegalArgumentException

reset

public void reset()
           throws RuntimeException
Specified by:
reset in interface hep.aida.IBaseHistogram
Throws:
RuntimeException

scale

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

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.