\section{marlin\-:\-:Time\-Pix\-X\-Y\-Reader\-Processor Class Reference}
\label{classmarlin_1_1TimePixXYReaderProcessor}\index{marlin\-::\-Time\-Pix\-X\-Y\-Reader\-Processor@{marlin\-::\-Time\-Pix\-X\-Y\-Reader\-Processor}}


Writes data to Tracker\-Raw\-Data\-Collection named Time\-Pix\-Raw\-Data.  




{\ttfamily \#include $<$Time\-Pix\-X\-Y\-Reader\-Processor.\-h$>$}

Inheritance diagram for marlin\-:\-:Time\-Pix\-X\-Y\-Reader\-Processor\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classmarlin_1_1TimePixXYReaderProcessor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Time\-Pix\-X\-Y\-Reader\-Processor} ()\label{classmarlin_1_1TimePixXYReaderProcessor_aa696538ffc02a9aeb14fbc4a7083c164}

\begin{DoxyCompactList}\small\item\em C'tor. \end{DoxyCompactList}\item 
virtual {\bf Time\-Pix\-X\-Y\-Reader\-Processor} $\ast$ {\bfseries new\-Processor} ()\label{classmarlin_1_1TimePixXYReaderProcessor_a7c3e13955ca1d13563fb9f0b8becd28d}

\item 
virtual void {\bf read\-Data\-Source} (int num\-Events)\label{classmarlin_1_1TimePixXYReaderProcessor_aa0afd2e5a7538d74bda42b4f814e08cd}

\begin{DoxyCompactList}\small\item\em Creates events with Tracker\-Raw\-Data collections from the Time\-Pix raw data input files and calls all active processors' process\-Event() and process\-Run\-Header Method. \end{DoxyCompactList}\item 
virtual void {\bfseries init} ()\label{classmarlin_1_1TimePixXYReaderProcessor_a1afbd1bb13c9fd1ed1a1f4eedb8d8b86}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
int {\bf get\-Chip\-I\-D} (const int \&col, const int \&row) const \label{classmarlin_1_1TimePixXYReaderProcessor_a84d395e239f3d433215bfc8d0cdd2f72}

\begin{DoxyCompactList}\small\item\em Returns the chip I\-D for a given x and y position of a pixel. \end{DoxyCompactList}\item 
I\-M\-P\-L\-::\-L\-C\-Collection\-Vec $\ast$ {\bf read\-X\-Y\-File} (const std\-::string \&file\-Name)\label{classmarlin_1_1TimePixXYReaderProcessor_a18231ad9b65d7cbc00abc135ae5d0a10}

\begin{DoxyCompactList}\small\item\em Returns a collection with all (zero-\/suppressed) pixels in one event, read from a file of the format x,y,value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::string {\bf \-\_\-output\-Col\-Name}\label{classmarlin_1_1TimePixXYReaderProcessor_aecbc39aa983a879f96ac750b009451ef}

\begin{DoxyCompactList}\small\item\em Name of the output collection. \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-list\-Name}\label{classmarlin_1_1TimePixXYReaderProcessor_a3d5b6fb60ba7594adf735d02c6256fd5}

\begin{DoxyCompactList}\small\item\em Name of the file containing the list of data files. \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-det\-Name}\label{classmarlin_1_1TimePixXYReaderProcessor_aab82ef9616cc6273546a76549cb91ee7}

\begin{DoxyCompactList}\small\item\em Name of the detector (optional). \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-sub\-Det\-Name}\label{classmarlin_1_1TimePixXYReaderProcessor_adc9178a76974508229acf2be83a53bf1}

\begin{DoxyCompactList}\small\item\em Name of the subdetector (optional). \end{DoxyCompactList}\item 
std\-::string {\bf \-\_\-data\-Description}\label{classmarlin_1_1TimePixXYReaderProcessor_ade267de499515e89225755b6814f14e4}

\begin{DoxyCompactList}\small\item\em Description of the data (optional). \end{DoxyCompactList}\item 
std\-::ifstream {\bf \-\_\-in\-File}\label{classmarlin_1_1TimePixXYReaderProcessor_a876f5d9bf125e4d899b5c9f18a383219}

\begin{DoxyCompactList}\small\item\em Reads list of data files. \end{DoxyCompactList}\item 
std\-::vector$<$ int $>$ {\bf \-\_\-chip\-I\-Ds}\label{classmarlin_1_1TimePixXYReaderProcessor_abfec512308da999a630b1106157de775}

\begin{DoxyCompactList}\small\item\em Contains the I\-Ds of the different chips. \end{DoxyCompactList}\item 
bool {\bf \-\_\-enable\-Time\-Stamps}\label{classmarlin_1_1TimePixXYReaderProcessor_a2b33060bc822f81abe4eb179aeddaf02}

\begin{DoxyCompactList}\small\item\em if true timestamp from Timepix frames will be stored in corresponding events \end{DoxyCompactList}\item 
int {\bf \-\_\-length\-Of\-Timestamp}\label{classmarlin_1_1TimePixXYReaderProcessor_a78b208dec921ac358d92db742f176c48}

\begin{DoxyCompactList}\small\item\em number of digits of timestamp \end{DoxyCompactList}\item 
int {\bf \-\_\-chars\-After\-Timestamp}\label{classmarlin_1_1TimePixXYReaderProcessor_a73e866b5a038462af9e3b5904abba958}

\begin{DoxyCompactList}\small\item\em number of characters following the timestamp in Timepix frame file name \end{DoxyCompactList}\item 
bool {\bf \-\_\-no\-Chip\-Headers}\label{classmarlin_1_1TimePixXYReaderProcessor_aada7103460756018cc139d36ac842f61}

\begin{DoxyCompactList}\small\item\em set to true if frames have no header lines separating data of different chips, default is false \end{DoxyCompactList}\item 
int {\bf \-\_\-max\-Pixels\-Per\-Chip}\label{classmarlin_1_1TimePixXYReaderProcessor_afef67dc4d19ab66003d3b1d64a28f2b1}

\begin{DoxyCompactList}\small\item\em maximum number of pixels read out per chip, depends on readout system, default is 4096 \end{DoxyCompactList}\item 
int {\bf \-\_\-run\-Nr}\label{classmarlin_1_1TimePixXYReaderProcessor_af1cac11bbb2e7b6e2910868b7e5b305e}

\begin{DoxyCompactList}\small\item\em Run number, set to 0 per default. \end{DoxyCompactList}\item 
int {\bf \-\_\-evt\-Nr}\label{classmarlin_1_1TimePixXYReaderProcessor_aafa8d10c50e20fa240b7ea114016e592}

\begin{DoxyCompactList}\small\item\em Number of the current event. \end{DoxyCompactList}\item 
int {\bf \-\_\-n\-Chip\-Row}\label{classmarlin_1_1TimePixXYReaderProcessor_a6033bdb167cb3779b9059322cb236745}

\begin{DoxyCompactList}\small\item\em Number of chips in each row. \end{DoxyCompactList}\item 
int {\bf \-\_\-n\-Chip\-Column}\label{classmarlin_1_1TimePixXYReaderProcessor_aa6bbc9ce689a3aa9468dec8531dceb2d}

\begin{DoxyCompactList}\small\item\em Number of chips in each row. \end{DoxyCompactList}\item 
int {\bf \-\_\-min\-Pixels}\label{classmarlin_1_1TimePixXYReaderProcessor_aab58ed44f582f24e12acbff75738ee41}

\begin{DoxyCompactList}\small\item\em Minimum number of activated pixels in an event. Events with less pixels are skipped. \end{DoxyCompactList}\item 
unsigned {\bf \-\_\-activated\-Pixels}\label{classmarlin_1_1TimePixXYReaderProcessor_a085fd4ad7a3d8490a31c1b9dccdf0c14}

\begin{DoxyCompactList}\small\item\em Number of activated pixels in the current event. \end{DoxyCompactList}\item 
const int {\bf \-\_\-n\-Pixels}\label{classmarlin_1_1TimePixXYReaderProcessor_af7adf5742ae796089655669c0459bb86}

\begin{DoxyCompactList}\small\item\em Number of pixels per row and column on each chip, fixed to 256. \end{DoxyCompactList}\item 
const int {\bf \-\_\-n\-Boards\-Per\-Fec}\label{classmarlin_1_1TimePixXYReaderProcessor_a86354d010d5f0e81b8e23c349f69c4f2}

\begin{DoxyCompactList}\small\item\em Number of boards per F\-E\-C, fixed to 4. \end{DoxyCompactList}\item 
const int {\bf \-\_\-n\-Chips\-Per\-Board}\label{classmarlin_1_1TimePixXYReaderProcessor_ae5265bf06c283b91a3e9042dd30d7413}

\begin{DoxyCompactList}\small\item\em Number of chips per board, fixed to 8. \end{DoxyCompactList}\item 
bool {\bf \-\_\-is\-First\-Event}\label{classmarlin_1_1TimePixXYReaderProcessor_af7e24b7c87e54e058d8630e9ed0f3d59}

