#include <mimotera++/MimoteraEvent.hh>
Public Member Functions | |
MimoteraEvent () | |
default constructor w/o parameters | |
~MimoteraEvent () | |
default destructor | |
MimoteraInfo * | info () |
Get the info block. | |
Pixel_t * | frameA () |
Get the sub frame A. | |
Pixel_t * | frameB () |
Get the sub frame B. | |
DataArrays_t * | getArrays () |
Get the decoded data arrays. | |
CDataArrays_t * | getCArrays () |
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 |
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:
Definition at line 296 of file MimoteraEvent.hh.
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 | ( | ) |
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.
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.
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.
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.
MimoteraInfo* Mimotera::MimoteraEvent::info | ( | ) | [inline] |
Get the info block.
This method returns a reference to the info block of the current Mimotera event.
Definition at line 311 of file MimoteraEvent.hh.
Referenced by Mimotera::MimoteraReader::readNextEvent().
void Mimotera::MimoteraEvent::setArrays | ( | CDataArrays_t * | dataArrays | ) |
Set the arrays.
This method is provided for conveninence and is doing exactly the same things the MimoteraEvent::setArrays() is doing.
dataArrays | A pointer to a CDataArrays_t class |
Definition at line 182 of file MimoteraEvent.cc.
References Mimotera::DataArrays_t::_frameA, Mimotera::CDataArrays_t::_frameA, Mimotera::DataArrays_t::_frameB, Mimotera::CDataArrays_t::_frameB, Mimotera::DataArrays_t::_x, Mimotera::CDataArrays_t::_x, Mimotera::DataArrays_t::_y, Mimotera::CDataArrays_t::_y, Mimotera::MimoteraDecoder::getRawPosition(), Mimotera::kChan, Mimotera::kMarkersPerRow, Mimotera::kXPixel, and Mimotera::kYPixel.
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.
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.
void Mimotera::MimoteraEvent::setInfo | ( | MimoteraInfo * | info | ) |
Set the information block.
Definition at line 218 of file MimoteraEvent.cc.
References Mimotera::MimoteraInfo::_frameInPacket, Mimotera::MimoteraInfo::_globalFrameNo, Mimotera::MimoteraInfo::_triggeredFrameAB, and Mimotera::MimoteraInfo::_triggerNo.
friend class MimoteraReader [friend] |
Definition at line 379 of file MimoteraEvent.hh.
bool Mimotera::MimoteraEvent::_areArraysReady [protected] |
Arrays ready flag.
Definition at line 383 of file MimoteraEvent.hh.
Referenced by getArrays(), getCArrays(), MimoteraEvent(), and Mimotera::MimoteraReader::readNextEvent().