Data frame.
More...
#include <JDAQFrame.hh>
|
void | resize (const int number_of_hits) |
| Resize internal buffer.
|
|
Data frame.
Definition at line 65 of file JDAQFrame.hh.
◆ const_iterator
◆ iterator
◆ const_reverse_iterator
◆ reverse_iterator
◆ JDAQFrame() [1/4]
KM3NETDAQ::JDAQFrame::JDAQFrame |
( |
| ) |
|
|
inline |
◆ JDAQFrame() [2/4]
KM3NETDAQ::JDAQFrame::JDAQFrame |
( |
const JDAQFrame & | frame | ) |
|
|
inline |
Copy constructor.
- Parameters
-
Definition at line 92 of file JDAQFrame.hh.
92 :
95 {
97 }
JDAQFrame & add(const JDAQFrame &frame)
Add data.
◆ JDAQFrame() [3/4]
KM3NETDAQ::JDAQFrame::JDAQFrame |
( |
JDAQFrame && | frame | ) |
|
|
inline |
◆ JDAQFrame() [4/4]
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 120 of file JDAQFrame.hh.
120 :
123 {
125 }
const JDAQHit * data() const
◆ ~JDAQFrame()
virtual KM3NETDAQ::JDAQFrame::~JDAQFrame |
( |
| ) |
|
|
inlinevirtual |
◆ operator=()
Assignment operator.
- Parameters
-
- Returns
- this frame
Definition at line 143 of file JDAQFrame.hh.
144 {
146
147 return *this;
148 }
◆ 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]
Definition at line 173 of file JDAQFrame.hh.
std::reverse_iterator< const_iterator > const_reverse_iterator
const_iterator end() const
◆ rend() [1/2]
◆ rbegin() [2/2]
Definition at line 177 of file JDAQFrame.hh.
std::reverse_iterator< iterator > reverse_iterator
◆ 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 195 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
- frame
Definition at line 207 of file JDAQFrame.hh.
◆ add() [1/2]
Add data.
- Parameters
-
- Returns
- this frame
Definition at line 219 of file JDAQFrame.hh.
◆ 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 232 of file JDAQFrame.hh.
233 {
234 if (number_of_hits > 0) {
235
237
239 }
240
241 return *this;
242 }
void resize(const int number_of_hits)
Resize internal buffer.
◆ 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 273 of file JDAQFrame.hh.
274 {
276
277 const int number_of_bytes = number_of_hits *
sizeof(
JDAQHit);
278
281 else
283
285 throw JDAQException(
"JDAQFrame::resize(): Memory exception - number of hits = " + std::to_string(number_of_hits));
286 }
287
289 }
290 }
◆ getSizeof
Get size of object.
- Parameters
-
- Returns
- number of bytes
Definition at line 21 of file JDAQFrameIO.hh.
◆ operator>>
Read DAQ frame from input.
- Parameters
-
- Returns
- reader
Definition at line 34 of file JDAQFrameIO.hh.
35 {
37
38 int number_of_hits;
39
40 in >> number_of_hits;
41
42 frame.
resize(number_of_hits);
43
45
46 return in;
47 }
◆ operator<<
Write DAQ frame to output.
- Parameters
-
- Returns
- writer
Definition at line 57 of file JDAQFrameIO.hh.
58 {
60
62
63 return out;
64 }
virtual int write(const char *buffer, const int length)=0
Write byte array.
◆ numberOfHits
int KM3NETDAQ::JDAQFrame::numberOfHits |
◆ buffer
JDAQHit* KM3NETDAQ::JDAQFrame::buffer |
The documentation for this class was generated from the following file: