Monarch
v3.8.2
Project 8 Data File Format Library
|
Contains the information that makes up a record. More...
#include <M3Record.hh>
Public Member Functions | |
M3Record (unsigned aNBytes=0) | |
M3Record (RecordIdType *aRecPtr, TimeType *aTimePtr, byte_type *aDataPtr) | |
~M3Record () | |
M3Record (const M3Record &)=delete | |
M3Record & | operator= (const M3Record &)=delete |
void | Initialize () |
Allocate no memory for the record; data pointer is to NULL. More... | |
void | Initialize (unsigned aNBytes) |
Allocate aNBytes of memory for the record. More... | |
void | Initialize (RecordIdType *aRecPtr, TimeType *aTimePtr, byte_type *aDataPtr) |
void | ClearData () |
RecordIdType | GetRecordId () const |
RecordIdType * | GetRecordIdPtr () const |
void | SetRecordId (RecordIdType aId) |
TimeType | GetTime () const |
TimeType * | GetTimePtr () const |
void | SetTime (TimeType aTime) |
const byte_type * | GetData () const |
byte_type * | GetData () |
void | UpdateDataPtr (const byte_type *aDataPtr) const |
void | UpdateDataPtr (byte_type *aDataPtr) |
camel_case_mv_accessible_mutable_noset (bool, OwnsData) | |
Private Attributes | |
RecordIdType * | fRecordId |
TimeType * | fTime |
byte_type * | fData |
Contains the information that makes up a record.
Includes the record ID, timestamp (ns since the start of the run), and data array.
The array can either own its own data, or point to data elsewhere. This is useful for having streams with multiple non-interleaved channels The channel record objects can point to the appropriate location in the stream record object.
If the M3Record( unsigned ) constructor or SetData( unsigned ) function is used, the record will allocate its own data. If the M3Record( byte_type* ) constructor or SetData( byte_type* ) function is used, the record will point to data elsewhere that it does not own.
If the record does not own the data, then the data pointer can be updatd with UpdateDataPtr().
Definition at line 35 of file M3Record.hh.
M3Record | ( | unsigned | aNBytes = 0 | ) |
Definition at line 13 of file M3Record.cc.
M3Record | ( | RecordIdType * | aRecPtr, |
TimeType * | aTimePtr, | ||
byte_type * | aDataPtr | ||
) |
Definition at line 27 of file M3Record.cc.
~M3Record | ( | ) |
Definition at line 35 of file M3Record.cc.
camel_case_mv_accessible_mutable_noset | ( | bool | , |
OwnsData | |||
) |
void ClearData | ( | ) |
Definition at line 67 of file M3Record.cc.
|
inline |
Definition at line 111 of file M3Record.hh.
|
inline |
Definition at line 116 of file M3Record.hh.
|
inline |
Definition at line 79 of file M3Record.hh.
|
inline |
Definition at line 84 of file M3Record.hh.
|
inline |
Definition at line 95 of file M3Record.hh.
|
inline |
Definition at line 100 of file M3Record.hh.
void Initialize | ( | ) |
Allocate no memory for the record; data pointer is to NULL.
Definition at line 40 of file M3Record.cc.
void Initialize | ( | unsigned | aNBytes | ) |
Allocate aNBytes of memory for the record.
Definition at line 46 of file M3Record.cc.
void Initialize | ( | RecordIdType * | aRecPtr, |
TimeType * | aTimePtr, | ||
byte_type * | aDataPtr | ||
) |
Do not allocate memory for the record; instead point to someone else's memory. Warning: if the memory pointed to is de-allocated, use of this record should be discontinued
Definition at line 57 of file M3Record.cc.
|
inline |
Definition at line 89 of file M3Record.hh.
|
inline |
Definition at line 105 of file M3Record.hh.
void UpdateDataPtr | ( | const byte_type * | aDataPtr | ) | const |
Definition at line 82 of file M3Record.cc.
void UpdateDataPtr | ( | byte_type * | aDataPtr | ) |
Definition at line 88 of file M3Record.cc.
|
mutableprivate |
Definition at line 75 of file M3Record.hh.
|
private |
Definition at line 72 of file M3Record.hh.
|
private |
Definition at line 73 of file M3Record.hh.