BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
fles::StorableMicroslice Class Reference

The StorableMicroslice class contains the data of a single microslice. More...

#include <StorableMicroslice.h>

Inheritance diagram for fles::StorableMicroslice:
Collaboration diagram for fles::StorableMicroslice:

Public Member Functions

 StorableMicroslice (const StorableMicroslice &ms)
 Copy constructor.
void operator= (const StorableMicroslice &)=delete
 Delete assignment operator (not implemented).
 StorableMicroslice (StorableMicroslice &&ms) noexcept
 Move constructor.
 StorableMicroslice (const Microslice &ms)
 Construct by copying from given Microslice object.
 StorableMicroslice (MicrosliceDescriptor d, const uint8_t *content_p)
 Construct by copying from given data array.
 StorableMicroslice (MicrosliceDescriptor d, std::vector< uint8_t > content_v)
 Construct by copying from given data vector.
MicrosliceDescriptor & desc ()
 Retrieve non-const microslice descriptor reference.
uint8_t * content ()
 Retrieve a non-const pointer to the microslice data.
void initialize_crc ()
 StorableMicroslice (const StorableMicroslice &ms)
 Copy constructor.
void operator= (const StorableMicroslice &)=delete
 Delete assignment operator (not implemented).
 StorableMicroslice (StorableMicroslice &&ms) noexcept
 Move constructor.
 StorableMicroslice (const Microslice &ms)
 Construct by copying from given Microslice object.
 StorableMicroslice (MicrosliceDescriptor d, const uint8_t *content_p)
 Construct by copying from given data array.
 StorableMicroslice (MicrosliceDescriptor d, std::vector< uint8_t > content_v)
 Construct by copying from given data vector.
MicrosliceDescriptor & desc ()
 Retrieve non-const microslice descriptor reference.
uint8_t * content ()
 Retrieve a non-const pointer to the microslice data.
void initialize_crc ()
Public Member Functions inherited from fles::Microslice
virtual ~Microslice ()=0
const MicrosliceDescriptor & desc () const
 Retrieve microslice descriptor reference.
const uint8_t * content () const
 Retrieve a pointer to the microslice data.
uint32_t compute_crc () const
 Compute CRC-32 checksum of microslice data content.
bool check_crc () const
 Compare computed CRC-32 checksum to value in header.
virtual ~Microslice ()=0
const MicrosliceDescriptor & desc () const
 Retrieve microslice descriptor reference.
const uint8_t * content () const
 Retrieve a pointer to the microslice data.
uint32_t compute_crc () const
 Compute CRC-32 checksum of microslice data content.
bool check_crc () const
 Compare computed CRC-32 checksum to value in header.

Private Member Functions

 StorableMicroslice ()
template<class Archive>
void serialize (Archive &ar, const unsigned int)
void init_pointers ()
 StorableMicroslice ()
template<class Archive>
void serialize (Archive &ar, const unsigned int)
void init_pointers ()

Private Attributes

MicrosliceDescriptor desc_
std::vector< uint8_t > content_

Friends

class boost::serialization::access
class InputArchive< Microslice, StorableMicroslice, ArchiveType::MicrosliceArchive >
class InputArchiveLoop< Microslice, StorableMicroslice, ArchiveType::MicrosliceArchive >

Additional Inherited Members

Protected Member Functions inherited from fles::Microslice
 Microslice ()=default
 Microslice (MicrosliceDescriptor *desc_ptr, uint8_t *content_ptr)
 Construct microslice with given content.
 Microslice ()=default
 Microslice (MicrosliceDescriptor *desc_ptr, uint8_t *content_ptr)
 Construct microslice with given content.
Protected Attributes inherited from fles::Microslice
MicrosliceDescriptor * desc_ptr_
 Pointer to the microslice descriptor.
uint8_t * content_ptr_
 Pointer to the microslice data content.

Detailed Description

Both metadata and content are stored within the object.

Definition at line 32 of file StorableMicroslice.h.

Constructor & Destructor Documentation

◆ StorableMicroslice() [1/12]

fles::StorableMicroslice::StorableMicroslice ( const StorableMicroslice & ms)

References StorableMicroslice().

Referenced by StorableMicroslice(), StorableMicroslice(), StorableMicroslice(), boost::serialization::access, initialize_crc(), and operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StorableMicroslice() [2/12]

fles::StorableMicroslice::StorableMicroslice ( StorableMicroslice && ms)
noexcept

References StorableMicroslice().

Here is the call graph for this function:

◆ StorableMicroslice() [3/12]

fles::StorableMicroslice::StorableMicroslice ( const Microslice & ms)

References fles::Microslice::Microslice().

Here is the call graph for this function:

◆ StorableMicroslice() [4/12]

fles::StorableMicroslice::StorableMicroslice ( MicrosliceDescriptor d,
const uint8_t * content_p )

Copy the descriptor and the data pointed to by content into the StorableMicroslice. The size field of the descriptor must already be valid and will not be modified.

References d.

◆ StorableMicroslice() [5/12]

fles::StorableMicroslice::StorableMicroslice ( MicrosliceDescriptor d,
std::vector< uint8_t > content_v )

Copy the descriptor and copy or move the data contained in content into the StorableMicroslice. The descriptor will be updated to match the size of the content vector.

Copying the vector is avoided if it is passed as an rvalue, like in:

StorableMicroslice {..., std::move(some_vector)}
StorableMicroslice {..., {1, 2, 3, 4, 5}}
StorableMicroslice {..., create_some_vector()}

References d.

◆ StorableMicroslice() [6/12]

fles::StorableMicroslice::StorableMicroslice ( )
private

References StorableMicroslice().

Here is the call graph for this function:

◆ StorableMicroslice() [7/12]

fles::StorableMicroslice::StorableMicroslice ( const StorableMicroslice & ms)

References StorableMicroslice().

Here is the call graph for this function:

◆ StorableMicroslice() [8/12]

fles::StorableMicroslice::StorableMicroslice ( StorableMicroslice && ms)
noexcept

References StorableMicroslice().

Here is the call graph for this function:

◆ StorableMicroslice() [9/12]

fles::StorableMicroslice::StorableMicroslice ( const Microslice & ms)

References fles::Microslice::Microslice().

Here is the call graph for this function:

◆ StorableMicroslice() [10/12]

fles::StorableMicroslice::StorableMicroslice ( MicrosliceDescriptor d,
const uint8_t * content_p )

Copy the descriptor and the data pointed to by content into the StorableMicroslice. The size field of the descriptor must already be valid and will not be modified.

References d.

◆ StorableMicroslice() [11/12]

fles::StorableMicroslice::StorableMicroslice ( MicrosliceDescriptor d,
std::vector< uint8_t > content_v )

Copy the descriptor and copy or move the data contained in content into the StorableMicroslice. The descriptor will be updated to match the size of the content vector.

Copying the vector is avoided if it is passed as an rvalue, like in:

StorableMicroslice {..., std::move(some_vector)}
StorableMicroslice {..., {1, 2, 3, 4, 5}}
StorableMicroslice {..., create_some_vector()}

References d.

◆ StorableMicroslice() [12/12]

fles::StorableMicroslice::StorableMicroslice ( )
private

References StorableMicroslice().

Here is the call graph for this function:

Member Function Documentation

◆ content() [1/2]

uint8_t * fles::StorableMicroslice::content ( )
inline

Definition at line 74 of file StorableMicroslice.h.

References fles::Microslice::content_ptr_.

◆ content() [2/2]

uint8_t * fles::StorableMicroslice::content ( )
inline

Definition at line 74 of file StorableMicroslice.h.

References fles::Microslice::content_ptr_.

◆ desc() [1/2]

MicrosliceDescriptor & fles::StorableMicroslice::desc ( )
inline

Definition at line 71 of file StorableMicroslice.h.

References fles::Microslice::desc_ptr_.

◆ desc() [2/2]

MicrosliceDescriptor & fles::StorableMicroslice::desc ( )
inline

Definition at line 71 of file StorableMicroslice.h.

References fles::Microslice::desc_ptr_.

◆ init_pointers() [1/2]

void fles::StorableMicroslice::init_pointers ( )
inlineprivate

Definition at line 94 of file StorableMicroslice.h.

References content_, fles::Microslice::content_ptr_, desc_, and fles::Microslice::desc_ptr_.

Referenced by serialize().

Here is the caller graph for this function:

◆ init_pointers() [2/2]

void fles::StorableMicroslice::init_pointers ( )
inlineprivate

◆ initialize_crc() [1/2]

void fles::StorableMicroslice::initialize_crc ( )

◆ initialize_crc() [2/2]

void fles::StorableMicroslice::initialize_crc ( )

References fles::Microslice::Microslice(), StorableMicroslice(), and boost::serialization::access.

Here is the call graph for this function:

◆ operator=() [1/2]

void fles::StorableMicroslice::operator= ( const StorableMicroslice & )
delete

References StorableMicroslice().

Here is the call graph for this function:

◆ operator=() [2/2]

void fles::StorableMicroslice::operator= ( const StorableMicroslice & )
delete

References StorableMicroslice().

Here is the call graph for this function:

◆ serialize() [1/2]

template<class Archive>
void fles::StorableMicroslice::serialize ( Archive & ar,
const unsigned int  )
inlineprivate

Definition at line 86 of file StorableMicroslice.h.

References content_, desc_, init_pointers(), and serialize().

Referenced by serialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize() [2/2]

template<class Archive>
void fles::StorableMicroslice::serialize ( Archive & ar,
const unsigned int  )
inlineprivate

Definition at line 86 of file StorableMicroslice.h.

References content_, desc_, init_pointers(), and serialize().

Here is the call graph for this function:

◆ boost::serialization::access

boost::serialization::access
friend

◆ InputArchive< Microslice, StorableMicroslice, ArchiveType::MicrosliceArchive >

◆ InputArchiveLoop< Microslice, StorableMicroslice, ArchiveType::MicrosliceArchive >

Member Data Documentation

◆ content_

std::vector< uint8_t > fles::StorableMicroslice::content_
private

Definition at line 101 of file StorableMicroslice.h.

Referenced by init_pointers(), and serialize().

◆ desc_

MicrosliceDescriptor fles::StorableMicroslice::desc_
private

Definition at line 100 of file StorableMicroslice.h.

Referenced by init_pointers(), and serialize().


The documentation for this class was generated from the following files: