<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6">
  <compounddef id="loggers_8cpp" kind="file">
    <compoundname>loggers.cpp</compoundname>
    <includes local="no">itpp/itbase.h</includes>
    <includes refid="loggers_8h" local="yes">loggers.h</includes>
    <includes refid="osutils_8h" local="yes">../osutils.h</includes>
    <includes local="no">fcntl.h</includes>
    <incdepgraph>
      <node id="424">
        <label>work/git/mixpp/bdm/stat/loggers.cpp</label>
        <link refid="loggers.cpp"/>
        <childnode refid="425" relation="include">
        </childnode>
        <childnode refid="426" relation="include">
        </childnode>
        <childnode refid="429" relation="include">
        </childnode>
        <childnode refid="430" relation="include">
        </childnode>
      </node>
      <node id="426">
        <label>loggers.h</label>
        <link refid="loggers_8h"/>
        <childnode refid="425" relation="include">
        </childnode>
        <childnode refid="427" relation="include">
        </childnode>
        <childnode refid="428" relation="include">
        </childnode>
      </node>
      <node id="427">
        <label>libBM.h</label>
        <link refid="libBM_8h"/>
        <childnode refid="425" relation="include">
        </childnode>
      </node>
      <node id="430">
        <label>fcntl.h</label>
      </node>
      <node id="428">
        <label>../itpp_ext.h</label>
        <link refid="itpp__ext_8h-source"/>
        <childnode refid="425" relation="include">
        </childnode>
      </node>
      <node id="425">
        <label>itpp/itbase.h</label>
      </node>
      <node id="429">
        <label>../osutils.h</label>
        <link refid="osutils_8h-source"/>
        <childnode refid="425" relation="include">
        </childnode>
      </node>
    </incdepgraph>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;itpp/itbase.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="loggers_8h" kindref="compound" tooltip="Loggers for storing results of experiments.">loggers.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;../osutils.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;fcntl.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>WIN32</highlight></codeline>
