123 | | <a name="l00098"></a><a class="code" href="classbdm_1_1dirfilelog.html">00098</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1dirfilelog.html" title="Logging into dirfile with buffer in memory.">dirfilelog</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1memlog.html">memlog</a> { |
124 | | <a name="l00099"></a>00099 |
125 | | <a name="l00100"></a>00100 <span class="keyword">protected</span>: |
126 | | <a name="l00102"></a><a class="code" href="classbdm_1_1dirfilelog.html#a985eb02770f01e25cdceff32ff53a9c5">00102</a> <span class="keywordtype">string</span> <a class="code" href="classbdm_1_1dirfilelog.html#a985eb02770f01e25cdceff32ff53a9c5" title="name of the directory">dirname</a>; |
127 | | <a name="l00104"></a><a class="code" href="classbdm_1_1dirfilelog.html#a7805040fe1ffa2a048c33980bc995793">00104</a> Array<string> <a class="code" href="classbdm_1_1dirfilelog.html#a7805040fe1ffa2a048c33980bc995793" title="Automatically generated.">scalarnames</a>; |
128 | | <a name="l00105"></a>00105 <span class="keyword">public</span>: |
129 | | <a name="l00109"></a><a class="code" href="classbdm_1_1dirfilelog.html#a15e1c0228c8ecefb372b364742748dff">00109</a> <a class="code" href="classbdm_1_1dirfilelog.html#a15e1c0228c8ecefb372b364742748dff" title="Default constructor.">dirfilelog</a> ( <span class="keywordtype">string</span> dirname0, <span class="keywordtype">int</span> maxlen0 ) : <a class="code" href="classbdm_1_1memlog.html">memlog</a> ( maxlen0 ), <a class="code" href="classbdm_1_1dirfilelog.html#a985eb02770f01e25cdceff32ff53a9c5" title="name of the directory">dirname</a> ( dirname0 ), <a class="code" href="classbdm_1_1dirfilelog.html#a7805040fe1ffa2a048c33980bc995793" title="Automatically generated.">scalarnames</a> ( 0 ) {} |
130 | | <a name="l00110"></a>00110 |
131 | | <a name="l00111"></a>00111 <a class="code" href="classbdm_1_1dirfilelog.html" title="Logging into dirfile with buffer in memory.">dirfilelog</a>() {} |
132 | | <a name="l00112"></a>00112 |
133 | | <a name="l00114"></a>00114 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#a78a3bd8a83cbd6299e279544bc81493d" title="Initialize storage.">init</a>(); |
134 | | <a name="l00115"></a>00115 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#af79660645d09aa2d8bdd18923a721662" title="Shifts storage position for another time step.">step</a>(); |
135 | | <a name="l00116"></a>00116 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#a521d7ba159f97a0182392df27953804f" title="Finalize storing information.">finalize</a>(); |
136 | | <a name="l00120"></a>00120 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#af595c0df25f5fa5d8c27ea1e375d9c51" title="Write memory storage to disk.">write_buffers</a> ( <span class="keywordtype">int</span> Len ); |
137 | | <a name="l00121"></a>00121 |
138 | | <a name="l00131"></a>00131 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#aa32de0f314a30392d69f07458643514e" title="UI for dirfilelog (Kst file format).">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
139 | | <a name="l00132"></a>00132 |
140 | | <a name="l00133"></a>00133 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
141 | | <a name="l00134"></a>00134 }; |
142 | | <a name="l00135"></a>00135 |
143 | | <a name="l00136"></a>00136 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( dirfilelog ); |
144 | | <a name="l00137"></a>00137 SHAREDPTR ( dirfilelog ); |
145 | | <a name="l00138"></a>00138 |
146 | | <a name="l00139"></a>00139 }; |
147 | | <a name="l00140"></a>00140 <span class="preprocessor">#endif // LGR_H</span> |
| 123 | <a name="l00091"></a>00091 |
| 124 | <a name="l00095"></a><a class="code" href="classbdm_1_1stdlog.html">00095</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1stdlog.html" title="Simple logger used for debugging All data records are written out to std from where...">stdlog</a>: <span class="keyword">public</span> <a class="code" href="classbdm_1_1memlog.html">memlog</a>{ |
| 125 | <a name="l00096"></a>00096 <span class="keyword">public</span>: |
| 126 | <a name="l00098"></a><a class="code" href="classbdm_1_1stdlog.html#af3831e80f78fa52106501321377a0eb1">00098</a> <a class="code" href="classbdm_1_1stdlog.html#af3831e80f78fa52106501321377a0eb1" title="default constructor">stdlog</a>():<a class="code" href="classbdm_1_1memlog.html">memlog</a>(1){}; |
| 127 | <a name="l00099"></a>00099 |
| 128 | <a name="l00100"></a><a class="code" href="classbdm_1_1stdlog.html#afbe8a8988ec1e66b0c3cf2cb776214a8">00100</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stdlog.html#afbe8a8988ec1e66b0c3cf2cb776214a8" title="Initialize storage.">init</a>() { |
| 129 | <a name="l00101"></a>00101 <a class="code" href="classbdm_1_1stdlog.html#afbe8a8988ec1e66b0c3cf2cb776214a8" title="Initialize storage.">memlog::init</a>(); |
| 130 | <a name="l00102"></a>00102 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<<a class="code" href="classbdm_1_1logger.html#ac54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>.length();i++){ |
| 131 | <a name="l00103"></a>00103 <span class="keywordflow">if</span> (<a class="code" href="classbdm_1_1logger.html#ac54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>(i)._dsize()==1) { |
| 132 | <a name="l00104"></a>00104 cout << <a class="code" href="classbdm_1_1logger.html#a68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a>(i) << <a class="code" href="classbdm_1_1logger.html#ac54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>(i).name(0) << <span class="stringliteral">"\t"</span>; |
| 133 | <a name="l00105"></a>00105 } |
| 134 | <a name="l00106"></a>00106 <span class="keywordflow">else</span> |
| 135 | <a name="l00107"></a>00107 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j<<a class="code" href="classbdm_1_1memlog.html#a1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>(i).cols(); j++){ |
| 136 | <a name="l00108"></a>00108 cout << <a class="code" href="classbdm_1_1logger.html#a68ca1f05cf3d414ba0f39211977b8d02" title="Names of logged quantities, e.g. names of algorithm variants.">names</a>(i) << <a class="code" href="classbdm_1_1logger.html#ac54566a4554089443a20b2a49ed1a61f" title="RVs of all logged variables.">entries</a>(i).scalarname(j) << <span class="stringliteral">"\t"</span>; |
| 137 | <a name="l00109"></a>00109 } |
| 138 | <a name="l00110"></a>00110 } |
| 139 | <a name="l00111"></a>00111 cout << endl; |
| 140 | <a name="l00112"></a>00112 |
| 141 | <a name="l00113"></a>00113 |
| 142 | <a name="l00114"></a>00114 } |
| 143 | <a name="l00116"></a><a class="code" href="classbdm_1_1stdlog.html#a57004e763add2e08dcdd8f5869db691d">00116</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stdlog.html#a57004e763add2e08dcdd8f5869db691d" title="writes everything out">step</a>() { |
| 144 | <a name="l00117"></a>00117 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<<a class="code" href="classbdm_1_1memlog.html#a1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>.length();i++){ |
| 145 | <a name="l00118"></a>00118 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j=0; j<<a class="code" href="classbdm_1_1memlog.html#a1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>(i).cols(); j++){ |
| 146 | <a name="l00119"></a>00119 cout << <a class="code" href="classbdm_1_1memlog.html#a1fed143162f2de6ef1c1b6557964f24e" title="Storage.">vectors</a>(i)(0,j) << <span class="stringliteral">"\t"</span>; |
| 147 | <a name="l00120"></a>00120 } |
| 148 | <a name="l00121"></a>00121 } |
| 149 | <a name="l00122"></a>00122 cout << endl; |
| 150 | <a name="l00123"></a>00123 } |
| 151 | <a name="l00134"></a><a class="code" href="classbdm_1_1stdlog.html#a68ac24c94c23887eecfae7c8a11a384d">00134</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1stdlog.html#a68ac24c94c23887eecfae7c8a11a384d" title="UI for stdlog.">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ){ |
| 152 | <a name="l00135"></a>00135 } |
| 153 | <a name="l00136"></a>00136 |
| 154 | <a name="l00137"></a>00137 }; |
| 155 | <a name="l00138"></a>00138 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a>(stdlog); |
| 156 | <a name="l00139"></a>00139 |
| 157 | <a name="l00147"></a><a class="code" href="classbdm_1_1dirfilelog.html">00147</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1dirfilelog.html" title="Logging into dirfile with buffer in memory.">dirfilelog</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1memlog.html">memlog</a> { |
| 158 | <a name="l00148"></a>00148 |
| 159 | <a name="l00149"></a>00149 <span class="keyword">protected</span>: |
| 160 | <a name="l00151"></a><a class="code" href="classbdm_1_1dirfilelog.html#a985eb02770f01e25cdceff32ff53a9c5">00151</a> <span class="keywordtype">string</span> <a class="code" href="classbdm_1_1dirfilelog.html#a985eb02770f01e25cdceff32ff53a9c5" title="name of the directory">dirname</a>; |
| 161 | <a name="l00153"></a><a class="code" href="classbdm_1_1dirfilelog.html#a7805040fe1ffa2a048c33980bc995793">00153</a> Array<string> <a class="code" href="classbdm_1_1dirfilelog.html#a7805040fe1ffa2a048c33980bc995793" title="Automatically generated.">scalarnames</a>; |
| 162 | <a name="l00154"></a>00154 <span class="keyword">public</span>: |
| 163 | <a name="l00158"></a><a class="code" href="classbdm_1_1dirfilelog.html#a15e1c0228c8ecefb372b364742748dff">00158</a> <a class="code" href="classbdm_1_1dirfilelog.html#a15e1c0228c8ecefb372b364742748dff" title="Default constructor.">dirfilelog</a> ( <span class="keywordtype">string</span> dirname0, <span class="keywordtype">int</span> maxlen0 ) : <a class="code" href="classbdm_1_1memlog.html">memlog</a> ( maxlen0 ), <a class="code" href="classbdm_1_1dirfilelog.html#a985eb02770f01e25cdceff32ff53a9c5" title="name of the directory">dirname</a> ( dirname0 ), <a class="code" href="classbdm_1_1dirfilelog.html#a7805040fe1ffa2a048c33980bc995793" title="Automatically generated.">scalarnames</a> ( 0 ) {} |
| 164 | <a name="l00159"></a>00159 |
| 165 | <a name="l00160"></a>00160 <a class="code" href="classbdm_1_1dirfilelog.html" title="Logging into dirfile with buffer in memory.">dirfilelog</a>() {} |
| 166 | <a name="l00161"></a>00161 |
| 167 | <a name="l00163"></a>00163 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#a78a3bd8a83cbd6299e279544bc81493d" title="Initialize storage.">init</a>(); |
| 168 | <a name="l00164"></a>00164 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#af79660645d09aa2d8bdd18923a721662" title="Shifts storage position for another time step.">step</a>(); |
| 169 | <a name="l00165"></a>00165 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#a521d7ba159f97a0182392df27953804f" title="Finalize storing information.">finalize</a>(); |
| 170 | <a name="l00169"></a>00169 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#af595c0df25f5fa5d8c27ea1e375d9c51" title="Write memory storage to disk.">write_buffers</a> ( <span class="keywordtype">int</span> Len ); |
| 171 | <a name="l00170"></a>00170 |
| 172 | <a name="l00180"></a>00180 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1dirfilelog.html#aa32de0f314a30392d69f07458643514e" title="UI for dirfilelog (Kst file format).">from_setting</a> ( <span class="keyword">const</span> Setting &<span class="keyword">set</span> ); |
| 173 | <a name="l00181"></a>00181 |
| 174 | <a name="l00182"></a>00182 <span class="comment">// TODO dodelat void to_setting( Setting &set ) const;</span> |
| 175 | <a name="l00183"></a>00183 }; |
| 176 | <a name="l00184"></a>00184 |
| 177 | <a name="l00185"></a>00185 <a class="code" href="user__info_8h.html#a4f9de2f17e844047726487b99def99c6" title="Macro for registration of class into map of user-infos, registered class is scriptable...">UIREGISTER</a> ( dirfilelog ); |
| 178 | <a name="l00186"></a>00186 SHAREDPTR ( dirfilelog ); |
| 179 | <a name="l00187"></a>00187 |
| 180 | <a name="l00188"></a>00188 }; |
| 181 | <a name="l00189"></a>00189 <span class="preprocessor">#endif // LGR_H</span> |