/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.31 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package hep.aida.swig; import hep.aida.jni.AIDAJNIUtil; public class ICloud1D extends ICloud implements hep.aida.ICloud1D { private long swigCPtr; public ICloud1D(long cPtr, boolean cMemoryOwn) { super(AIDAJNI.SWIGICloud1DUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } protected static long getCPtr(hep.aida.ICloud1D obj) { if (obj instanceof ICloud1D) { return (obj == null) ? 0 : ((ICloud1D)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_ICloud1D(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.ICloud1D_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_ICloud1D(swigCPtr); } swigCPtr = 0; super.delete(); } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.ICloud1D_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.ICloud1D_change_ownership(this, swigCPtr, true); } public void fill(double x, double weight) { AIDAJNI.ICloud1D_fill__SWIG_0(swigCPtr, this, x, weight); } public void fill(double x) { AIDAJNI.ICloud1D_fill__SWIG_1(swigCPtr, this, x); } public double lowerEdge() { return AIDAJNI.ICloud1D_lowerEdge(swigCPtr, this); } public double upperEdge() { return AIDAJNI.ICloud1D_upperEdge(swigCPtr, this); } public double value(int index) { return AIDAJNI.ICloud1D_value(swigCPtr, this, index); } public double weight(int index) { return AIDAJNI.ICloud1D_weight(swigCPtr, this, index); } public double mean() { return AIDAJNI.ICloud1D_mean(swigCPtr, this); } public double rms() { return AIDAJNI.ICloud1D_rms(swigCPtr, this); } public void convert(int nBins, double lowerEdge, double upperEdge) { AIDAJNI.ICloud1D_convert__SWIG_0(swigCPtr, this, nBins, lowerEdge, upperEdge); } public void convert(double[] binEdges) { AIDAJNI.ICloud1D_convert__SWIG_1(swigCPtr, this, binEdges); } public hep.aida.IHistogram1D histogram() { return new IHistogram1D(AIDAJNI.ICloud1D_histogram(swigCPtr, this), false); } public void fillHistogram(hep.aida.IHistogram1D hist) { AIDAJNI.ICloud1D_fillHistogram(swigCPtr, this, IHistogram1D.getCPtr(hist), (hep.aida.IHistogram1D)hist); } public ICloud1D() { this(AIDAJNI.new_ICloud1D(), true); AIDAJNI.ICloud1D_director_connect(this, swigCPtr, swigCMemOwn, true); } }