Class implementing the readout of pacevents files.
More...
#include <PacDataReader.h>
List of all members.
Detailed Description
Class implementing the readout of pacevents files.
- Author:
- Matthias Nagl <mnagl@uni-goettingen.de>
This class can be used to read out a pacevents file. After it was instantiated readout parameters must be set using setReadoutParameters(). Than the readout thread is started (start()) and events can be retrieved using nextEventPointer(). The pointers remain valid until the next pointer is requested.
Constructor & Destructor Documentation
PacDataReader::~PacDataReader |
( |
| ) |
|
Member Function Documentation
quint64 PacDataReader::nextChunkPosPointerPos |
( |
| ) |
const |
Pointer position for PacNewDataWatchdog.
- Returns:
- Returns the Position of the last read nextchunkpos pointer in the file. In currently written files this is the first nextchunk pointer with a zero value If the file was completely read and ist finalized this value is 0.
const Pac::Event * PacDataReader::nextEventPointer |
( |
| ) |
|
Returns a pointer to the next event (or 0 if readout reached the end) and releases the previously returned event for overwriting.
one event always stays acqired by the reader to make sure the returned pointer is not getting invalid before the next call of nextEventPointer()
bool PacDataReader::paceventsFileStillWritten |
( |
| ) |
const |
Tells the caller if the .pacevents file is still written.
- Returns:
- True, if the file is still written, false if it was finalized
int PacDataReader::progress |
( |
bool |
beginningandend | ) |
|
void PacDataReader::run |
( |
| ) |
[protected] |
void PacDataReader::setReadoutParameters |
( |
Pac::ReadoutRange |
range, |
|
|
quint64 |
numchunks |
|
) |
| |
Defines parameters of the next readout.
- Parameters:
-
range | Sets the range of the file that will be read |
- Note:
- Must not be set to Pac::BeginningAndEnd!
- Parameters:
-
numchunks | Selects the number of chunks that will be read. |
- Note:
- must be called before readout thread is started in order to activate nextEventPointer()
void PacDataReader::setReadoutStartPosition |
( |
quint64 |
startpointer = 0 | ) |
|
Allows to choose a chunk as starting point of this readout.
- Parameters:
-
startpointer | Address of the first (data) byte of the chunk that should be used as starting point. 0 Means "read from the first chunk". |
The documentation for this class was generated from the following files: