Mimotera::MimoteraReader Class Reference

The Mimotera Reader. More...

#include <mimotera++/MimoteraReader.hh>

Collaboration diagram for Mimotera::MimoteraReader:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MimoteraReader ()
 Default constructor w/o parameters.
 MimoteraReader (const char *filename)
 Default constructor with a file name.
 ~MimoteraReader ()
 Destructor.
off_t open (const char *filename)
 Opens the specified file.
bool readNextEvent ()
 Read the next event.
MimoteraEventgetEvent ()
 Get the current event.
void init ()
 Initialize the variables.


Detailed Description

The Mimotera Reader.

This class is opening a Mimotera file and can be used to get every single event contained into the file.

The standard usage of this class is well show in the provided examples and can be summarized as follow:

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

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

Definition at line 77 of file MimoteraReader.hh.


Constructor & Destructor Documentation

Mimotera::MimoteraReader::MimoteraReader (  ) 

Default constructor w/o parameters.

Definition at line 41 of file MimoteraReader.cc.

References init().

Here is the call graph for this function:

Mimotera::MimoteraReader::MimoteraReader ( const char *  filename  ) 

Default constructor with a file name.

Suggested constructor. This is the one that should be always used.

Parameters:
filename This is the name of the Mimotera file to be opened.
Exceptions:
FileException in case something goes wrong with the file opening and handling.

Definition at line 48 of file MimoteraReader.cc.

References init(), and open().

Here is the call graph for this function:

Mimotera::MimoteraReader::~MimoteraReader (  ) 

Destructor.

Definition at line 166 of file MimoteraReader.cc.


Member Function Documentation

MimoteraEvent * Mimotera::MimoteraReader::getEvent (  ) 

Get the current event.

This method returns a pointer to the current event in memory. The user must use this method to access at the data

Returns:
A pointer to the current event

Definition at line 107 of file MimoteraReader.cc.

References MIMOTERA_THROWX.

Referenced by Mimotera::MimoteraReader_getEvent_cpp().

void Mimotera::MimoteraReader::init (  ) 

Initialize the variables.

Definition at line 58 of file MimoteraReader.cc.

Referenced by MimoteraReader().

off_t Mimotera::MimoteraReader::open ( const char *  filename  ) 

Opens the specified file.

This method opens the specified filename and prepare it for reading by the MimoteraReader.

Parameters:
filename The file name to be opened
Returns:
The just opened file size
Exceptions:
FileException in case something goes wrong with the file opening and handling.

Definition at line 115 of file MimoteraReader.cc.

References Mimotera::kEventSize, MIMOTERA_THROWX, and Mimotera::to_string().

Referenced by MimoteraReader(), and Mimotera::MimoteraReader_open_cpp().

Here is the call graph for this function:

bool Mimotera::MimoteraReader::readNextEvent (  ) 

Read the next event.

When this method is called, the next event in the file will be read and stored into the _mimoteraEvent data member.

To access to the event, the user must use the getEvent returning a reference to the current event in memory.

Returns:
True if the reading was successful, and false if any error (including EOF) occurred.

Definition at line 69 of file MimoteraReader.cc.

References Mimotera::MimoteraEvent::_areArraysReady, Mimotera::MimoteraInfo::_frameInPacket, Mimotera::MimoteraInfo::_globalFrameNo, Mimotera::MimoteraInfo::_triggeredFrameAB, Mimotera::MimoteraInfo::_triggerNo, Mimotera::MimoteraEvent::frameA(), Mimotera::MimoteraEvent::frameB(), Mimotera::MimoteraEvent::info(), Mimotera::kEventSize, Mimotera::kMimoteraInfoSize, Mimotera::kSubFrameSize, Mimotera::kTrashSize, MIMOTERA_THROWX, and Mimotera::to_string().

Referenced by Mimotera::MimoteraReader_readNextEvent_cpp().

Here is the call graph for this function:


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

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