|
HIPO
4.3.0
High Performance Output data format for experimental physics
|
#include <reader.h>
Public Member Functions | |
| readerIndex ()=default | |
| ~readerIndex ()=default | |
| bool | canAdvance () |
| Check if there are more events to read. More... | |
| bool | advance () |
| Advance to the next event, loading new records as needed. More... | |
| bool | canAdvanceInRecord () |
| Check if more events remain in the current record. More... | |
| bool | loadRecord (int irec) |
| Load a specific record by index. More... | |
| bool | gotoEvent (int eventNumber) |
| Jump to a specific event number. More... | |
| bool | gotoRecord (int irec) |
| Jump to a specific record. More... | |
| int | getEventNumber () |
| int | getRecordNumber () |
| int | getRecordEventNumber () |
| int | getMaxEvents () |
| void | addSize (int size) |
| Register a record with the given number of events. More... | |
| void | addPosition (long position) |
| Register a record position. More... | |
| long | getPosition (int index) |
| int | getNRecords () const |
| void | show () |
| Print index information to stdout. More... | |
| void | rewind () |
| Reset the index to the beginning (before the first event). More... | |
| void | clear () |
| Remove all record entries from the index. More... | |
| void | reset () |
| Reset counters to the first event of the first record. More... | |
READER index class is used to construct entire events sequence from all records, and provides ability to canAdvance through events where record number is automatically calculated and triggers reading of the next record when events in the current record are exhausted.
|
default |
|
default |
|
inline |
| void hipo::readerIndex::addSize | ( | int | size | ) |
Register a record with the given number of events.
| size | Number of events in the record |
Adds record size (number of events) to the list of records.
Definition at line 462 of file reader.cpp.
| bool hipo::readerIndex::advance | ( | ) |
Advance to the next event, loading new records as needed.
Advances the event pointer to next. If the next event is in a different record the record number is updated and events number in the record is updated.
Definition at line 484 of file reader.cpp.
| bool hipo::readerIndex::canAdvance | ( | ) |
Check if there are more events to read.
Checks to determine if there are events left in the index buffer
Definition at line 475 of file reader.cpp.
| bool hipo::readerIndex::canAdvanceInRecord | ( | ) |
Check if more events remain in the current record.
Checks to verify if the next event is in the same record as current one. Not sure why Derek needed it ;-), but may be it's useful
Definition at line 581 of file reader.cpp.
|
inline |
|
inline |
| int hipo::readerIndex::getMaxEvents | ( | ) |
Returns maximum number of events available to read.
Definition at line 536 of file reader.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
| bool hipo::readerIndex::gotoEvent | ( | int | eventNumber | ) |
Jump to a specific event number.
| eventNumber | Global event number |
Definition at line 504 of file reader.cpp.
| bool hipo::readerIndex::gotoRecord | ( | int | irec | ) |
| bool hipo::readerIndex::loadRecord | ( | int | irec | ) |
Load a specific record by index.
| irec | Record index |
Implemented by Derek for clas12tool purposes (I think - therefore I am)
Definition at line 560 of file reader.cpp.
|
inline |
|
inline |
| void hipo::readerIndex::show | ( | ) |
Print index information to stdout.
Definition at line 527 of file reader.cpp.