Mimotera::MimoteraEvent Class Reference

#include <mimotera++/MimoteraEvent.hh>

Collaboration diagram for Mimotera::MimoteraEvent:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MimoteraEvent ()
 default constructor w/o parameters
 ~MimoteraEvent ()
 default destructor
MimoteraInfoinfo ()
 Get the info block.
Pixel_tframeA ()
 Get the sub frame A.
Pixel_tframeB ()
 Get the sub frame B.
DataArrays_tgetArrays ()
 Get the decoded data arrays.
CDataArrays_tgetCArrays ()
 Get the decoded data in CDataArrays_t.
void setArrays (DataArrays_t *dataArrays)
 Set the arrays.
void setArrays (CDataArrays_t *dataArrays)
 Set the arrays.
void setInfo (MimoteraInfo *info)
 Set the information block.

Protected Attributes

bool _areArraysReady
 Arrays ready flag.

Friends

class MimoteraReader


Detailed Description

The Mimotera Event class This class is both used as a container for the read information (info and data block) and is also doing the data encoding / decoding.

Accessing the info block To gain access to the info block the user must use the MimoteraEvent::info() method. This will return a pointer to a Mimotera::MimoteraInfo class. It is important to note that for the data block the only decoding that is really needed is the adjusting of the endianess and this is always done. In other words, it is impossible to access to the RAW info block as it is saved into the binary file.

Accessing the data: The user has two ways to access to the data block:

Author:
Antonio Bulgheroni <antonio.bulgheroni@gmail.com>
Examples:

examples/convert2ASCII.cxx, examples/convert2ROOT.cxx, and examples/createDummyData.cxx.

Definition at line 296 of file MimoteraEvent.hh.


Constructor & Destructor Documentation

Mimotera::MimoteraEvent::MimoteraEvent (  ) 

default constructor w/o parameters

Definition at line 53 of file MimoteraEvent.cc.

References _areArraysReady, Mimotera::kXPixel, and Mimotera::kYPixel.

Mimotera::MimoteraEvent::~MimoteraEvent (  ) 

default destructor

Definition at line 69 of file MimoteraEvent.cc.


Member Function Documentation

Pixel_t* Mimotera::MimoteraEvent::frameA (  )  [inline]

Get the sub frame A.

This method returns a Pixel_t array containing the readout of frame A

Definition at line 317 of file MimoteraEvent.hh.

Referenced by Mimotera::MimoteraReader::readNextEvent(), and Mimotera::MimoteraWriter::writeEvent().

Pixel_t* Mimotera::MimoteraEvent::frameB (  )  [inline]

Get the sub frame B.

This method returns a Pixel_t array containing the readout of frame B

Definition at line 323 of file MimoteraEvent.hh.

Referenced by Mimotera::MimoteraReader::readNextEvent(), and Mimotera::MimoteraWriter::writeEvent().

DataArrays_t * Mimotera::MimoteraEvent::getArrays (  ) 

Get the decoded data arrays.

The data stored in the frameA and frameB arrays have to be considered very RAW, in the meaning that these arrays contain exactly what was stored in the event data block w/o any manipulation.

When this method is called a DataArrays_t structure is returned containing the subframe A and B already sorted, with the endianess properly adjusted and with vertical markers columns already removed.

Calling this method several times on the same event doesn't add a computational overhead since the decoding is done only once for each read event.

For the sake of completeness also the x and y coordinates arrays are provided.

Returns:
A pointer to a DataArrays_t structure containing the decoded and sorted data.

Definition at line 81 of file MimoteraEvent.cc.

References _areArraysReady, Mimotera::CDataArrays_t::_frameA, Mimotera::DataArrays_t::_frameA, Mimotera::CDataArrays_t::_frameB, Mimotera::DataArrays_t::_frameB, Mimotera::CDataArrays_t::_x, Mimotera::DataArrays_t::_x, Mimotera::CDataArrays_t::_y, Mimotera::DataArrays_t::_y, Mimotera::MimoteraDecoder::getRawPosition(), Mimotera::kChan, Mimotera::kMarkersPerRow, Mimotera::kXPixel, and Mimotera::kYPixel.

Here is the call graph for this function:

CDataArrays_t * Mimotera::MimoteraEvent::getCArrays (  ) 

Get the decoded data in CDataArrays_t.

This is working exactly the same way the getArrays() is doing but returning the C version of the DataArrays structure. Calling getArrays (getCArrays) soon after getCArrays (getArrays) is not introducing any computational overhead.

Returns:
A pointer to a CDataArrays_t structure containing the decoded and sorted data.

Definition at line 113 of file MimoteraEvent.cc.

References _areArraysReady, Mimotera::CDataArrays_t::_frameA, Mimotera::DataArrays_t::_frameA, Mimotera::CDataArrays_t::_frameB, Mimotera::DataArrays_t::_frameB, Mimotera::CDataArrays_t::_x, Mimotera::DataArrays_t::_x, Mimotera::CDataArrays_t::_y, Mimotera::DataArrays_t::_y, Mimotera::MimoteraDecoder::getRawPosition(), Mimotera::kChan, Mimotera::kMarkersPerRow, Mimotera::kXPixel, and Mimotera::kYPixel.

Here is the call graph for this function:

MimoteraInfo* Mimotera::MimoteraEvent::info (  )  [inline]

Get the info block.

This method returns a reference to the info block of the current Mimotera event.

Returns:
A pointer of the current event info block.

Definition at line 311 of file MimoteraEvent.hh.

Referenced by Mimotera::MimoteraReader::readNextEvent().

void Mimotera::MimoteraEvent::setArrays ( CDataArrays_t dataArrays  ) 

void Mimotera::MimoteraEvent::setArrays ( DataArrays_t dataArrays  ) 

Set the arrays.

This method is used to set the DataArrays and consequenly the RAW _frameA and _frameB.

Parameters:
dataArrays A pointer to a DataArrays_t class

Definition at line 146 of file MimoteraEvent.cc.

References Mimotera::CDataArrays_t::_frameA, Mimotera::DataArrays_t::_frameA, Mimotera::CDataArrays_t::_frameB, Mimotera::DataArrays_t::_frameB, Mimotera::CDataArrays_t::_x, Mimotera::DataArrays_t::_x, Mimotera::CDataArrays_t::_y, Mimotera::DataArrays_t::_y, Mimotera::MimoteraDecoder::getRawPosition(), Mimotera::kChan, Mimotera::kMarkersPerRow, Mimotera::kXPixel, and Mimotera::kYPixel.

Here is the call graph for this function:

void Mimotera::MimoteraEvent::setInfo ( MimoteraInfo info  ) 


Friends And Related Function Documentation

friend class MimoteraReader [friend]

Definition at line 379 of file MimoteraEvent.hh.


Member Data Documentation

Arrays ready flag.

Definition at line 383 of file MimoteraEvent.hh.

Referenced by getArrays(), getCArrays(), MimoteraEvent(), and Mimotera::MimoteraReader::readNextEvent().


The documentation for this class was generated from the following files:

Generated on Fri Sep 18 19:15:43 2009 for Mimotera++ by  doxygen 1.5.7.1