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