\begin{DoxyCompactList}\small\item\em Before the first event a run header is added to the data stream. \end{DoxyCompactList}\item 
bool {\bf \-\_\-output\-Is\-Transient}\label{classmarlin_1_1TimePixXYReaderProcessor_aa225bb30365d5535329cf46add8e256f}

\begin{DoxyCompactList}\small\item\em Transient collections are not written to disc. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Writes data to Tracker\-Raw\-Data\-Collection named Time\-Pix\-Raw\-Data. 

A vector of I\-Ds can be supplied if multiple chips are used. The processor assumes that chips are always arranged in a rectangle. This means that each row is assumed to contain the same number of chips. The same is true for each column. However, chip configurations which don't contain the same number of chips in each column and/or row can also be processed. In this case the maximum numbers of chips per column and row has to provided. The numbering of the chip I\-Ds will in this case be expanded to a rectangular pattern. The chips are numbered from left to right and bottom to top starting from the very left chip in the bottom row. The numbering starts from 0 and is then incremented by one for each additional chip. For custom I\-Ds always (N\-Chip\-Rows $\ast$ N\-Chip\-Columns) values have to be provided, otherwise the processor may crash. The I\-Ds set with Chip\-I\-Ds are assigned to the chips in the same pattern as the default I\-Ds.

\subparagraph*{Input -\/ Prerequisites }

File containing a list with paths to all Time\-Pix data files which are to be converted into Tracker\-Raw\-Data. The data files have to be in the x,y,c format.

\subparagraph*{Output}

\begin{DoxyItemize}
\item A runheader \item Events with zero suppressed Time\-Pix\-Raw\-Data (lcio\-::\-Tracker\-Raw\-Data). This data has the zero suppressed data provided by the {\ttfamily Time\-Pix\-Zero\-Suppression\-Processor}.\end{DoxyItemize}

\begin{DoxyParams}{Parameters}
{\em File\-List\-Name} & Text file with list of input Time\-Pix files {\bfseries Time\-Pix file names must be absolute pathes! } (default\-: {\ttfamily Time\-Pix\-Data.\-txt}) \\
\hline
{\em Output\-Collection\-Name} & Name of the output collection (defaut\-: {\ttfamily Time\-Pix\-Raw\-Data}). \\
\hline
{\em N\-Chip\-Rows} & Number of chip rows. At least one chip row has to exist (default\-: {\ttfamily 1}). \\
\hline
{\em N\-Chip\-Columns} & Number of chips in one column (default\-: {\ttfamily 1}). \\
\hline
{\em Set\-Output\-Transient} & If {\ttfamily true} the output collection is set transient and not written to file (default\-: {\ttfamily false}). \\
\hline
{\em Run\-Number} & Sets the number of the run for all events (default {\ttfamily 0}). \\
\hline
{\em Min\-Pixels} & The minimum number of pixels which must have been activated in each event. Events with less pixels are skipped (default\-: {\ttfamily 10}). \\
\hline
{\em Description} & Data descripton for run header -\/ optional parameter (default\-: {\ttfamily no description given}). \\
\hline
{\em Detector\-Name} & Detector name for run header -\/ optional parameter (default\-: \char`\"{}\-T\-P\-C\char`\"{}). \\
\hline
{\em Sub\-Detector\-Name} & Sub-\/detector name for run header -\/ optional parameter (default\-: {\ttfamily Time\-Pix}). \\
\hline
{\em Chip\-I\-Ds} & I\-D number of the chip (lcio\-::\-Tracker\-Raw\-Data\-::\-Cell\-I\-D0), by this parameter the I\-Ds of all chips can be set. If not set the I\-Ds numbered starting from 0 automatically if no I\-Ds are provided for all the chips. This is an optional parameter {\bfseries if set I\-Ds for A\-L\-L chips have to be provided } -\/ optional parameter (default\-: {\ttfamily 0}).  Read\-Timestamp If true timestamp from Timepix frame file name is extracted and stored in the corresponding event (default\-: {\ttfamily false}).  Length\-Of\-Timestamp Number of digits of timestamp (default\-: {\ttfamily 9}).  Chars\-After\-Time\-Stamp Number of characters following the timestamp in Timepix frame file name (default\-: {\ttfamily 4}).\\
\hline
\end{DoxyParams}
Reads Time\-Pix raw data in the format\-: x,y,c.

\begin{DoxyAuthor}{Author}
Thorsten Krautscheid (University of Bonn) 
\end{DoxyAuthor}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Time\-Pix\-X\-Y\-Reader\-Processor.\-h\item 
Time\-Pix\-X\-Y\-Reader\-Processor.\-cc\end{DoxyCompactItemize}
