|
||||
File indexing completed on 2025-01-18 09:28:08
0001 // -*- C++ -*- 0002 // AID-GENERATED 0003 // ========================================================================= 0004 // This class was generated by AID - Abstract Interface Definition 0005 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it. 0006 // ========================================================================= 0007 #ifndef AIDA_IAXIS_H 0008 #define AIDA_IAXIS_H 1 0009 0010 // This file is part of the AIDA library 0011 // Copyright (C) 2002 by the AIDA team. All rights reserved. 0012 // This library is free software and under the terms of the 0013 // GNU Library General Public License described in the LGPL.txt 0014 0015 namespace AIDA { 0016 0017 /** 0018 * An IAxis represents a binned histogram axis. A 1D Histogram would have 0019 * one Axis representing the X axis, while a 2D Histogram would have two 0020 * axes representing the X and Y Axis. 0021 * 0022 * @author The AIDA team (http://aida.freehep.org/) 0023 * 0024 */ 0025 0026 class IAxis { 0027 0028 public: 0029 /// Destructor. 0030 virtual ~IAxis() { /* nop */; } 0031 0032 /** 0033 * Check if the IAxis has fixed binning, i.e. if all the bins have the same width. 0034 * @return <code>true</code> if the binning is fixed, <code>false</code> otherwise. 0035 * 0036 */ 0037 virtual bool isFixedBinning() const = 0; 0038 0039 /** 0040 * Get the lower edge of the IAxis. 0041 * @return The IAxis's lower edge. 0042 * 0043 */ 0044 virtual double lowerEdge() const = 0; 0045 0046 /** 0047 * Get the upper edge of the IAxis. 0048 * @return The IAxis's upper edge. 0049 * 0050 */ 0051 virtual double upperEdge() const = 0; 0052 0053 /** 0054 * The number of bins (excluding underflow and overflow) on the IAxis. 0055 * @return The IAxis's number of bins. 0056 * 0057 */ 0058 virtual int bins() const = 0; 0059 0060 /** 0061 * Get the lower edge of the specified bin. 0062 * @param index The bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW. 0063 * @return The lower edge of the corresponding bin; for the underflow bin this is <tt>Double.NEGATIVE_INFINITY</tt>. 0064 * 0065 */ 0066 virtual double binLowerEdge(int index) const = 0; 0067 0068 /** 0069 * Get the upper edge of the specified bin. 0070 * @param index The bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW. 0071 * @return The upper edge of the corresponding bin; for the overflow bin this is <tt>Double.POSITIVE_INFINITY</tt>. 0072 * 0073 */ 0074 virtual double binUpperEdge(int index) const = 0; 0075 0076 /** 0077 * Get the width of the specified bin. 0078 * @param index The bin number: 0 to bins()-1) for the in-range bins or OVERFLOW or UNDERFLOW. 0079 * @return The width of the corresponding bin. 0080 * 0081 */ 0082 virtual double binWidth(int index) const = 0; 0083 0084 /** 0085 * Convert a coordinate on the axis to a bin number. 0086 * If the coordinate is less than the lowerEdge UNDERFLOW is returned; if the coordinate is greater or 0087 * equal to the upperEdge OVERFLOW is returned. 0088 * @param coord The coordinate to be converted. 0089 * @return The corresponding bin number. 0090 * 0091 */ 0092 virtual int coordToIndex(double coord) const = 0; 0093 0094 /** 0095 * Constants specifying the underflow and the overflow bin. 0096 * They can be passed to any method accepting a bin number. 0097 * 0098 */ 0099 enum { UNDERFLOW_BIN = -2, OVERFLOW_BIN = -1 }; 0100 }; // class 0101 } // namespace AIDA 0102 #endif /* ifndef AIDA_IAXIS_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |