<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>HippoDraw Class Library</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="hippoApp.ico"> </head><body> <!-- Generated by Doxygen 1.6.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_390cfd4b32d48f53301526c593d2b8f8.html">datareps</a> </div> </div> <div class="contents"> <h1>St1DHistogram.cxx</h1><a href="St1DHistogram_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00012"></a>00012 <span class="comment">// for truncation warning in debug mode</span> <a name="l00013"></a>00013 <span class="preprocessor">#ifdef _MSC_VER</span> <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include "msdevstudio/MSconfig.h"</span> <a name="l00015"></a>00015 <span class="preprocessor">#endif</span> <a name="l00016"></a>00016 <span class="preprocessor"></span> <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="St1DHistogram_8h.html" title="St1DHistogram class interface.">St1DHistogram.h</a>"</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#include "<a class="code" href="StHist1DProjector_8h.html" title="StHist1DProjector class interface.">projectors/StHist1DProjector.h</a>"</span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="ColumnPointRep_8h.html" title="hippodraw::ColumnPointRep class interface">reps/ColumnPointRep.h</a>"</span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="preprocessor">#include <cassert></span> <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="keyword">using namespace </span>hippodraw; <a name="l00025"></a>00025 <a name="l00026"></a><a class="code" href="classhippodraw_1_1St1DHistogram.html#ada7e92951bab9a22034aff8bfe7f83e2">00026</a> St1DHistogram::St1DHistogram ( ) <a name="l00027"></a>00027 { <a name="l00028"></a>00028 <a class="code" href="classhippodraw_1_1DataRep.html#adb41893ba19e889e56c559f25fc1a68a" title="The name of the display as it might be displayed in a GUI.">m_name</a> = <span class="stringliteral">"Static Histogram"</span>; <a name="l00029"></a>00029 <a name="l00030"></a>00030 <a class="code" href="classhippodraw_1_1DataRep.html#aa7c0d96e4919970f6e1823693f5cdc27" title="A projector used to transform data to projected values that will be plotted.">m_projector</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1StHist1DProjector.html" title="A derived class of ProjectorBase that projects data accumulated by calls to its fill...">StHist1DProjector</a>(); <a name="l00031"></a>00031 <a class="code" href="classhippodraw_1_1DataRep.html#a4a95e3eb102edf27f2493407c711908d" title="The representation used for drawing each data point in the view.">m_rep</a> = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1ColumnPointRep.html" title="A PointRep class that draws a column to represent the value.">ColumnPointRep</a>(); <a name="l00032"></a>00032 } <a name="l00033"></a>00033 <a name="l00034"></a><a class="code" href="classhippodraw_1_1St1DHistogram.html#a9c1ed0172b026722ac23a85d45862cd2">00034</a> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * <a class="code" href="classhippodraw_1_1St1DHistogram.html#a9c1ed0172b026722ac23a85d45862cd2" title="The clone function returns an object of its own kind which is a copy of this object...">St1DHistogram::clone</a> () <a name="l00035"></a>00035 { <a name="l00036"></a>00036 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1St1DHistogram.html#ada7e92951bab9a22034aff8bfe7f83e2" title="The default constructor.">St1DHistogram</a> ( *<span class="keyword">this</span> ); <a name="l00037"></a>00037 } <a name="l00038"></a>00038 <a name="l00039"></a><a class="code" href="classhippodraw_1_1St1DHistogram.html#a12f8420575a62be909314e481c74ebd8">00039</a> <span class="keywordtype">bool</span> <a class="code" href="classhippodraw_1_1St1DHistogram.html#a12f8420575a62be909314e481c74ebd8" title="Returns true if the DataRep accepts functions on number variables.">St1DHistogram::acceptFunction</a> ( <span class="keywordtype">int</span> num ) <a name="l00040"></a>00040 { <a name="l00041"></a>00041 <span class="keywordflow">return</span> num == 1; <a name="l00042"></a>00042 } <a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="keywordtype">bool</span> <a name="l00045"></a>00045 <a class="code" href="classhippodraw_1_1St1DHistogram.html#a16e2ab72fa2989c0bc12e5a4fce6baf1" title="Returns true.">St1DHistogram::</a> <a name="l00046"></a><a class="code" href="classhippodraw_1_1St1DHistogram.html#a16e2ab72fa2989c0bc12e5a4fce6baf1">00046</a> <a class="code" href="classhippodraw_1_1St1DHistogram.html#a16e2ab72fa2989c0bc12e5a4fce6baf1" title="Returns true.">hasErrorDisplay</a> ()<span class="keyword"> const</span> <a name="l00047"></a>00047 <span class="keyword"></span>{ <a name="l00048"></a>00048 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00049"></a>00049 } <a name="l00050"></a>00050 <a name="l00051"></a>00051 <span class="keywordtype">bool</span> <a name="l00052"></a>00052 <a class="code" href="classhippodraw_1_1St1DHistogram.html#a31579875c6ccc59185e3503446d4a09a" title="Returns false.">St1DHistogram::</a> <a name="l00053"></a><a class="code" href="classhippodraw_1_1St1DHistogram.html#a31579875c6ccc59185e3503446d4a09a">00053</a> <a class="code" href="classhippodraw_1_1St1DHistogram.html#a31579875c6ccc59185e3503446d4a09a" title="Returns false.">hasNTupleBindings</a> ( )<span class="keyword"> const</span> <a name="l00054"></a>00054 <span class="keyword"></span>{ <a name="l00055"></a>00055 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00056"></a>00056 } <a name="l00057"></a>00057 <a name="l00058"></a>00058 <span class="keywordtype">void</span> <a name="l00059"></a>00059 <a class="code" href="classhippodraw_1_1St1DHistogram.html#ad3233d3869e285626b91d043ec4e7bd0" title="Sets the contents of the binner from the data source.">St1DHistogram::</a> <a name="l00060"></a><a class="code" href="classhippodraw_1_1St1DHistogram.html#ad3233d3869e285626b91d043ec4e7bd0">00060</a> <a class="code" href="classhippodraw_1_1St1DHistogram.html#ad3233d3869e285626b91d043ec4e7bd0" title="Sets the contents of the binner from the data source.">setBinContents</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * source ) <a name="l00061"></a>00061 { <a name="l00062"></a>00062 <a class="code" href="classhippodraw_1_1BinningProjector.html" title="The BinningProjector is an abstract class provides most of the functionality for...">BinningProjector</a> * projector <a name="l00063"></a>00063 = dynamic_cast < <a class="code" href="classhippodraw_1_1BinningProjector.html" title="The BinningProjector is an abstract class provides most of the functionality for...">BinningProjector</a> * > ( <a class="code" href="classhippodraw_1_1DataRep.html#aa7c0d96e4919970f6e1823693f5cdc27" title="A projector used to transform data to projected values that will be plotted.">m_projector</a> ); <a name="l00064"></a>00064 assert ( projector != 0 ); <a name="l00065"></a>00065 <a name="l00066"></a>00066 projector -> <a class="code" href="classhippodraw_1_1St1DHistogram.html#ad3233d3869e285626b91d043ec4e7bd0" title="Sets the contents of the binner from the data source.">setBinContents</a> ( source ); <a name="l00067"></a>00067 } <a name="l00068"></a>00068 <a name="l00069"></a>00069 <span class="keyword">using namespace </span>hippodraw; <a name="l00070"></a>00070 <a name="l00071"></a>00071 <span class="keywordtype">bool</span> <a name="l00072"></a>00072 <a class="code" href="classhippodraw_1_1St1DHistogram.html#aa0c9706bc92a98daae1a677ea435a161" title="Returns true if the data representation has specified axis type axis.">St1DHistogram::</a> <a name="l00073"></a><a class="code" href="classhippodraw_1_1St1DHistogram.html#aa0c9706bc92a98daae1a677ea435a161">00073</a> <a class="code" href="classhippodraw_1_1St1DHistogram.html#aa0c9706bc92a98daae1a677ea435a161" title="Returns true if the data representation has specified axis type axis.">hasAxis</a> ( <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7" title="Axes constants.">hippodraw::Axes::Type</a> axis )<span class="keyword"> const</span> <a name="l00074"></a>00074 <span class="keyword"></span>{ <a name="l00075"></a>00075 <span class="keywordflow">return</span> axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a58833a3110c570fb05130d40c365d1e4" title="X axis.">Axes::X</a> || axis == <a class="code" href="namespacehippodraw_1_1Axes.html#a1d1cfd8ffb84e947f82999c682b666a7a5596231eabd6cf29050967d5ac83ad84" title="Y axis.">Axes::Y</a>; <a name="l00076"></a>00076 } <a name="l00077"></a>00077 </pre></div></div> <hr size="1"><address style="align: right;"><small> Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0> </a> </small></address> </body> </html>