/* ---------------------------------------------------------------------------- * 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 IProfile1D extends IProfile implements hep.aida.IProfile1D { private long swigCPtr; public IProfile1D(long cPtr, boolean cMemoryOwn) { super(AIDAJNI.SWIGIProfile1DUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IProfile1D obj) { if (obj instanceof IProfile1D) { return (obj == null) ? 0 : ((IProfile1D)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IProfile1D(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IProfile1D_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IProfile1D(swigCPtr); } swigCPtr = 0; super.delete(); } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IProfile1D_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IProfile1D_change_ownership(this, swigCPtr, true); } public void fill(double x, double y, double weight) { AIDAJNI.IProfile1D_fill__SWIG_0(swigCPtr, this, x, y, weight); } public void fill(double x, double y) { AIDAJNI.IProfile1D_fill__SWIG_1(swigCPtr, this, x, y); } public double binMean(int index) { return AIDAJNI.IProfile1D_binMean(swigCPtr, this, index); } public int binEntries(int index) { return AIDAJNI.IProfile1D_binEntries(swigCPtr, this, index); } public double binHeight(int index) { return AIDAJNI.IProfile1D_binHeight(swigCPtr, this, index); } public double binError(int index) { return AIDAJNI.IProfile1D_binError(swigCPtr, this, index); } public double binRms(int index) { return AIDAJNI.IProfile1D_binRms(swigCPtr, this, index); } public double mean() { return AIDAJNI.IProfile1D_mean(swigCPtr, this); } public double rms() { return AIDAJNI.IProfile1D_rms(swigCPtr, this); } public hep.aida.IAxis axis() { return new IAxis(AIDAJNI.IProfile1D_axis(swigCPtr, this), false); } public int coordToIndex(double coord) { return AIDAJNI.IProfile1D_coordToIndex(swigCPtr, this, coord); } public void add(hep.aida.IProfile1D profile) { AIDAJNI.IProfile1D_add(swigCPtr, this, IProfile1D.getCPtr(profile), (hep.aida.IProfile1D)profile); } public IProfile1D() { this(AIDAJNI.new_IProfile1D(), true); AIDAJNI.IProfile1D_director_connect(this, swigCPtr, swigCMemOwn, true); } }