\hypertarget{classdirfilelog}{
\section{dirfilelog Class Reference}
\label{classdirfilelog}\index{dirfilelog@{dirfilelog}}
}
Logging into dirfile with buffer in memory.  


{\tt \#include $<$loggers.h$>$}

Inheritance diagram for dirfilelog:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=48pt]{classdirfilelog__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for dirfilelog:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=79pt]{classdirfilelog__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classdirfilelog_802eeb6fc4ebf11d97638fd5dc651c68}{dirfilelog} (std::string dirname0, int maxlen0)
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
\hypertarget{classdirfilelog_afeaebe003110f9db1ac43edf8e53a92}{
void \hyperlink{classdirfilelog_afeaebe003110f9db1ac43edf8e53a92}{init} ()}
\label{classdirfilelog_afeaebe003110f9db1ac43edf8e53a92}

\begin{CompactList}\small\item\em Initialize storage. \item\end{CompactList}\item 
\hypertarget{classdirfilelog_f5fe9483a041591bfe6f3d6393b02aa7}{
void \hyperlink{classdirfilelog_f5fe9483a041591bfe6f3d6393b02aa7}{step} ()}
\label{classdirfilelog_f5fe9483a041591bfe6f3d6393b02aa7}

\begin{CompactList}\small\item\em Shifts storage position for another time step. \item\end{CompactList}\item 
\hypertarget{classdirfilelog_4d671baf6f88444d7fe25a5b8a80834a}{
void \hyperlink{classdirfilelog_4d671baf6f88444d7fe25a5b8a80834a}{finalize} ()}
\label{classdirfilelog_4d671baf6f88444d7fe25a5b8a80834a}

\begin{CompactList}\small\item\em Finalize storing information. \item\end{CompactList}\item 
void \hyperlink{classdirfilelog_bd95cdb46af194245f88a7b4bf4c66c7}{write\_\-buffers} (int Len)
\begin{CompactList}\small\item\em Write memory storage to disk. \item\end{CompactList}\item 
\hypertarget{classmemlog_8d2feeb826f7249e9104d616b5a67144}{
void \hyperlink{classmemlog_8d2feeb826f7249e9104d616b5a67144}{logit} (int id, vec v)}
\label{classmemlog_8d2feeb826f7249e9104d616b5a67144}

\begin{CompactList}\small\item\em log this vector \item\end{CompactList}\item 
\hypertarget{classmemlog_65571ebbb16577b5211adbb27baf769c}{
void \hyperlink{classmemlog_65571ebbb16577b5211adbb27baf769c}{itsave} (const char $\ast$fname)}
\label{classmemlog_65571ebbb16577b5211adbb27baf769c}