<codeline lineno="7"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#include<sp/>&lt;io.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
<codeline lineno="9"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10" refid="classmemlog_165571ebbb16577b5211adbb27baf769c" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classmemlog_165571ebbb16577b5211adbb27baf769c" kindref="member" tooltip="Save values into an itfile named after fname.">memlog::itsave</ref><sp/>(<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>fname<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_file<sp/>itf<sp/>(<sp/>fname<sp/>);</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>i=0;<sp/>i&lt;<ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref>.length();i++<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/><ref refid="classlogger_139cb79e839ca8f8bb9dcbc8c5b9c7786" kindref="member" tooltip="Names of logged quantities, e.g. names of algorithm variants.">names</ref><sp/>(<sp/>i<sp/>).length()<sp/>&lt;1<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::ostringstream<sp/>o;</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>o&lt;&lt;</highlight><highlight class="stringliteral">&quot;Variable&quot;</highlight><highlight class="normal">&lt;&lt;i;</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>itf<sp/>&lt;&lt;<sp/>Name<sp/>(<sp/>o.str()<sp/>)<sp/>&lt;&lt;<sp/><ref refid="classmemlog_1f0f5bc7b83539ad102e8f65297852d91" kindref="member" tooltip="Storage.">vectors</ref><sp/>(<sp/>i<sp/>);</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>itf<sp/>&lt;&lt;<sp/>Name<sp/>(<sp/><ref refid="classlogger_139cb79e839ca8f8bb9dcbc8c5b9c7786" kindref="member" tooltip="Names of logged quantities, e.g. names of algorithm variants.">names</ref><sp/>(<sp/>i<sp/>)<sp/>)<sp/>&lt;&lt;<sp/><ref refid="classmemlog_1f0f5bc7b83539ad102e8f65297852d91" kindref="member" tooltip="Storage.">vectors</ref><sp/>(<sp/>i<sp/>);</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="23"><highlight class="normal">}</highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25" refid="classdirfilelog_1afeaebe003110f9db1ac43edf8e53a92" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classdirfilelog_1afeaebe003110f9db1ac43edf8e53a92" kindref="member" tooltip="Initialize storage.">dirfilelog::init</ref>()<sp/>{</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j,k;</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nsc=0;</highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>i=0;i&lt;<ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref>.length();i++<sp/>)<sp/>{nsc+=<ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref><sp/>(<sp/>i<sp/>).count();}</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>;<sp/></highlight><highlight class="comment">//all<sp/>entries!!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>filename[200];</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>num[3];</highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Initialize<sp/>directory</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>makedir<sp/>(<sp/><ref refid="classdirfilelog_1cba5ff1f74ed22910ed7d63aadf21771" kindref="member" tooltip="name of the directory">dirname</ref><sp/>);<sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="comment">//<sp/>directory<sp/>OK,<sp/>or<sp/>it<sp/>can<sp/>be<sp/>overwritten</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="comment">//Create<sp/>filenames</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classdirfilelog_1854b7e7cc4cb40542b4a3ea06d915772" kindref="member" tooltip="Automatically generated.">scalarnames</ref>.set_length<sp/>(<sp/>nsc<sp/>);</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>For<sp/>all<sp/>entries</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ii=0;</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>i=0;i&lt;<ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref>.length();i++<sp/>)<sp/>{<sp/></highlight><highlight class="comment">//for<sp/>entries</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>j=0;j&lt;<ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref><sp/>(<sp/>i<sp/>).length();j++<sp/>)<sp/>{<sp/></highlight><highlight class="comment">//for<sp/>RVs<sp/>in<sp/>entries</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rvsize<sp/>=<sp/><ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref><sp/>(<sp/>i<sp/>).size<sp/>(<sp/>j<sp/>);</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>rvsize<sp/>==1<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classdirfilelog_1854b7e7cc4cb40542b4a3ea06d915772" kindref="member" tooltip="Automatically generated.">scalarnames</ref><sp/>(<sp/>ii<sp/>)<sp/>=<sp/><ref refid="classlogger_139cb79e839ca8f8bb9dcbc8c5b9c7786" kindref="member" tooltip="Names of logged quantities, e.g. names of algorithm variants.">names</ref><sp/>(<sp/>i<sp/>)<sp/>+<sp/></highlight><highlight class="stringliteral">&quot;_&quot;</highlight><highlight class="normal"><sp/>+<sp/><ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref><sp/>(<sp/>i<sp/>).name<sp/>(<sp/>j<sp/>);</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ii++;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>k=0;k&lt;rvsize;k++<sp/>)<sp/>{<sp/></highlight><highlight class="comment">//for<sp/>all<sp/>scalars<sp/>in<sp/>given<sp/>RV</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sprintf<sp/>(<sp/>num,</highlight><highlight class="stringliteral">&quot;%d&quot;</highlight><highlight class="normal">,k<sp/>);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classdirfilelog_1854b7e7cc4cb40542b4a3ea06d915772" kindref="member" tooltip="Automatically generated.">scalarnames</ref><sp/>(<sp/>ii<sp/>)<sp/>=<sp/><ref refid="classlogger_139cb79e839ca8f8bb9dcbc8c5b9c7786" kindref="member" tooltip="Names of logged quantities, e.g. names of algorithm variants.">names</ref><sp/>(<sp/>i<sp/>)<sp/>+<sp/></highlight><highlight class="stringliteral">&quot;_&quot;</highlight><highlight class="normal"><sp/>+<sp/><ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref><sp/>(<sp/>i<sp/>).name<sp/>(<sp/>j<sp/>)<sp/>+<sp/></highlight><highlight class="stringliteral">&quot;_&quot;</highlight><highlight class="normal"><sp/>+<sp/>num;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ii++;</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Create<sp/>format</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">string</highlight><highlight class="normal"><sp/>frm=</highlight><highlight class="stringliteral">&quot;format&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>get_fname<sp/>(<sp/>filename,<sp/><ref refid="classdirfilelog_1cba5ff1f74ed22910ed7d63aadf21771" kindref="member" tooltip="name of the directory">dirname</ref>,<sp/>frm<sp/>);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>FILE*<sp/>fpf;</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fpf<sp/>=<sp/>fopen<sp/>(<sp/>filename,<sp/></highlight><highlight class="stringliteral">&quot;w&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>i=0;i&lt;ii;i++<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fprintf<sp/>(<sp/>fpf,<sp/></highlight><highlight class="stringliteral">&quot;%s<sp/>RAW<sp/>d<sp/>1\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="classdirfilelog_1854b7e7cc4cb40542b4a3ea06d915772" kindref="member" tooltip="Automatically generated.">scalarnames</ref><sp/>(<sp/>i<sp/>).c_str()<sp/>);</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fclose<sp/>(<sp/>fpf<sp/>);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmemlog_1b081ef5acb4816e6b5fcb56c19cc7e47" kindref="member" tooltip="Initialize storage.">memlog::init</ref>();</highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Delete<sp/>old<sp/>data</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classdirfilelog_1bd95cdb46af194245f88a7b4bf4c66c7" kindref="member" tooltip="Write memory storage to disk.">write_buffers</ref><sp/>(<sp/>0<sp/>);</highlight></codeline>
<codeline lineno="74"><highlight class="normal">}</highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight></codeline>
<codeline lineno="77" refid="classdirfilelog_1bd95cdb46af194245f88a7b4bf4c66c7" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classdirfilelog_1bd95cdb46af194245f88a7b4bf4c66c7" kindref="member" tooltip="Write memory storage to disk.">dirfilelog::write_buffers</ref><sp/>(<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Len<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>fp;</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nen=<ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref>.length();<sp/></highlight><highlight class="comment">//all<sp/>entries!!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>*Dt;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>DtRows;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j,k;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ii;<sp/></highlight><highlight class="comment">//index<sp/>in<sp/>scalarnames;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>jj;<sp/></highlight><highlight class="comment">//index<sp/>in<sp/>vectors()</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>filename[200];</highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug<sp/>(<sp/>Len&lt;=<ref refid="classmemlog_14195f322897ededdac66c404b848ced3" kindref="member" tooltip="Maximum length of vectors stored in memory.">maxlen</ref>,</highlight><highlight class="stringliteral">&quot;diffilelog&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ii<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>i=0;i&lt;nen;i++<sp/>)<sp/>{<sp/></highlight><highlight class="comment">//for<sp/>entries</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Dt<sp/>=<sp/><ref refid="classmemlog_1f0f5bc7b83539ad102e8f65297852d91" kindref="member" tooltip="Storage.">vectors</ref><sp/>(<sp/>i<sp/>)._data();</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>DtRows<sp/>=<sp/><ref refid="classmemlog_1f0f5bc7b83539ad102e8f65297852d91" kindref="member" tooltip="Storage.">vectors</ref><sp/>(<sp/>i<sp/>).rows();</highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>jj=0;</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>j=0;j&lt;<ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref><sp/>(<sp/>i<sp/>).length();j++<sp/>)<sp/>{<sp/></highlight><highlight class="comment">//for<sp/>RVs<sp/>in<sp/>entries</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rvsize<sp/>=<sp/><ref refid="classlogger_183eea0cf4fbca59474d015f751f128a7" kindref="member" tooltip="RVs of all logged variables.">entries</ref><sp/>(<sp/>i<sp/>).size<sp/>(<sp/>j<sp/>);</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>k=0;k&lt;rvsize;k++<sp/>)<sp/>{<sp/>{<sp/></highlight><highlight class="comment">//for<sp/>all<sp/>scalars<sp/>in<sp/>given<sp/>RV</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>get_fname<sp/>(<sp/>filename,<ref refid="classdirfilelog_1cba5ff1f74ed22910ed7d63aadf21771" kindref="member" tooltip="name of the directory">dirname</ref>,<ref refid="classdirfilelog_1854b7e7cc4cb40542b4a3ea06d915772" kindref="member" tooltip="Automatically generated.">scalarnames</ref><sp/>(<sp/>ii<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>Len==0<sp/>)<sp/></highlight><highlight class="comment">//initialization</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fp<sp/>=<sp/>open<sp/>(<sp/>filename,<sp/>O_CREAT<sp/>|<sp/>O_WRONLY<sp/>|<sp/>O_TRUNC,<sp/>00644<sp/>);</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fp<sp/>=<sp/>open<sp/>(<sp/>filename,<sp/>O_CREAT<sp/>|<sp/>O_WRONLY<sp/>|<sp/>O_APPEND,<sp/>00644<sp/>);</highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>write<sp/>(<sp/>fp,&amp;Dt[jj*<sp/>(<sp/>DtRows<sp/>)<sp/>],<sp/>(<sp/>Len<sp/>)<sp/>*</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal"><sp/>(<sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>)<sp/>);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>close<sp/>(<sp/>fp<sp/>);</highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//next<sp/>row<sp/>in<sp/>Dt</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>jj++;</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//next<sp/>scalarname</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ii++;</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="115"><highlight class="normal">}</highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117" refid="classdirfilelog_1f5fe9483a041591bfe6f3d6393b02aa7" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classdirfilelog_1f5fe9483a041591bfe6f3d6393b02aa7" kindref="member" tooltip="Shifts storage position for another time step.">dirfilelog::step</ref><sp/>(<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/><ref refid="classmemlog_13410b4c002636508c43ddcba8d394520" kindref="member" tooltip="Currect record to be written.">ind</ref>==<sp/>(<sp/><ref refid="classmemlog_14195f322897ededdac66c404b848ced3" kindref="member" tooltip="Maximum length of vectors stored in memory.">maxlen</ref><sp/>-1<sp/>)<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classdirfilelog_1bd95cdb46af194245f88a7b4bf4c66c7" kindref="member" tooltip="Write memory storage to disk.">write_buffers</ref><sp/>(<sp/><ref refid="classmemlog_13410b4c002636508c43ddcba8d394520" kindref="member" tooltip="Currect record to be written.">ind</ref>+1<sp/>);</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmemlog_13410b4c002636508c43ddcba8d394520" kindref="member" tooltip="Currect record to be written.">ind</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classmemlog_13410b4c002636508c43ddcba8d394520" kindref="member" tooltip="Currect record to be written.">ind</ref>++;</highlight></codeline>
<codeline lineno="125"><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal">}</highlight></codeline>
<codeline lineno="127"><highlight class="normal"></highlight></codeline>
<codeline lineno="128" refid="classdirfilelog_14d671baf6f88444d7fe25a5b8a80834a" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classdirfilelog_14d671baf6f88444d7fe25a5b8a80834a" kindref="member" tooltip="Finalize storing information.">dirfilelog::finalize</ref><sp/>(<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/><ref refid="classmemlog_13410b4c002636508c43ddcba8d394520" kindref="member" tooltip="Currect record to be written.">ind</ref>&gt;0<sp/>)</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classdirfilelog_1bd95cdb46af194245f88a7b4bf4c66c7" kindref="member" tooltip="Write memory storage to disk.">write_buffers</ref><sp/>(<sp/><ref refid="classmemlog_13410b4c002636508c43ddcba8d394520" kindref="member" tooltip="Currect record to be written.">ind</ref><sp/>);<sp/></highlight><highlight class="comment">//assuming<sp/>here<sp/>that<sp/>i+1<sp/>was<sp/>not<sp/>filled</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/bdm/stat/loggers.cpp"/>
  </compounddef>
</doxygen>
