Data frame.
More...
#include <JDAQFrame.hh>
|
| void | resize (const int number_of_hits) |
| | Resize internal buffer. More...
|
| |
Data frame.
Definition at line 70 of file JDAQFrame.hh.
◆ iterator
◆ const_reverse_iterator
◆ reverse_iterator
◆ JDAQFrame() [1/3]
| KM3NETDAQ::JDAQFrame::JDAQFrame |
( |
| ) |
|
|
inline |
◆ JDAQFrame() [2/3]
| KM3NETDAQ::JDAQFrame::JDAQFrame |
( |
const JDAQFrame & |
frame | ) |
|
|
inline |
Copy constructor.
- Parameters
-
Definition at line 94 of file JDAQFrame.hh.
◆ JDAQFrame() [3/3]
| KM3NETDAQ::JDAQFrame::JDAQFrame |
( |
const int |
number_of_hits, |
|
|
const JDAQHit * |
data |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| number_of_hits | number of hits |
| data | pointer to data |
Definition at line 108 of file JDAQFrame.hh.
◆ ~JDAQFrame()
| virtual KM3NETDAQ::JDAQFrame::~JDAQFrame |
( |
| ) |
|
|
inlinevirtual |
◆ clear()
| void KM3NETDAQ::JDAQFrame::clear |
( |
| ) |
|
|
inline |
◆ begin() [1/2]
◆ end() [1/2]
◆ begin() [2/2]
| iterator KM3NETDAQ::JDAQFrame::begin |
( |
| ) |
|
|
inline |
◆ end() [2/2]
◆ rbegin() [1/2]
◆ rend() [1/2]
◆ rbegin() [2/2]
◆ rend() [2/2]
◆ empty()
| bool KM3NETDAQ::JDAQFrame::empty |
( |
| ) |
const |
|
inline |
◆ size()
| int KM3NETDAQ::JDAQFrame::size |
( |
| ) |
const |
|
inline |
◆ data() [1/2]
| const JDAQHit* KM3NETDAQ::JDAQFrame::data |
( |
| ) |
const |
|
inline |
◆ data() [2/2]
| JDAQHit* KM3NETDAQ::JDAQFrame::data |
( |
| ) |
|
|
inline |
◆ operator[]()
| const JDAQHit& KM3NETDAQ::JDAQFrame::operator[] |
( |
int |
index | ) |
const |
|
inline |
Get hit at given index.
- Parameters
-
- Returns
- hit
Definition at line 169 of file JDAQFrame.hh.
◆ subset()
| JDAQFrameSubset KM3NETDAQ::JDAQFrame::subset |
( |
const int |
i1, |
|
|
const int |
i2 |
|
) |
| const |
|
inline |
Get subset of data.
- Parameters
-
| i1 | first index of hit (included) |
| i2 | last index of hit (excluded) |
- Returns
- JDAQ frame
Definition at line 181 of file JDAQFrame.hh.
183 return JDAQFrameSubset(i2 - i1,
buffer + i1);
◆ add() [1/2]
Add data.
- Parameters
-
- Returns
- this JDAQ frame
Definition at line 193 of file JDAQFrame.hh.
195 return add(frame.numberOfHits, frame.buffer);
◆ add() [2/2]
| JDAQFrame& KM3NETDAQ::JDAQFrame::add |
( |
const int |
number_of_hits, |
|
|
const JDAQHit * |
data |
|
) |
| |
|
inline |
Add data.
- Parameters
-
| number_of_hits | number of hits |
| data | pointer to data |
- Returns
- this data frame
Definition at line 206 of file JDAQFrame.hh.
208 if (number_of_hits > 0) {
◆ swap()
| void KM3NETDAQ::JDAQFrame::swap |
( |
JDAQFrame & |
frame | ) |
|
|
inline |
◆ ClassDef()
| KM3NETDAQ::JDAQFrame::ClassDef |
( |
JDAQFrame |
, |
|
|
1 |
|
|
) |
| |
◆ resize()
| void KM3NETDAQ::JDAQFrame::resize |
( |
const int |
number_of_hits | ) |
|
|
inlineprotected |
Resize internal buffer.
This method increases the size of the buffer if necessary. Otherwise, the current size is maintained.
- Parameters
-
| number_of_hits | total number of hits to allocate |
Definition at line 287 of file JDAQFrame.hh.
291 const int number_of_bytes = number_of_hits *
sizeof(JDAQHit);
294 buffer = (JDAQHit*) malloc(number_of_bytes);
299 throw JDAQException(
"JDAQFrame::resize(): Memory exception.");
◆ operator>>
Read DAQ frame from input.
- Parameters
-
- Returns
- JReader
Definition at line 238 of file JDAQFrame.hh.
244 in >> number_of_hits;
246 frame.resize(number_of_hits);
248 in.read((
char*) frame.buffer, frame.numberOfHits *
sizeof(JDAQHit));
◆ operator<<
Write DAQ frame to output.
- Parameters
-
- Returns
- JWriter
Definition at line 261 of file JDAQFrame.hh.
263 out << frame.numberOfHits;
265 out.write((
char*) frame.buffer, frame.numberOfHits *
sizeof(JDAQHit));
◆ const_iterator
| const typedef JDAQHit* KM3NETDAQ::JDAQFrame::const_iterator |
◆ numberOfHits
| int KM3NETDAQ::JDAQFrame::numberOfHits |
◆ buffer
| JDAQHit* KM3NETDAQ::JDAQFrame::buffer |
The documentation for this class was generated from the following file: