\hypertarget{group__reader}{\section{Reader Interface}
\label{group__reader}\index{Reader Interface@{Reader Interface}}
}


The reader provides high level read access to traces disregarding the presence of streams.  


\subsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \hyperlink{OTF__Reader_8h}{O\+T\+F\+\_\+\+Reader.\+h}
\begin{DoxyCompactList}\small\item\em Transparently reads O\+T\+F traces which consist of multiple streams. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__reader_gab86a3457035cf020884f605bd6a5cb62}{typedef struct \hyperlink{structstruct__OTF__Reader}{struct\+\_\+\+O\+T\+F\+\_\+\+Reader} \hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader}}\label{group__reader_gab86a3457035cf020884f605bd6a5cb62}

\begin{DoxyCompactList}\small\item\em reader object \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$ \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open} (const char $\ast$namestub, \hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$manager)
\begin{DoxyCompactList}\small\item\em Open a Master\+Control file and return a O\+T\+F\+\_\+\+Reader. \end{DoxyCompactList}\item 
int \hyperlink{group__reader_ga88ee37087c21c20d3bdbd40a4290282e}{O\+T\+F\+\_\+\+Reader\+\_\+set\+Buffer\+Sizes} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Set the default buffer size for all buffers managed by this Reader. \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{group__reader_ga12ea4e9c29dfe88a5c59c746c7c19f85}{O\+T\+F\+\_\+\+Reader\+\_\+get\+Buffer\+Sizes} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Get the default buffer size. \end{DoxyCompactList}\item 
void \hyperlink{group__reader_ga6eecf44f62fa9c84c6ff1cb0a75759e0}{O\+T\+F\+\_\+\+Reader\+\_\+set\+Z\+Buffer\+Sizes} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Set the default zbuffer size for all buffers managed by this Reader. \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{group__reader_gaf1ca5536f24bc6c2c05ad26094e65537}{O\+T\+F\+\_\+\+Reader\+\_\+get\+Z\+Buffer\+Sizes} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Get the default zbuffer size. \end{DoxyCompactList}\item 
\hyperlink{group__mc_ga9e558ee162e965f8555109c23b939aea}{O\+T\+F\+\_\+\+Master\+Control} $\ast$ \hyperlink{group__reader_ga017770aa832f77cddc43e626d84e1293}{O\+T\+F\+\_\+\+Reader\+\_\+get\+Master\+Control} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Get a pointer to the mastercontrol of the reader. \end{DoxyCompactList}\item 
int \hyperlink{group__reader_ga4521c678e28a2f03b4b445a4e22d697b}{O\+T\+F\+\_\+\+Reader\+\_\+close} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Close an O\+T\+F\+\_\+\+Reader instance and all its related files. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_ga5b98d0678c01227f80a4ca77ed44e985}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Definitions} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, \hyperlink{group__ha_ga25c9228aeaddda3577266eab8a986b27}{O\+T\+F\+\_\+\+Handler\+Array} $\ast$handlers)
\begin{DoxyCompactList}\small\item\em This function reads all definitions from trace. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, \hyperlink{group__ha_ga25c9228aeaddda3577266eab8a986b27}{O\+T\+F\+\_\+\+Handler\+Array} $\ast$handlers)
\begin{DoxyCompactList}\small\item\em This function reads all events from trace and calls the appropriate handler sorted by time. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_gaa905f773802ed7738c73c855b061142e}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events\+Unsorted} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, \hyperlink{group__ha_ga25c9228aeaddda3577266eab8a986b27}{O\+T\+F\+\_\+\+Handler\+Array} $\ast$handlers)
\begin{DoxyCompactList}\small\item\em This function reads all events from trace and calls the appropriate handler N\+O\+T sorted by time. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_ga77c8e231493f186eb4fa800b66d1c843}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, \hyperlink{group__ha_ga25c9228aeaddda3577266eab8a986b27}{O\+T\+F\+\_\+\+Handler\+Array} $\ast$handlers)
\begin{DoxyCompactList}\small\item\em This function reads all snapshots from trace. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_ga927a9fa188d12c732cc3ea1d1edf9271}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots\+Unsorted} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, \hyperlink{group__ha_ga25c9228aeaddda3577266eab8a986b27}{O\+T\+F\+\_\+\+Handler\+Array} $\ast$handlers)
\begin{DoxyCompactList}\small\item\em This function reads all snapshots from trace and calls the appropriate handler N\+O\+T sorted by time. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_ga239cf2bfccfc48f2ce10a9cd4363f595}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, \hyperlink{group__ha_ga25c9228aeaddda3577266eab8a986b27}{O\+T\+F\+\_\+\+Handler\+Array} $\ast$handlers)
\begin{DoxyCompactList}\small\item\em This function reads all statistic records from trace. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_gace9a89de195b84880d6f36faac94f897}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics\+Unsorted} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, \hyperlink{group__ha_ga25c9228aeaddda3577266eab8a986b27}{O\+T\+F\+\_\+\+Handler\+Array} $\ast$handlers)
\begin{DoxyCompactList}\small\item\em This function reads all statistics from trace and calls the appropriate handler N\+O\+T sorted by time. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_gaa99409896c4c28dabb7c22cb6320a77e}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Markers} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, \hyperlink{group__ha_ga25c9228aeaddda3577266eab8a986b27}{O\+T\+F\+\_\+\+Handler\+Array} $\ast$handlers)
\begin{DoxyCompactList}\small\item\em This function reads all markers from trace. \end{DoxyCompactList}\item 
\hyperlink{group__rstream_ga49ebb89cbfba57c1191d09210e353771}{O\+T\+F\+\_\+\+R\+Stream} $\ast$ \hyperlink{group__reader_gac4dc704bfeb656b1dfe69405a8e74dd6}{O\+T\+F\+\_\+\+Reader\+\_\+get\+Stream} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint32\+\_\+t id)
\begin{DoxyCompactList}\small\item\em Searchs a reader stream and returns it. \end{DoxyCompactList}\item 
int \hyperlink{group__reader_ga1feafa299eb790d4723a73110b1e9b9c}{O\+T\+F\+\_\+\+Reader\+\_\+disable\+Process} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint32\+\_\+t process\+Id)
\begin{DoxyCompactList}\small\item\em disable given process. \end{DoxyCompactList}\item 
int \hyperlink{group__reader_ga4d5930f2a1e295182549b0b5ca2570b2}{O\+T\+F\+\_\+\+Reader\+\_\+enable\+Process} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint32\+\_\+t process\+Id)
\begin{DoxyCompactList}\small\item\em enable given process. \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{group__reader_gae7df1d3df8de7dd8b7e5c9986f450cb4}{O\+T\+F\+\_\+\+Reader\+\_\+get\+Process\+Status} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint32\+\_\+t process\+Id)
\begin{DoxyCompactList}\small\item\em Returns the current process status. \end{DoxyCompactList}\item 
int \hyperlink{group__reader_gab20968e02a2064313435702dfbc80cc6}{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint32\+\_\+t process\+Id, uint8\+\_\+t status)
\begin{DoxyCompactList}\small\item\em Sets the current status of the process. \end{DoxyCompactList}\item 
int \hyperlink{group__reader_gaee959aeef7294a050a2c6f82b1206fb4}{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status\+All} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint8\+\_\+t status)
\begin{DoxyCompactList}\small\item\em Sets the status for all processes with a single call. \end{DoxyCompactList}\item 
void \hyperlink{group__reader_ga81dbb74cfeb87ceb201aa1442cb96b10}{O\+T\+F\+\_\+\+Reader\+\_\+set\+Time\+Interval} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint64\+\_\+t min\+Time, uint64\+\_\+t max\+Time)
\begin{DoxyCompactList}\small\item\em Set the minimum time and the maximum time of the reader. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_ga5e74544ff4f3771991975a2c742d7f7e}{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Min} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Returns the begin of current time interval. \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_ga32af5cabf3712690b557a866d4115d21}{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Max} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Returns end of current time interval. \end{DoxyCompactList}\item 
void \hyperlink{group__reader_ga471e84b021e25d74ae26958166989646}{O\+T\+F\+\_\+\+Reader\+\_\+set\+Record\+Limit} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint64\+\_\+t limit)
\begin{DoxyCompactList}\small\item\em Set the maximum number of records delivered by a single call to O\+T\+F\+\_\+\+Reader\+\_\+read\+X\+Y\+Z(). \end{DoxyCompactList}\item 
uint64\+\_\+t \hyperlink{group__reader_ga2130c1f7edf0599d88c0c12c2b04ca05}{O\+T\+F\+\_\+\+Reader\+\_\+get\+Record\+Limit} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Returns the current record limit. \end{DoxyCompactList}\item 
void \hyperlink{group__reader_gaf6fdb8845c781fc4478fa06b333bb6db}{O\+T\+F\+\_\+\+Reader\+\_\+reset} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Resets all filters for timelimit, process selection and record count limit. \end{DoxyCompactList}\item 
int \hyperlink{group__reader_ga796355a226e493ffc8ded287114b27cc}{O\+T\+F\+\_\+\+Reader\+\_\+close\+All\+Streams} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader)
\begin{DoxyCompactList}\small\item\em Closes all streams that are open in the reader. \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{group__reader_gac2f8ec5c80e0c8b75c5a9226524d6b90}{O\+T\+F\+\_\+\+Reader\+\_\+event\+Time\+Progress} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint64\+\_\+t $\ast$minimum, uint64\+\_\+t $\ast$current, uint64\+\_\+t $\ast$maximum)
\begin{DoxyCompactList}\small\item\em Delivers a progress report for reading events. \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{group__reader_gafce315e5d20acc16831f128872758736}{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Time\+Progress} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint64\+\_\+t $\ast$minimum, uint64\+\_\+t $\ast$current, uint64\+\_\+t $\ast$maximum)
\begin{DoxyCompactList}\small\item\em Delivers a progress report for reading snapshots. \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{group__reader_gac10d1705a281ba8f6584b50acb362d3d}{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Time\+Progress} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint64\+\_\+t $\ast$minimum, uint64\+\_\+t $\ast$current, uint64\+\_\+t $\ast$maximum)
\begin{DoxyCompactList}\small\item\em Delivers a progress report for reading statistics. \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{group__reader_ga8022f4e7113dab4b9dc4429689ce97e7}{O\+T\+F\+\_\+\+Reader\+\_\+event\+Bytes\+Progress} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint64\+\_\+t $\ast$minimum, uint64\+\_\+t $\ast$current, uint64\+\_\+t $\ast$maximum)
\begin{DoxyCompactList}\small\item\em Delivers a progress report for reading events. \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{group__reader_gaccb4de969768b278b393c2b5dc0cf9c9}{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Bytes\+Progress} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint64\+\_\+t $\ast$minimum, uint64\+\_\+t $\ast$current, uint64\+\_\+t $\ast$maximum)
\begin{DoxyCompactList}\small\item\em Delivers a progress report for reading snapshots. \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{group__reader_ga0d8dc79e0595c9733a1320156d96fd02}{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Bytes\+Progress} (\hyperlink{group__reader_gab86a3457035cf020884f605bd6a5cb62}{O\+T\+F\+\_\+\+Reader} $\ast$reader, uint64\+\_\+t $\ast$minimum, uint64\+\_\+t $\ast$current, uint64\+\_\+t $\ast$maximum)
\begin{DoxyCompactList}\small\item\em Delivers a progress report for reading statistics. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The reader provides high level read access to traces disregarding the presence of streams. 

\hypertarget{group__reader_reader_example1}{}\subsection{A simple Example}\label{group__reader_reader_example1}

\begin{DoxyCode}
\textcolor{preprocessor}{#include <stdio.h>}
\textcolor{preprocessor}{#include <assert.h>}
\textcolor{preprocessor}{#include "\hyperlink{otf_8h}{otf.h}"}
\end{DoxyCode}


Define handlers/callbacks for the records you want to read. 
\begin{DoxyCode}
\textcolor{keywordtype}{int} handleEnter (\textcolor{keywordtype}{void} *userData, uint64\_t time, uint32\_t \textcolor{keyword}{function}, uint32\_t process, uint32\_t source) \{

    printf(\textcolor{stringliteral}{"we just entered function %u\(\backslash\)n"}, \textcolor{keyword}{function}); 

    \textcolor{keywordflow}{return} \hyperlink{OTF__Definitions_8h_a9854219f6e514795b1a40ee1ad029468}{OTF\_RETURN\_OK};
\}

\textcolor{keywordtype}{int} handleLeave (\textcolor{keywordtype}{void} *userData, uint64\_t time, uint32\_t \textcolor{keyword}{function}, uint32\_t process, uint32\_t source) \{

    printf(\textcolor{stringliteral}{"byebye\(\backslash\)n"});

    \textcolor{keywordflow}{return} \hyperlink{OTF__Definitions_8h_a9854219f6e514795b1a40ee1ad029468}{OTF\_RETURN\_OK};
\}
\end{DoxyCode}



\begin{DoxyCode}
\textcolor{keywordtype}{int} main( \textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char}** argv ) \{
\end{DoxyCode}
 \begin{DoxyVerb}Declare a file manager, a reader, and a handler array.
\end{DoxyVerb}
 
\begin{DoxyCode}
\hyperlink{structstruct__OTF__FileManager}{OTF\_FileManager}* manager;
\hyperlink{structstruct__OTF__Reader}{OTF\_Reader}* reader;
\hyperlink{structstruct__OTF__HandlerArray}{OTF\_HandlerArray}* handlers;
\end{DoxyCode}


Initialize the file manager. Do not open more than 100 files. 
\begin{DoxyCode}
manager= \hyperlink{group__fm_gaeaee6fa34285107dfdf42eb1905d5ce2}{OTF\_FileManager\_open}( 100 );
assert( manager );
\end{DoxyCode}


Initialize the handler array. 
\begin{DoxyCode}
handlers = \hyperlink{group__ha_ga7a735836565a79674f38e08caf20698f}{OTF\_HandlerArray\_open}();
assert( handlers );
\end{DoxyCode}


Initialize the reader. 
\begin{DoxyCode}
reader = \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{OTF\_Reader\_open}( \textcolor{stringliteral}{"mytrace"}, manager );
assert( reader );
\end{DoxyCode}


Register your callback functions to the handler array. 
\begin{DoxyCode}
\hyperlink{group__ha_ga2f7ab5597bfbaa182d4cf471dc28f1da}{OTF\_HandlerArray\_setHandler}( handlers, (
      \hyperlink{group__ha_gab82e91b18ea38538fcc52af1b5c894e1}{OTF\_FunctionPointer}*) handleEnter, OTF\_ENTER\_RECORD );
\hyperlink{group__ha_ga2f7ab5597bfbaa182d4cf471dc28f1da}{OTF\_HandlerArray\_setHandler}( handlers, (
      \hyperlink{group__ha_gab82e91b18ea38538fcc52af1b5c894e1}{OTF\_FunctionPointer}*) handleLeave, OTF\_LEAVE\_RECORD );
\end{DoxyCode}


\begin{DoxyVerb}  Do the actual reading.
\end{DoxyVerb}
 
\begin{DoxyCode}
\hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{OTF\_Reader\_readEvents}( reader, handlers );
\end{DoxyCode}


\begin{DoxyVerb}  Clean everything up before exiting the program.
\end{DoxyVerb}
 
\begin{DoxyCode}
    \hyperlink{group__reader_ga4521c678e28a2f03b4b445a4e22d697b}{OTF\_Reader\_close}( reader );
    \hyperlink{group__ha_gab5a17464f32f6b9ddaf0cf6984f953db}{OTF\_HandlerArray\_close}( handlers );
    \hyperlink{group__fm_ga45307a172ee04fa888e9e41dc7f83465}{OTF\_FileManager\_close}( manager );

    \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCode}


Compile and link this using \$ gcc -\/o test test.\+c {\ttfamily otfconfig -\/-\/libs}.\hypertarget{group__reader_reader_example2}{}\subsection{A second, more complex Example}\label{group__reader_reader_example2}
Same as before 
\begin{DoxyCode}
\textcolor{preprocessor}{#include <stdio.h>}
\textcolor{preprocessor}{#include <assert.h>}
\textcolor{preprocessor}{#include "\hyperlink{otf_8h}{otf.h}"}
\end{DoxyCode}


Create a structure, which holds information needed in every handler. We will register this structure to the handlers, so that the user\+Data pointer in every handler will point to it. In this example we just want to count the occurences. 
\begin{DoxyCode}
\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\{
    uint64\_t count;
\} \hyperlink{structHandlerArgument}{HandlerArgument};
\end{DoxyCode}


Define four handlers. In every handler we will increase Handler\+Argument\+::count. 
\begin{DoxyCode}
\textcolor{keywordtype}{int} handleDefProcess (\textcolor{keywordtype}{void} *userData, uint32\_t stream, uint32\_t process, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name, uint32\_t parent)
       \{
    ((\hyperlink{structHandlerArgument}{HandlerArgument}*)userData)->count++;
    \textcolor{keywordflow}{return} \hyperlink{OTF__Definitions_8h_a9854219f6e514795b1a40ee1ad029468}{OTF\_RETURN\_OK};
\}
\textcolor{keywordtype}{int} handleDefFunction (\textcolor{keywordtype}{void} *userData, uint32\_t stream, uint32\_t func, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name, uint32\_t funcGroup
      , uint32\_t source) \{
    ((\hyperlink{structHandlerArgument}{HandlerArgument}*)userData)->count++;
    \textcolor{keywordflow}{return} \hyperlink{OTF__Definitions_8h_a9854219f6e514795b1a40ee1ad029468}{OTF\_RETURN\_OK};
\}
\textcolor{keywordtype}{int} handleEnter (\textcolor{keywordtype}{void} *userData, uint64\_t time, uint32\_t \textcolor{keyword}{function}, uint32\_t process, uint32\_t source) \{
    ((\hyperlink{structHandlerArgument}{HandlerArgument}*)userData)->count++;
    \textcolor{keywordflow}{return} \hyperlink{OTF__Definitions_8h_a9854219f6e514795b1a40ee1ad029468}{OTF\_RETURN\_OK};
\}
\textcolor{keywordtype}{int} handleLeave (\textcolor{keywordtype}{void} *userData, uint64\_t time, uint32\_t \textcolor{keyword}{function}, uint32\_t process, uint32\_t source) \{
    ((\hyperlink{structHandlerArgument}{HandlerArgument}*)userData)->count++;
    \textcolor{keywordflow}{return} \hyperlink{OTF__Definitions_8h_a9854219f6e514795b1a40ee1ad029468}{OTF\_RETURN\_OK};
\}
\end{DoxyCode}


Same as before 
\begin{DoxyCode}
\textcolor{keywordtype}{int} main( \textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char}** argv ) \{

    \hyperlink{structstruct__OTF__FileManager}{OTF\_FileManager}* manager;
    \hyperlink{structstruct__OTF__Reader}{OTF\_Reader}* reader;
    \hyperlink{structstruct__OTF__HandlerArray}{OTF\_HandlerArray}* handlers;
\end{DoxyCode}
 \begin{DoxyVerb}We need some additional variables for the read progress
\end{DoxyVerb}
 
\begin{DoxyCode}
uint64\_t minbytes;
uint64\_t curbytes;
uint64\_t maxbytes;
\end{DoxyCode}



\begin{DoxyCode}
uint64\_t ret;
\hyperlink{structHandlerArgument}{HandlerArgument} ha;
ha.count = 0;

manager= \hyperlink{group__fm_gaeaee6fa34285107dfdf42eb1905d5ce2}{OTF\_FileManager\_open}( 100 );
assert( manager );

handlers = \hyperlink{group__ha_ga7a735836565a79674f38e08caf20698f}{OTF\_HandlerArray\_open}();
assert( handlers );

reader = \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{OTF\_Reader\_open}( \textcolor{stringliteral}{"mytrace"}, manager );
assert( reader );
\end{DoxyCode}


Register handlers for define process records, define function records, enter records and leave records


\begin{DoxyCode}
\hyperlink{group__ha_ga2f7ab5597bfbaa182d4cf471dc28f1da}{OTF\_HandlerArray\_setHandler}( handlers, (
      \hyperlink{group__ha_gab82e91b18ea38538fcc52af1b5c894e1}{OTF\_FunctionPointer}*) handleDefProcess, OTF\_DEFPROCESS\_RECORD );
\end{DoxyCode}
 Register the first handler argument ha to the handler where it should be passed into. 
\begin{DoxyCode}
\hyperlink{group__ha_ga65c9d10752139ca29dedd1baeebc146e}{OTF\_HandlerArray\_setFirstHandlerArg}( handlers, &ha, 
      OTF\_DEFPROCESS\_RECORD );
\end{DoxyCode}



\begin{DoxyCode}
\hyperlink{group__ha_ga2f7ab5597bfbaa182d4cf471dc28f1da}{OTF\_HandlerArray\_setHandler}( handlers, (
      \hyperlink{group__ha_gab82e91b18ea38538fcc52af1b5c894e1}{OTF\_FunctionPointer}*) handleDefFunction, OTF\_DEFFUNCTION\_RECORD );
\hyperlink{group__ha_ga65c9d10752139ca29dedd1baeebc146e}{OTF\_HandlerArray\_setFirstHandlerArg}( handlers, &ha, 
      OTF\_DEFFUNCTION\_RECORD );

\hyperlink{group__ha_ga2f7ab5597bfbaa182d4cf471dc28f1da}{OTF\_HandlerArray\_setHandler}( handlers, (
      \hyperlink{group__ha_gab82e91b18ea38538fcc52af1b5c894e1}{OTF\_FunctionPointer}*) handleEnter, OTF\_ENTER\_RECORD );
\hyperlink{group__ha_ga65c9d10752139ca29dedd1baeebc146e}{OTF\_HandlerArray\_setFirstHandlerArg}( handlers, &ha, OTF\_ENTER\_RECORD );

\hyperlink{group__ha_ga2f7ab5597bfbaa182d4cf471dc28f1da}{OTF\_HandlerArray\_setHandler}( handlers, (
      \hyperlink{group__ha_gab82e91b18ea38538fcc52af1b5c894e1}{OTF\_FunctionPointer}*) handleLeave, OTF\_LEAVE\_RECORD );
\hyperlink{group__ha_ga65c9d10752139ca29dedd1baeebc146e}{OTF\_HandlerArray\_setFirstHandlerArg}( handlers, &ha, OTF\_LEAVE\_RECORD );
\end{DoxyCode}


Read definitions ( .def files). Inside this function the def\+Process and def\+Function handler will be called. 
\begin{DoxyCode}
\hyperlink{group__reader_ga5b98d0678c01227f80a4ca77ed44e985}{OTF\_Reader\_readDefinitions}( reader, handlers );
\end{DoxyCode}


Set the record limit to zero and read the events once. This initializes internal datastructures needed for getting the reading progress. 
\begin{DoxyCode}
\hyperlink{group__reader_ga471e84b021e25d74ae26958166989646}{OTF\_Reader\_setRecordLimit}( reader, 0 );
\hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{OTF\_Reader\_readEvents}( reader, handlers );
\end{DoxyCode}


To leave \hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events()} once in a while, in order to update the progress, set the record limit to an appropriate number. 100000 in this case.


\begin{DoxyCode}
\hyperlink{group__reader_ga471e84b021e25d74ae26958166989646}{OTF\_Reader\_setRecordLimit}( reader, 100000 );
\end{DoxyCode}


Read the trace until no records are left. 
\begin{DoxyCode}
\textcolor{keywordflow}{while} ( 0 != ( ret= \hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{OTF\_Reader\_readEvents}( reader, handlers ) ) ) \{
\end{DoxyCode}


If an error occurs, leave the program. 
\begin{DoxyCode}
\textcolor{keywordflow}{if}( OTF\_READ\_ERROR == ret ) \{
    fprintf( stderr, \textcolor{stringliteral}{"Error while reading events. Aborting\(\backslash\)n"} );

    \hyperlink{group__reader_ga4521c678e28a2f03b4b445a4e22d697b}{OTF\_Reader\_close}( reader );
    \hyperlink{group__ha_gab5a17464f32f6b9ddaf0cf6984f953db}{OTF\_HandlerArray\_close}( handlers );
    \hyperlink{group__fm_ga45307a172ee04fa888e9e41dc7f83465}{OTF\_FileManager\_close}( manager );

    exit(1);
\}
\end{DoxyCode}
 Update the progress. 
\begin{DoxyCode}
\hyperlink{group__reader_ga8022f4e7113dab4b9dc4429689ce97e7}{OTF\_Reader\_eventBytesProgress}( reader, &minbytes, &curbytes, &maxbytes );
printf( \textcolor{stringliteral}{"%llub / %llub\(\backslash\)n"}, (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long} \textcolor{keywordtype}{unsigned})(curbytes - minbytes), (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long} \textcolor{keywordtype}{unsigned})(maxbytes-
      minbytes) );
\end{DoxyCode}



\begin{DoxyCode}
\}
\end{DoxyCode}
 Print out the gathered count of occurences of the four record types. 
\begin{DoxyCode}
printf( \textcolor{stringliteral}{"count: %llu\(\backslash\)n"}, (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long} \textcolor{keywordtype}{unsigned}) ha.count );
\end{DoxyCode}


Finish everything 
\begin{DoxyCode}
    \hyperlink{group__reader_ga4521c678e28a2f03b4b445a4e22d697b}{OTF\_Reader\_close}( reader );
    \hyperlink{group__ha_gab5a17464f32f6b9ddaf0cf6984f953db}{OTF\_HandlerArray\_close}( handlers );
    \hyperlink{group__fm_ga45307a172ee04fa888e9e41dc7f83465}{OTF\_FileManager\_close}( manager );

    \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCode}
 Compile and link this using \$ gcc -\/o test test.\+c {\ttfamily otfconfig -\/-\/libs}.

When executing this test the output will be something like this\+: \begin{DoxyVerb}*   4194304b / 73530754b
*   [..]
*   73530754b / 73530754b
*   count: 4582694 \end{DoxyVerb}
 

\subsection{Function Documentation}
\hypertarget{group__reader_ga4521c678e28a2f03b4b445a4e22d697b}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+close@{O\+T\+F\+\_\+\+Reader\+\_\+close}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+close@{O\+T\+F\+\_\+\+Reader\+\_\+close}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+close}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+Reader\+\_\+close (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_ga4521c678e28a2f03b4b445a4e22d697b}


Close an O\+T\+F\+\_\+\+Reader instance and all its related files. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if instance was closed successfully and 0 otherwise. 
\end{DoxyReturn}
\hypertarget{group__reader_ga796355a226e493ffc8ded287114b27cc}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+close\+All\+Streams@{O\+T\+F\+\_\+\+Reader\+\_\+close\+All\+Streams}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+close\+All\+Streams@{O\+T\+F\+\_\+\+Reader\+\_\+close\+All\+Streams}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+close\+All\+Streams}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+Reader\+\_\+close\+All\+Streams (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_ga796355a226e493ffc8ded287114b27cc}


Closes all streams that are open in the reader. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::n, O\+T\+F\+\_\+\+R\+Stream\+\_\+close(), and struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::stream.

\hypertarget{group__reader_ga1feafa299eb790d4723a73110b1e9b9c}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+disable\+Process@{O\+T\+F\+\_\+\+Reader\+\_\+disable\+Process}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+disable\+Process@{O\+T\+F\+\_\+\+Reader\+\_\+disable\+Process}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+disable\+Process}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+Reader\+\_\+disable\+Process (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint32\+\_\+t}]{process\+Id}
\end{DoxyParamCaption}
)}}\label{group__reader_ga1feafa299eb790d4723a73110b1e9b9c}


disable given process. 

deprecated, use '\hyperlink{group__reader_gab20968e02a2064313435702dfbc80cc6}{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status()}' instead.

This funktion will destroy a pending read operation, i.\+e. a read operation currently interrupted cannot be continued! \hypertarget{group__reader_ga4d5930f2a1e295182549b0b5ca2570b2}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+enable\+Process@{O\+T\+F\+\_\+\+Reader\+\_\+enable\+Process}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+enable\+Process@{O\+T\+F\+\_\+\+Reader\+\_\+enable\+Process}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+enable\+Process}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+Reader\+\_\+enable\+Process (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint32\+\_\+t}]{process\+Id}
\end{DoxyParamCaption}
)}}\label{group__reader_ga4d5930f2a1e295182549b0b5ca2570b2}


enable given process. 

deprecated, use '\hyperlink{group__reader_gab20968e02a2064313435702dfbc80cc6}{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status()}' instead.

This funktion will destroy a pending read operation, i.\+e. a read operation currently interrupted cannot be continued! \hypertarget{group__reader_ga8022f4e7113dab4b9dc4429689ce97e7}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+event\+Bytes\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+event\+Bytes\+Progress}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+event\+Bytes\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+event\+Bytes\+Progress}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+event\+Bytes\+Progress}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+event\+Bytes\+Progress (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint64\+\_\+t $\ast$}]{minimum, }
\item[{uint64\+\_\+t $\ast$}]{current, }
\item[{uint64\+\_\+t $\ast$}]{maximum}
\end{DoxyParamCaption}
)}}\label{group__reader_ga8022f4e7113dab4b9dc4429689ce97e7}


Delivers a progress report for reading events. 

