Buffer for EMCAL raw pages.
More...
#include <RawBuffer.h>
Buffer for EMCAL raw pages.
- Author
- Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
- Since
- Aug. 9, 2019
Definition at line 29 of file RawBuffer.h.
◆ RawBuffer()
o2::emcal::RawBuffer::RawBuffer |
( |
| ) |
|
|
default |
◆ ~RawBuffer()
o2::emcal::RawBuffer::~RawBuffer |
( |
| ) |
|
|
default |
◆ flush()
void RawBuffer::flush |
( |
| ) |
|
Flush the buffer Does not overwrite the word buffer but just resets the counter and iterator.
Definition at line 19 of file RawBuffer.cxx.
◆ getDataWords()
const gsl::span< const uint32_t > o2::emcal::RawBuffer::getDataWords |
( |
| ) |
const |
|
inline |
Get all data words from the raw buffer.
- Returns
- Span with data words in the buffer (removing trailing null entries)
Definition at line 72 of file RawBuffer.h.
◆ getNDataWords()
int o2::emcal::RawBuffer::getNDataWords |
( |
| ) |
const |
|
inline |
Get the number of data words read for the superpage.
- Returns
- Number of data words in the superpage
Definition at line 57 of file RawBuffer.h.
◆ getNextDataWord()
uint32_t RawBuffer::getNextDataWord |
( |
| ) |
|
Get the next data word in the superpage.
- Returns
- next data word in the superpage
- Exceptions
-
std::runtime_error | if there exists no next data word |
Definition at line 71 of file RawBuffer.cxx.
◆ getWord()
uint32_t RawBuffer::getWord |
( |
int |
index | ) |
const |
Get the data word at a given index.
- Parameters
-
index | index of the word in the buffer |
- Returns
- word at requested index
- Exceptions
-
std::runtime_error | if the index is out-of-range |
Definition at line 63 of file RawBuffer.cxx.
◆ hasNext()
bool o2::emcal::RawBuffer::hasNext |
( |
| ) |
const |
|
inline |
Check whether the next data word exists.
- Returns
- True if more data words exist, false otherwise Check is done starting from the current position of the iterator
Definition at line 78 of file RawBuffer.h.
◆ readFromMemoryBuffer()
void RawBuffer::readFromMemoryBuffer |
( |
const gsl::span< const char > |
rawmemory | ) |
|
Read page from raw memory buffer.
- Parameters
-
rawmemory | Raw memory buffer (as char words) with size of the payload from the raw data header Converts the char word raw memory buffer of a pages into into the 32 bit word buffer |
Definition at line 46 of file RawBuffer.cxx.
◆ readFromStream()
void RawBuffer::readFromStream |
( |
std::istream & |
in, |
|
|
uint32_t |
payloadsize |
|
) |
| |
Read page from stream.
- Parameters
-
in | Input file stream |
payloadsize | Number of char words in payload Read a whole superpage from the raw stream and convert the bitwise representation directly into 32 bit words |
Definition at line 26 of file RawBuffer.cxx.
◆ reset()
void o2::emcal::RawBuffer::reset |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files:
- /home/runner/work/AliceO2/AliceO2/Detectors/EMCAL/reconstruction/include/EMCALReconstruction/RawBuffer.h
- /home/runner/work/AliceO2/AliceO2/Detectors/EMCAL/reconstruction/src/RawBuffer.cxx