[99] | 1 | \section{dirfilelog Class Reference} |
---|
| 2 | \label{classdirfilelog}\index{dirfilelog@{dirfilelog}} |
---|
| 3 | Logging into dirfile with buffer in memory. |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | {\tt \#include $<$loggers.h$>$} |
---|
| 7 | |
---|
| 8 | Inheritance diagram for dirfilelog:\nopagebreak |
---|
| 9 | \begin{figure}[H] |
---|
| 10 | \begin{center} |
---|
| 11 | \leavevmode |
---|
| 12 | \includegraphics[width=48pt]{classdirfilelog__inherit__graph} |
---|
| 13 | \end{center} |
---|
| 14 | \end{figure} |
---|
| 15 | Collaboration diagram for dirfilelog:\nopagebreak |
---|
| 16 | \begin{figure}[H] |
---|
| 17 | \begin{center} |
---|
| 18 | \leavevmode |
---|
| 19 | \includegraphics[width=79pt]{classdirfilelog__coll__graph} |
---|
| 20 | \end{center} |
---|
| 21 | \end{figure} |
---|
| 22 | \subsection*{Public Member Functions} |
---|
| 23 | \begin{CompactItemize} |
---|
| 24 | \item |
---|
| 25 | {\bf dirfilelog} (std::string dirname0, int maxlen0) |
---|
| 26 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
| 27 | void {\bf init} ()\label{classdirfilelog_afeaebe003110f9db1ac43edf8e53a92} |
---|
| 28 | |
---|
| 29 | \begin{CompactList}\small\item\em Initialize storage. \item\end{CompactList}\item |
---|
[162] | 30 | void {\bf step} ()\label{classdirfilelog_f5fe9483a041591bfe6f3d6393b02aa7} |
---|
[99] | 31 | |
---|
[162] | 32 | \begin{CompactList}\small\item\em Shifts storage position for another time step. \item\end{CompactList}\item |
---|
| 33 | void {\bf finalize} ()\label{classdirfilelog_4d671baf6f88444d7fe25a5b8a80834a} |
---|
| 34 | |
---|
| 35 | \begin{CompactList}\small\item\em Finalize storing information. \item\end{CompactList}\item |
---|
[99] | 36 | void {\bf write\_\-buffers} (int Len) |
---|
| 37 | \begin{CompactList}\small\item\em Write memory storage to disk. \item\end{CompactList}\item |
---|
| 38 | void {\bf logit} (int id, vec v)\label{classmemlog_8d2feeb826f7249e9104d616b5a67144} |
---|
| 39 | |
---|
| 40 | \begin{CompactList}\small\item\em log this vector \item\end{CompactList}\item |
---|
[145] | 41 | void {\bf itsave} (const char $\ast$fname)\label{classmemlog_65571ebbb16577b5211adbb27baf769c} |
---|
[106] | 42 | |
---|
[145] | 43 | \begin{CompactList}\small\item\em Save values into an itfile named after {\tt fname}. \item\end{CompactList}\item |
---|
[162] | 44 | virtual int {\bf add} (const {\bf RV} \&rv, string name=\char`\"{}\char`\"{})\label{classlogger_cfb250a559b71e07a1a6aa92f2185c1b} |
---|
[99] | 45 | |
---|
| 46 | \begin{CompactList}\small\item\em returns an identifier which will be later needed for calling the log() function \item\end{CompactList}\end{CompactItemize} |
---|
| 47 | \subsection*{Protected Attributes} |
---|
| 48 | \begin{CompactItemize} |
---|
| 49 | \item |
---|
| 50 | string {\bf dirname}\label{classdirfilelog_cba5ff1f74ed22910ed7d63aadf21771} |
---|
| 51 | |
---|
| 52 | \begin{CompactList}\small\item\em name of the directory \item\end{CompactList}\item |
---|
| 53 | Array$<$ string $>$ {\bf scalarnames}\label{classdirfilelog_854b7e7cc4cb40542b4a3ea06d915772} |
---|
| 54 | |
---|
| 55 | \begin{CompactList}\small\item\em Automatically generated. \item\end{CompactList}\item |
---|
| 56 | int {\bf maxlen}\label{classmemlog_4195f322897ededdac66c404b848ced3} |
---|
| 57 | |
---|
| 58 | \begin{CompactList}\small\item\em Maximum length of vectors stored in memory. \item\end{CompactList}\item |
---|
| 59 | int {\bf ind}\label{classmemlog_3410b4c002636508c43ddcba8d394520} |
---|
| 60 | |
---|
| 61 | \begin{CompactList}\small\item\em Currect record to be written. \item\end{CompactList}\item |
---|
| 62 | Array$<$ mat $>$ {\bf vectors}\label{classmemlog_f0f5bc7b83539ad102e8f65297852d91} |
---|
| 63 | |
---|
| 64 | \begin{CompactList}\small\item\em Storage. \item\end{CompactList}\item |
---|
| 65 | Array$<$ {\bf RV} $>$ {\bf entries}\label{classlogger_83eea0cf4fbca59474d015f751f128a7} |
---|
| 66 | |
---|
| 67 | \begin{CompactList}\small\item\em RVs of all logged variables. \item\end{CompactList}\item |
---|
| 68 | Array$<$ string $>$ {\bf names}\label{classlogger_39cb79e839ca8f8bb9dcbc8c5b9c7786} |
---|
| 69 | |
---|
| 70 | \begin{CompactList}\small\item\em Names of logged quantities, e.g. names of algorithm variants. \item\end{CompactList}\end{CompactItemize} |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | \subsection{Detailed Description} |
---|
| 74 | Logging into dirfile with buffer in memory. |
---|
| 75 | |
---|
| 76 | Dirfile is a special format used by the kst program. See documentation of kst for description. |
---|
| 77 | |
---|
| 78 | This format is used to store scalars, hence multivariate RVs must be separated. |
---|
| 79 | |
---|
| 80 | \subsection{Constructor \& Destructor Documentation} |
---|
| 81 | \index{dirfilelog@{dirfilelog}!dirfilelog@{dirfilelog}} |
---|
| 82 | \index{dirfilelog@{dirfilelog}!dirfilelog@{dirfilelog}} |
---|
[140] | 83 | \subsubsection[dirfilelog]{\setlength{\rightskip}{0pt plus 5cm}dirfilelog::dirfilelog (std::string {\em dirname0}, \/ int {\em maxlen0})\hspace{0.3cm}{\tt [inline]}}\label{classdirfilelog_802eeb6fc4ebf11d97638fd5dc651c68} |
---|
[99] | 84 | |
---|
| 85 | |
---|
| 86 | Default constructor. |
---|
| 87 | |
---|
| 88 | \begin{Desc} |
---|
| 89 | \item[Parameters:] |
---|
| 90 | \begin{description} |
---|
| 91 | \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} |
---|
| 92 | \end{Desc} |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | \subsection{Member Function Documentation} |
---|
| 96 | \index{dirfilelog@{dirfilelog}!write\_\-buffers@{write\_\-buffers}} |
---|
| 97 | \index{write\_\-buffers@{write\_\-buffers}!dirfilelog@{dirfilelog}} |
---|
[140] | 98 | \subsubsection[write\_\-buffers]{\setlength{\rightskip}{0pt plus 5cm}void dirfilelog::write\_\-buffers (int {\em Len})}\label{classdirfilelog_bd95cdb46af194245f88a7b4bf4c66c7} |
---|
[99] | 99 | |
---|
| 100 | |
---|
| 101 | Write memory storage to disk. |
---|
| 102 | |
---|
| 103 | \begin{Desc} |
---|
| 104 | \item[Parameters:] |
---|
| 105 | \begin{description} |
---|
| 106 | \item[{\em Len}]length of buffer to be written, if 0 the file is truncated at 0. \end{description} |
---|
| 107 | \end{Desc} |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | References dirname, logger::entries, memlog::maxlen, scalarnames, and memlog::vectors. |
---|
| 111 | |
---|
[162] | 112 | Referenced by finalize(), init(), and step(). |
---|
[99] | 113 | |
---|
| 114 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 115 | \item |
---|
[145] | 116 | work/git/mixpp/bdm/stat/{\bf loggers.h}\item |
---|
| 117 | work/git/mixpp/bdm/stat/loggers.cpp\end{CompactItemize} |
---|