\begin{CompactList}\small\item\em Save values into an itfile named after {\tt fname}. \item\end{CompactList}\item 
\hypertarget{classlogger_cfb250a559b71e07a1a6aa92f2185c1b}{
virtual int \hyperlink{classlogger_cfb250a559b71e07a1a6aa92f2185c1b}{add} (const \hyperlink{classRV}{RV} \&rv, string name=\char`\"{}\char`\"{})}
\label{classlogger_cfb250a559b71e07a1a6aa92f2185c1b}

\begin{CompactList}\small\item\em returns an identifier which will be later needed for calling the log() function \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
\hypertarget{classdirfilelog_cba5ff1f74ed22910ed7d63aadf21771}{
string \hyperlink{classdirfilelog_cba5ff1f74ed22910ed7d63aadf21771}{dirname}}
\label{classdirfilelog_cba5ff1f74ed22910ed7d63aadf21771}

\begin{CompactList}\small\item\em name of the directory \item\end{CompactList}\item 
\hypertarget{classdirfilelog_854b7e7cc4cb40542b4a3ea06d915772}{
Array$<$ string $>$ \hyperlink{classdirfilelog_854b7e7cc4cb40542b4a3ea06d915772}{scalarnames}}
\label{classdirfilelog_854b7e7cc4cb40542b4a3ea06d915772}

\begin{CompactList}\small\item\em Automatically generated. \item\end{CompactList}\item 
\hypertarget{classmemlog_4195f322897ededdac66c404b848ced3}{
int \hyperlink{classmemlog_4195f322897ededdac66c404b848ced3}{maxlen}}
\label{classmemlog_4195f322897ededdac66c404b848ced3}

\begin{CompactList}\small\item\em Maximum length of vectors stored in memory. \item\end{CompactList}\item 
\hypertarget{classmemlog_3410b4c002636508c43ddcba8d394520}{
int \hyperlink{classmemlog_3410b4c002636508c43ddcba8d394520}{ind}}
\label{classmemlog_3410b4c002636508c43ddcba8d394520}

\begin{CompactList}\small\item\em Currect record to be written. \item\end{CompactList}\item 
\hypertarget{classmemlog_f0f5bc7b83539ad102e8f65297852d91}{
Array$<$ mat $>$ \hyperlink{classmemlog_f0f5bc7b83539ad102e8f65297852d91}{vectors}}
\label{classmemlog_f0f5bc7b83539ad102e8f65297852d91}

\begin{CompactList}\small\item\em Storage. \item\end{CompactList}\item 
\hypertarget{classlogger_83eea0cf4fbca59474d015f751f128a7}{
Array$<$ \hyperlink{classRV}{RV} $>$ \hyperlink{classlogger_83eea0cf4fbca59474d015f751f128a7}{entries}}
\label{classlogger_83eea0cf4fbca59474d015f751f128a7}

\begin{CompactList}\small\item\em RVs of all logged variables. \item\end{CompactList}\item 
\hypertarget{classlogger_39cb79e839ca8f8bb9dcbc8c5b9c7786}{
Array$<$ string $>$ \hyperlink{classlogger_39cb79e839ca8f8bb9dcbc8c5b9c7786}{names}}
\label{classlogger_39cb79e839ca8f8bb9dcbc8c5b9c7786}

\begin{CompactList}\small\item\em Names of logged quantities, e.g. names of algorithm variants. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Logging into dirfile with buffer in memory. 

Dirfile is a special format used by the kst program. See documentation of kst for description.

This format is used to store scalars, hence multivariate RVs must be separated. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classdirfilelog_802eeb6fc4ebf11d97638fd5dc651c68}{
\index{dirfilelog@{dirfilelog}!dirfilelog@{dirfilelog}}
\index{dirfilelog@{dirfilelog}!dirfilelog@{dirfilelog}}
\subsubsection[dirfilelog]{\setlength{\rightskip}{0pt plus 5cm}dirfilelog::dirfilelog (std::string {\em dirname0}, \/  int {\em maxlen0})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classdirfilelog_802eeb6fc4ebf11d97638fd5dc651c68}


Default constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dirname0}]name of the directory in which to store the results \item[{\em maxlen0}]length of the memory buffers, when full the buffers will be dumped to HDD and returned to the beginning. \end{description}
\end{Desc}


\subsection{Member Function Documentation}
\hypertarget{classdirfilelog_bd95cdb46af194245f88a7b4bf4c66c7}{
\index{dirfilelog@{dirfilelog}!write\_\-buffers@{write\_\-buffers}}
\index{write\_\-buffers@{write\_\-buffers}!dirfilelog@{dirfilelog}}
\subsubsection[write\_\-buffers]{\setlength{\rightskip}{0pt plus 5cm}void dirfilelog::write\_\-buffers (int {\em Len})}}
\label{classdirfilelog_bd95cdb46af194245f88a7b4bf4c66c7}


Write memory storage to disk. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em Len}]length of buffer to be written, if 0 the file is truncated at 0. \end{description}
\end{Desc}


References dirname, logger::entries, memlog::maxlen, scalarnames, and memlog::vectors.

Referenced by finalize(), init(), and step().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
work/git/mixpp/bdm/stat/\hyperlink{loggers_8h}{loggers.h}\item 
work/git/mixpp/bdm/stat/loggers.cpp\end{CompactItemize}