\hyperlink{structProgress}{Progress} is given in terms of bytes. The percentage can be computed as ( current -\/ minimum ) / ( maximum -\/ minimum ).

A\+T\+T\+E\+N\+T\+I\+O\+N\+: This is only a rough estimate of the progress, because it is computed based on the block I/\+O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also \hyperlink{group__reader_gac2f8ec5c80e0c8b75c5a9226524d6b90}{O\+T\+F\+\_\+\+Reader\+\_\+event\+Time\+Progress()}\+:

This computation takes the read bytes of every active stream into account. The progress report is only valid after one or several calls to \hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events()}. Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' $>$ 'maximum' the values are invalid.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em minimum} & Return value for the minium bytes read ( is 0 everytime ). \\
\hline
{\em current} & Return value for the current bytes read. \\
\hline
{\em maximum} & Return value for the filesize.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, and O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos().

\hypertarget{group__reader_gac2f8ec5c80e0c8b75c5a9226524d6b90}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+event\+Time\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+event\+Time\+Progress}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+event\+Time\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+event\+Time\+Progress}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+event\+Time\+Progress}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+event\+Time\+Progress (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint64\+\_\+t $\ast$}]{minimum, }
\item[{uint64\+\_\+t $\ast$}]{current, }
\item[{uint64\+\_\+t $\ast$}]{maximum}
\end{DoxyParamCaption}
)}}\label{group__reader_gac2f8ec5c80e0c8b75c5a9226524d6b90}


Delivers a progress report for reading events. 

It is given in terms of time stamps. A percentage can be computed as ( current -\/ minimum ) / ( maximum -\/ minimum ). This computation takes restricted time intervals into account which is not possible with \hyperlink{group__reader_ga8022f4e7113dab4b9dc4429689ce97e7}{O\+T\+F\+\_\+\+Reader\+\_\+event\+Bytes\+Progress()}.

The progress report is only valid after one or several calls to \hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events()}. Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' $>$ 'maximum' the values are invalid.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em minimum} & Return value for the minium time. \\
\hline
{\em current} & Return value for the current time. \\
\hline
{\em maximum} & Return value for the maximum time.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min.



Referenced by O\+T\+F\+\_\+\+Reader\+\_\+event\+Progress().

\hypertarget{group__reader_ga12ea4e9c29dfe88a5c59c746c7c19f85}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+get\+Buffer\+Sizes@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Buffer\+Sizes}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+get\+Buffer\+Sizes@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Buffer\+Sizes}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+get\+Buffer\+Sizes}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+get\+Buffer\+Sizes (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_ga12ea4e9c29dfe88a5c59c746c7c19f85}


Get the default buffer size. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Default buffer size. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::buffersizes.

\hypertarget{group__reader_ga017770aa832f77cddc43e626d84e1293}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+get\+Master\+Control@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Master\+Control}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+get\+Master\+Control@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Master\+Control}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+get\+Master\+Control}]{\setlength{\rightskip}{0pt plus 5cm}{\bf O\+T\+F\+\_\+\+Master\+Control}$\ast$ O\+T\+F\+\_\+\+Reader\+\_\+get\+Master\+Control (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_ga017770aa832f77cddc43e626d84e1293}


Get a pointer to the mastercontrol of the reader. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the mastercontrol. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::mc.

\hypertarget{group__reader_gae7df1d3df8de7dd8b7e5c9986f450cb4}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+get\+Process\+Status@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Process\+Status}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+get\+Process\+Status@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Process\+Status}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+get\+Process\+Status}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+get\+Process\+Status (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint32\+\_\+t}]{process\+Id}
\end{DoxyParamCaption}
)}}\label{group__reader_gae7df1d3df8de7dd8b7e5c9986f450cb4}


Returns the current process status. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em process\+Id} & Identifier of the process to get the status from\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Current process status. '1' for enabled, '0' for disabled or unknown.
\end{DoxyReturn}
Returns the current process status. \hypertarget{group__reader_ga2130c1f7edf0599d88c0c12c2b04ca05}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+get\+Record\+Limit@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Record\+Limit}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+get\+Record\+Limit@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Record\+Limit}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+get\+Record\+Limit}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+get\+Record\+Limit (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_ga2130c1f7edf0599d88c0c12c2b04ca05}


Returns the current record limit. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Current record limit. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::record\+Limit.

\hypertarget{group__reader_gac4dc704bfeb656b1dfe69405a8e74dd6}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+get\+Stream@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Stream}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+get\+Stream@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Stream}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+get\+Stream}]{\setlength{\rightskip}{0pt plus 5cm}{\bf O\+T\+F\+\_\+\+R\+Stream}$\ast$ O\+T\+F\+\_\+\+Reader\+\_\+get\+Stream (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint32\+\_\+t}]{id}
\end{DoxyParamCaption}
)}}\label{group__reader_gac4dc704bfeb656b1dfe69405a8e74dd6}


Searchs a reader stream and returns it. 

If the stream does not exist it will be created.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em id} & Identifier of the stream searched.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Initialised O\+T\+F\+\_\+\+R\+Stream object. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::buffersizes, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Stream\+::id, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::manager, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::n, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::namestub, O\+T\+F\+\_\+\+R\+Stream\+\_\+open(), O\+T\+F\+\_\+\+R\+Stream\+\_\+set\+Buffer\+Sizes(), O\+T\+F\+\_\+\+R\+Stream\+\_\+set\+Z\+Buffer\+Sizes(), and struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::stream.

\hypertarget{group__reader_ga32af5cabf3712690b557a866d4115d21}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Max@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Max}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Max@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Max}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Max}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Max (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_ga32af5cabf3712690b557a866d4115d21}


Returns end of current time interval. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
\end{DoxyParams}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::max\+Time.

\hypertarget{group__reader_ga5e74544ff4f3771991975a2c742d7f7e}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Min@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Min}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Min@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Min}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Min}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+get\+Time\+Interval\+Min (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_ga5e74544ff4f3771991975a2c742d7f7e}


Returns the begin of current time interval. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
\end{DoxyParams}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::min\+Time.

\hypertarget{group__reader_gaf1ca5536f24bc6c2c05ad26094e65537}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+get\+Z\+Buffer\+Sizes@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Z\+Buffer\+Sizes}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+get\+Z\+Buffer\+Sizes@{O\+T\+F\+\_\+\+Reader\+\_\+get\+Z\+Buffer\+Sizes}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+get\+Z\+Buffer\+Sizes}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+get\+Z\+Buffer\+Sizes (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_gaf1ca5536f24bc6c2c05ad26094e65537}


Get the default zbuffer size. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zbuffer size. 
\end{DoxyReturn}
\hypertarget{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+open@{O\+T\+F\+\_\+\+Reader\+\_\+open}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+open@{O\+T\+F\+\_\+\+Reader\+\_\+open}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+open}]{\setlength{\rightskip}{0pt plus 5cm}{\bf O\+T\+F\+\_\+\+Reader}$\ast$ O\+T\+F\+\_\+\+Reader\+\_\+open (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{namestub, }
\item[{{\bf O\+T\+F\+\_\+\+File\+Manager} $\ast$}]{manager}
\end{DoxyParamCaption}
)}}\label{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}


Open a Master\+Control file and return a O\+T\+F\+\_\+\+Reader. 


\begin{DoxyParams}{Parameters}
{\em namestub} & \hyperlink{classFile}{File} name prefix which is going to be used by all sub-\/files which belong to the trace. \\
\hline
{\em file\+Manager} & \hyperlink{classFile}{File} handle manager.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Initialized O\+T\+F\+\_\+\+Reader instance or 0 if a failure occurred. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::manager, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::mc, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::namestub, O\+T\+F\+\_\+\+Master\+Control\+\_\+new(), O\+T\+F\+\_\+\+Master\+Control\+\_\+read(), O\+T\+F\+\_\+strip\+Filename(), struct\+\_\+\+O\+T\+F\+\_\+\+Process\+List\+::processes, and struct\+\_\+\+O\+T\+F\+\_\+\+Process\+List\+::status.

\hypertarget{group__reader_ga5b98d0678c01227f80a4ca77ed44e985}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+read\+Definitions@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Definitions}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+read\+Definitions@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Definitions}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+read\+Definitions}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+read\+Definitions (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{{\bf O\+T\+F\+\_\+\+Handler\+Array} $\ast$}]{handlers}
\end{DoxyParamCaption}
)}}\label{group__reader_ga5b98d0678c01227f80a4ca77ed44e985}


This function reads all definitions from trace. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em handlers} & Pointer to the handler array.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of records successfully read or O\+T\+F\+\_\+\+R\+E\+A\+D\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Map\+Entry\+::argument, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::buffer, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::end, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::mc, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, O\+T\+F\+\_\+\+Key\+Value\+List\+\_\+reset(), O\+T\+F\+\_\+\+Master\+Control\+\_\+get\+Entry\+By\+Index(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+Record(), O\+T\+F\+\_\+\+Reader\+\_\+parse\+Def\+Record(), struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::pos, and struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::record\+Limit.

\hypertarget{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+read\+Events@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+read\+Events (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{{\bf O\+T\+F\+\_\+\+Handler\+Array} $\ast$}]{handlers}
\end{DoxyParamCaption}
)}}\label{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}


This function reads all events from trace and calls the appropriate handler sorted by time. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em handlers} & Pointer to the handler array.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of records successfully read or O\+T\+F\+\_\+\+R\+E\+A\+D\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::buffer, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::end, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::first\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::last\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::max\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::min\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, O\+T\+F\+\_\+\+Key\+Value\+List\+\_\+reset(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Properties(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Size(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+Record(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+read\+Newline(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+search\+Time(), O\+T\+F\+\_\+\+Reader\+\_\+parse\+Event\+Record(), struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::pos, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::process, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::record\+Limit, and struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::time.

\hypertarget{group__reader_gaa905f773802ed7738c73c855b061142e}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+read\+Events\+Unsorted@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events\+Unsorted}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events\+Unsorted@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events\+Unsorted}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events\+Unsorted}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+read\+Events\+Unsorted (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{{\bf O\+T\+F\+\_\+\+Handler\+Array} $\ast$}]{handlers}
\end{DoxyParamCaption}
)}}\label{group__reader_gaa905f773802ed7738c73c855b061142e}


This function reads all events from trace and calls the appropriate handler N\+O\+T sorted by time. 

It calls every handler in O\+N\+E stream sorted by time. And walks through the streams one by one. ( So the handlers of one process will be called, sorted by time, too )

This function is faster than \hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events()}, especially for a bigger number of streams

\begin{DoxySeeAlso}{See also}
\hyperlink{group__reader_gaa6e7a8f5e3e422d4bbef238e28eb4978}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Events()} 
\end{DoxySeeAlso}


References struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::buffer, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::end, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::first\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::last\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::max\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::min\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, O\+T\+F\+\_\+\+Key\+Value\+List\+\_\+reset(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Properties(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Size(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+Record(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+read\+Newline(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+search\+Time(), O\+T\+F\+\_\+\+Reader\+\_\+parse\+Event\+Record(), struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::pos, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::process, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::s, and struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::time.

\hypertarget{group__reader_gaa99409896c4c28dabb7c22cb6320a77e}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+read\+Markers@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Markers}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+read\+Markers@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Markers}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+read\+Markers}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+read\+Markers (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{{\bf O\+T\+F\+\_\+\+Handler\+Array} $\ast$}]{handlers}
\end{DoxyParamCaption}
)}}\label{group__reader_gaa99409896c4c28dabb7c22cb6320a77e}


This function reads all markers from trace. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em handlers} & Pointer to the handler array.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of records successfully read or O\+T\+F\+\_\+\+R\+E\+A\+D\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Map\+Entry\+::argument, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::buffer, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::end, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::mc, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, O\+T\+F\+\_\+\+Key\+Value\+List\+\_\+reset(), O\+T\+F\+\_\+\+Master\+Control\+\_\+get\+Entry\+By\+Index(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+Record(), O\+T\+F\+\_\+\+Reader\+\_\+parse\+Marker\+Record(), struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::pos, and struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::record\+Limit.

\hypertarget{group__reader_ga77c8e231493f186eb4fa800b66d1c843}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{{\bf O\+T\+F\+\_\+\+Handler\+Array} $\ast$}]{handlers}
\end{DoxyParamCaption}
)}}\label{group__reader_ga77c8e231493f186eb4fa800b66d1c843}


This function reads all snapshots from trace. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em handlers} & Pointer to the handler array.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of records successfully read or O\+T\+F\+\_\+\+R\+E\+A\+D\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::buffer, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::end, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::first\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::last\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::max\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::min\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, O\+T\+F\+\_\+\+Key\+Value\+List\+\_\+reset(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Properties(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Size(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+Record(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+read\+Newline(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+search\+Time(), O\+T\+F\+\_\+\+Reader\+\_\+parse\+Snapshots\+Record(), struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::pos, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::process, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::record\+Limit, and struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::time.

\hypertarget{group__reader_ga927a9fa188d12c732cc3ea1d1edf9271}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots\+Unsorted@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots\+Unsorted}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots\+Unsorted@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots\+Unsorted}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots\+Unsorted}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots\+Unsorted (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{{\bf O\+T\+F\+\_\+\+Handler\+Array} $\ast$}]{handlers}
\end{DoxyParamCaption}
)}}\label{group__reader_ga927a9fa188d12c732cc3ea1d1edf9271}


This function reads all snapshots from trace and calls the appropriate handler N\+O\+T sorted by time. 

It calls every handler in O\+N\+E stream sorted by time. And it walks through the streams one by one. ( So the handlers of one process will be called, sorted by time, too )

This function is faster than \hyperlink{group__reader_ga77c8e231493f186eb4fa800b66d1c843}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots()}, especially for a bigger number of streams

\begin{DoxySeeAlso}{See also}
\hyperlink{group__reader_ga77c8e231493f186eb4fa800b66d1c843}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots()} 
\end{DoxySeeAlso}


References struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::buffer, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::end, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::first\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::last\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::max\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::min\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, O\+T\+F\+\_\+\+Key\+Value\+List\+\_\+reset(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Properties(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Size(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+Record(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+read\+Newline(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+search\+Time(), O\+T\+F\+\_\+\+Reader\+\_\+parse\+Snapshots\+Record(), struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::pos, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::process, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::s, and struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::time.

\hypertarget{group__reader_ga239cf2bfccfc48f2ce10a9cd4363f595}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{{\bf O\+T\+F\+\_\+\+Handler\+Array} $\ast$}]{handlers}
\end{DoxyParamCaption}
)}}\label{group__reader_ga239cf2bfccfc48f2ce10a9cd4363f595}


This function reads all statistic records from trace. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em handlers} & Pointer to the handler array.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of records successfully read or O\+T\+F\+\_\+\+R\+E\+A\+D\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::buffer, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::end, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::first\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::last\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::max\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::min\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, O\+T\+F\+\_\+\+Key\+Value\+List\+\_\+reset(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Properties(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Size(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+Record(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+read\+Newline(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+search\+Time(), O\+T\+F\+\_\+\+Reader\+\_\+parse\+Statistics\+Record(), struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::pos, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::process, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::record\+Limit, and struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::time.

\hypertarget{group__reader_gace9a89de195b84880d6f36faac94f897}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics\+Unsorted@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics\+Unsorted}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics\+Unsorted@{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics\+Unsorted}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics\+Unsorted}]{\setlength{\rightskip}{0pt plus 5cm}uint64\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics\+Unsorted (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{{\bf O\+T\+F\+\_\+\+Handler\+Array} $\ast$}]{handlers}
\end{DoxyParamCaption}
)}}\label{group__reader_gace9a89de195b84880d6f36faac94f897}


This function reads all statistics from trace and calls the appropriate handler N\+O\+T sorted by time. 

It calls every handler in O\+N\+E stream sorted by time. And it walks through the streams one by one. ( So the handlers of one process will be called, sorted by time, too )

This function is faster than \hyperlink{group__reader_ga239cf2bfccfc48f2ce10a9cd4363f595}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics()}, especially for a bigger number of streams

\begin{DoxySeeAlso}{See also}
\hyperlink{group__reader_ga239cf2bfccfc48f2ce10a9cd4363f595}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics()} 
\end{DoxySeeAlso}


References struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::buffer, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::end, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::first\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::last\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::max\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::min\+Time, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, O\+T\+F\+\_\+\+Key\+Value\+List\+\_\+reset(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Properties(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Size(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+Record(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+read\+Newline(), O\+T\+F\+\_\+\+R\+Buffer\+\_\+search\+Time(), O\+T\+F\+\_\+\+Reader\+\_\+parse\+Statistics\+Record(), struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::pos, struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::process, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::s, and struct\+\_\+\+O\+T\+F\+\_\+\+R\+Buffer\+::time.

\hypertarget{group__reader_gaf6fdb8845c781fc4478fa06b333bb6db}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+reset@{O\+T\+F\+\_\+\+Reader\+\_\+reset}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+reset@{O\+T\+F\+\_\+\+Reader\+\_\+reset}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+reset}]{\setlength{\rightskip}{0pt plus 5cm}void O\+T\+F\+\_\+\+Reader\+\_\+reset (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader}
\end{DoxyParamCaption}
)}}\label{group__reader_gaf6fdb8845c781fc4478fa06b333bb6db}


Resets all filters for timelimit, process selection and record count limit. 


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
\end{DoxyParams}


References O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status\+All(), O\+T\+F\+\_\+\+Reader\+\_\+set\+Record\+Limit(), and O\+T\+F\+\_\+\+Reader\+\_\+set\+Time\+Interval().

\hypertarget{group__reader_ga88ee37087c21c20d3bdbd40a4290282e}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+set\+Buffer\+Sizes@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Buffer\+Sizes}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+set\+Buffer\+Sizes@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Buffer\+Sizes}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+set\+Buffer\+Sizes}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+Reader\+\_\+set\+Buffer\+Sizes (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}}\label{group__reader_ga88ee37087c21c20d3bdbd40a4290282e}


Set the default buffer size for all buffers managed by this Reader. 

This is only effective for future buffers and will not change already allocated buffers. Those can be changed with the buffers directly.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em size} & Intended buffer size.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::buffersizes.

\hypertarget{group__reader_gab20968e02a2064313435702dfbc80cc6}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint32\+\_\+t}]{process\+Id, }
\item[{uint8\+\_\+t}]{status}
\end{DoxyParamCaption}
)}}\label{group__reader_gab20968e02a2064313435702dfbc80cc6}


Sets the current status of the process. 

This function will destroy a pending read operation, i.\+e. a read operation currently interrupted cannot be continued!


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em process\+Id} & Identifier of the process. \\
\hline
{\em status} & new status of the process. '1' for enabled, '0' for disabled or unknown.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs.
\end{DoxyReturn}
Sets the current status of the process.

status is '0' for disabled and '1' for enabled \hypertarget{group__reader_gaee959aeef7294a050a2c6f82b1206fb4}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status\+All@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status\+All}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status\+All@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status\+All}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status\+All}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+Reader\+\_\+set\+Process\+Status\+All (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint8\+\_\+t}]{status}
\end{DoxyParamCaption}
)}}\label{group__reader_gaee959aeef7294a050a2c6f82b1206fb4}


Sets the status for all processes with a single call. 

This function will destroy a pending read operation, i.\+e. a read operation currently interrupted cannot be continued!


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em status} & new status of the process.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


Referenced by O\+T\+F\+\_\+\+Reader\+\_\+reset().

\hypertarget{group__reader_ga471e84b021e25d74ae26958166989646}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+set\+Record\+Limit@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Record\+Limit}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+set\+Record\+Limit@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Record\+Limit}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+set\+Record\+Limit}]{\setlength{\rightskip}{0pt plus 5cm}void O\+T\+F\+\_\+\+Reader\+\_\+set\+Record\+Limit (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint64\+\_\+t}]{limit}
\end{DoxyParamCaption}
)}}\label{group__reader_ga471e84b021e25d74ae26958166989646}


Set the maximum number of records delivered by a single call to O\+T\+F\+\_\+\+Reader\+\_\+read\+X\+Y\+Z(). 

Defaults to O\+T\+F\+\_\+\+R\+E\+A\+D\+\_\+\+M\+A\+X\+R\+E\+C\+O\+R\+D\+S == . 'O\+T\+F\+\_\+\+Reader\+\_\+read\+X\+Y\+Z()' returns with the number of records processed. Successive calls to 'O\+T\+F\+\_\+\+Reader\+\_\+read\+X\+Y\+Z()' will deliver the remaining records. This funktion will N\+O\+T destroy a pending read operation, i.\+e. a read operation currently interrupted C\+A\+N be continued!


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em limit} & record limit. has to be smaller than or equal to O\+T\+F\+\_\+\+R\+E\+A\+D\+\_\+\+M\+A\+X\+R\+E\+C\+O\+R\+D\+S \\
\hline
\end{DoxyParams}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::record\+Limit.



Referenced by O\+T\+F\+\_\+\+Reader\+\_\+reset().

\hypertarget{group__reader_ga81dbb74cfeb87ceb201aa1442cb96b10}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+set\+Time\+Interval@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Time\+Interval}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+set\+Time\+Interval@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Time\+Interval}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+set\+Time\+Interval}]{\setlength{\rightskip}{0pt plus 5cm}void O\+T\+F\+\_\+\+Reader\+\_\+set\+Time\+Interval (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint64\+\_\+t}]{min\+Time, }
\item[{uint64\+\_\+t}]{max\+Time}
\end{DoxyParamCaption}
)}}\label{group__reader_ga81dbb74cfeb87ceb201aa1442cb96b10}


Set the minimum time and the maximum time of the reader. 

\begin{DoxyParagraph}{For example\+:}
min\+Time = 100000; ~\newline
 max\+Time = 100003; ~\newline
 Times to read\+: 100000, 100001, 100002
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em min\+Time} & time where reading starts (including this timestamp) \\
\hline
{\em max\+Time} & time where reading ends (excluding this timestamp) \\
\hline
\end{DoxyParams}


References struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::max\+Time, and struct\+\_\+\+O\+T\+F\+\_\+\+Reader\+::min\+Time.



Referenced by O\+T\+F\+\_\+\+Reader\+\_\+reset().

\hypertarget{group__reader_ga6eecf44f62fa9c84c6ff1cb0a75759e0}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+set\+Z\+Buffer\+Sizes@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Z\+Buffer\+Sizes}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+set\+Z\+Buffer\+Sizes@{O\+T\+F\+\_\+\+Reader\+\_\+set\+Z\+Buffer\+Sizes}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+set\+Z\+Buffer\+Sizes}]{\setlength{\rightskip}{0pt plus 5cm}void O\+T\+F\+\_\+\+Reader\+\_\+set\+Z\+Buffer\+Sizes (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}}\label{group__reader_ga6eecf44f62fa9c84c6ff1cb0a75759e0}


Set the default zbuffer size for all buffers managed by this Reader. 

This is only effective for future files and will not change already allocated zbuffers. Those can be changed with the files directly.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}.\\
\hline
{\em size} & Intended zbuffer size. \\
\hline
\end{DoxyParams}
\hypertarget{group__reader_gaccb4de969768b278b393c2b5dc0cf9c9}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Bytes\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Bytes\+Progress}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Bytes\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Bytes\+Progress}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Bytes\+Progress}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Bytes\+Progress (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint64\+\_\+t $\ast$}]{minimum, }
\item[{uint64\+\_\+t $\ast$}]{current, }
\item[{uint64\+\_\+t $\ast$}]{maximum}
\end{DoxyParamCaption}
)}}\label{group__reader_gaccb4de969768b278b393c2b5dc0cf9c9}


Delivers a progress report for reading snapshots. 

\hyperlink{structProgress}{Progress} is given in terms of bytes. The percentage can be computed as ( current -\/ minimum ) / ( maximum -\/ minimum ).

A\+T\+T\+E\+N\+T\+I\+O\+N\+: This is only a rough estimate of the progress, because it is computed based on the block I/\+O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also \hyperlink{group__reader_gafce315e5d20acc16831f128872758736}{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Time\+Progress()}\+:

This computation takes the read bytes of every active stream into account. The progress report is only valid after one or several calls to \hyperlink{group__reader_ga77c8e231493f186eb4fa800b66d1c843}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots()}. Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' $>$ 'maximum' the values are invalid.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em minimum} & Return value for the minium bytes read ( is 0 everytime ). \\
\hline
{\em current} & Return value for the current bytes read. \\
\hline
{\em maximum} & Return value for the filesize.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, and O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos().

\hypertarget{group__reader_gafce315e5d20acc16831f128872758736}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Time\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Time\+Progress}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Time\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Time\+Progress}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Time\+Progress}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Time\+Progress (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint64\+\_\+t $\ast$}]{minimum, }
\item[{uint64\+\_\+t $\ast$}]{current, }
\item[{uint64\+\_\+t $\ast$}]{maximum}
\end{DoxyParamCaption}
)}}\label{group__reader_gafce315e5d20acc16831f128872758736}


Delivers a progress report for reading snapshots. 

It is given in terms of time stamps. A percentage can be computed as ( current -\/ minimum ) / ( maximum -\/ minimum ). This computation takes restricted time intervals into account which is not possible with \hyperlink{group__reader_gaccb4de969768b278b393c2b5dc0cf9c9}{O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Bytes\+Progress()}.

The progress report is only valid after one or several calls to \hyperlink{group__reader_ga77c8e231493f186eb4fa800b66d1c843}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Snapshots()}. Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' $>$ 'maximum' the values are invalid.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em minimum} & Return value for the minium time. \\
\hline
{\em current} & Return value for the current time. \\
\hline
{\em maximum} & Return value for the maximum time.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min.



Referenced by O\+T\+F\+\_\+\+Reader\+\_\+snapshot\+Progress().

\hypertarget{group__reader_ga0d8dc79e0595c9733a1320156d96fd02}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Bytes\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Bytes\+Progress}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Bytes\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Bytes\+Progress}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Bytes\+Progress}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Bytes\+Progress (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint64\+\_\+t $\ast$}]{minimum, }
\item[{uint64\+\_\+t $\ast$}]{current, }
\item[{uint64\+\_\+t $\ast$}]{maximum}
\end{DoxyParamCaption}
)}}\label{group__reader_ga0d8dc79e0595c9733a1320156d96fd02}


Delivers a progress report for reading statistics. 

\hyperlink{structProgress}{Progress} is given in terms of bytes. The percentage can be computed as ( current -\/ minimum ) / ( maximum -\/ minimum ).

A\+T\+T\+E\+N\+T\+I\+O\+N\+: This is only a rough estimate of the progress, because it is computed based on the block I/\+O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also \hyperlink{group__reader_gac10d1705a281ba8f6584b50acb362d3d}{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Time\+Progress()}\+:

This computation takes the read bytes of every active stream into account. The progress report is only valid after one or several calls to \hyperlink{group__reader_ga239cf2bfccfc48f2ce10a9cd4363f595}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics()}. Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' $>$ 'maximum' the values are invalid.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em minimum} & Return value for the minium bytes read ( is 0 everytime ). \\
\hline
{\em current} & Return value for the current bytes read. \\
\hline
{\em maximum} & Return value for the filesize.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::buffers, struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::n, and O\+T\+F\+\_\+\+R\+Buffer\+\_\+get\+File\+Pos().

\hypertarget{group__reader_gac10d1705a281ba8f6584b50acb362d3d}{\index{Reader Interface@{Reader Interface}!O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Time\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Time\+Progress}}
\index{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Time\+Progress@{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Time\+Progress}!Reader Interface@{Reader Interface}}
\subsubsection[{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Time\+Progress}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Time\+Progress (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+Reader} $\ast$}]{reader, }
\item[{uint64\+\_\+t $\ast$}]{minimum, }
\item[{uint64\+\_\+t $\ast$}]{current, }
\item[{uint64\+\_\+t $\ast$}]{maximum}
\end{DoxyParamCaption}
)}}\label{group__reader_gac10d1705a281ba8f6584b50acb362d3d}


Delivers a progress report for reading statistics. 

It is given in terms of time stamps. A percentage can be computed as ( current -\/ minimum ) / ( maximum -\/ minimum ). This computation takes restricted time intervals into account which is not possible with \hyperlink{group__reader_ga0d8dc79e0595c9733a1320156d96fd02}{O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Bytes\+Progress()}.

The progress report is only valid after one or several calls to \hyperlink{group__reader_ga239cf2bfccfc48f2ce10a9cd4363f595}{O\+T\+F\+\_\+\+Reader\+\_\+read\+Statistics()}. Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' $>$ 'maximum' the values are invalid.


\begin{DoxyParams}{Parameters}
{\em reader} & Pointer to an initialized O\+T\+F\+\_\+\+Reader object. See also \hyperlink{group__reader_ga2a0ae88a70eea9f3007679245fdb92b0}{O\+T\+F\+\_\+\+Reader\+\_\+open()}. \\
\hline
{\em minimum} & Return value for the minium time. \\
\hline
{\em current} & Return value for the current time. \\
\hline
{\em maximum} & Return value for the maximum time.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if an error occurs. 
\end{DoxyReturn}


References struct\+\_\+\+O\+T\+F\+\_\+\+Heap\+::progress\+Min.



Referenced by O\+T\+F\+\_\+\+Reader\+\_\+statistic\+Progress().

