\hypertarget{classbdm_1_1dirfilelog}{
\section{bdm::dirfilelog Class Reference}
\label{classbdm_1_1dirfilelog}\index{bdm::dirfilelog@{bdm::dirfilelog}}
}
{\tt \#include $<$loggers.h$>$}

Inheritance diagram for bdm::dirfilelog:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=64pt]{classbdm_1_1dirfilelog__inherit__graph}
\end{center}
\end{figure}


\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*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classbdm_1_1dirfilelog_534cdc903068764f1f243ae8fc0316a3}{dirfilelog} (std::string dirname0, int maxlen0)
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1dirfilelog_78a3bd8a83cbd6299e279544bc81493d}{
void \hyperlink{classbdm_1_1dirfilelog_78a3bd8a83cbd6299e279544bc81493d}{init} ()}
\label{classbdm_1_1dirfilelog_78a3bd8a83cbd6299e279544bc81493d}

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

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

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

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

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

\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{classbdm_1_1dirfilelog_985eb02770f01e25cdceff32ff53a9c5}{
string \hyperlink{classbdm_1_1dirfilelog_985eb02770f01e25cdceff32ff53a9c5}{dirname}}
\label{classbdm_1_1dirfilelog_985eb02770f01e25cdceff32ff53a9c5}

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

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

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

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

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

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

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


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


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{classbdm_1_1dirfilelog_f595c0df25f5fa5d8c27ea1e375d9c51}{
\index{bdm::dirfilelog@{bdm::dirfilelog}!write\_\-buffers@{write\_\-buffers}}
\index{write\_\-buffers@{write\_\-buffers}!bdm::dirfilelog@{bdm::dirfilelog}}
\subsubsection[write\_\-buffers]{\setlength{\rightskip}{0pt plus 5cm}void bdm::dirfilelog::write\_\-buffers (int {\em Len})}}
\label{classbdm_1_1dirfilelog_f595c0df25f5fa5d8c27ea1e375d9c51}


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, bdm::logger::entries, bdm::memlog::maxlen, scalarnames, and bdm::memlog::vectors.

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

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