Project
Loading...
Searching...
No Matches
o2::dataformats::IOMCTruthContainerView Class Reference

#include <IOMCTruthContainerView.h>

Public Member Functions

 IOMCTruthContainerView ()=default
 
 IOMCTruthContainerView (std::vector< char > const &input)
 
 IOMCTruthContainerView (gsl::span< const char > const input)
 
 ~IOMCTruthContainerView ()
 
void adopt (gsl::span< const char > const input)
 "adopt" (without taking ownership) from an existing buffer
 
template<typename Alloc >
void copyandflatten (std::vector< char, Alloc > &output) const
 
size_t getSize () const
 return total size in bytes
 

Detailed Description

A specially constructed class allowing to stream a very large vector buffer to a ROOT file. This is needed since ROOT currently has a size limitation of ~1GB for data that it can stream per entry in a branch. The solution is based on the ability of ROOT to split entries per data member, so some input buffer gets divided into multiple parts.

TODO: We could template this class to encode original type information (for the input buffer).

Definition at line 36 of file IOMCTruthContainerView.h.

Constructor & Destructor Documentation

◆ IOMCTruthContainerView() [1/3]

o2::dataformats::IOMCTruthContainerView::IOMCTruthContainerView ( )
default

◆ IOMCTruthContainerView() [2/3]

o2::dataformats::IOMCTruthContainerView::IOMCTruthContainerView ( std::vector< char > const &  input)
inline

Constructor taking an existing flat vector as input; No copy is done - the container is just a split view on the original buffer.

Definition at line 43 of file IOMCTruthContainerView.h.

◆ IOMCTruthContainerView() [3/3]

o2::dataformats::IOMCTruthContainerView::IOMCTruthContainerView ( gsl::span< const char > const  input)
inline

Definition at line 48 of file IOMCTruthContainerView.h.

◆ ~IOMCTruthContainerView()

o2::dataformats::IOMCTruthContainerView::~IOMCTruthContainerView ( )
inline

Definition at line 53 of file IOMCTruthContainerView.h.

Member Function Documentation

◆ adopt()

void o2::dataformats::IOMCTruthContainerView::adopt ( gsl::span< const char > const  input)
inline

"adopt" (without taking ownership) from an existing buffer

Definition at line 70 of file IOMCTruthContainerView.h.

◆ copyandflatten()

template<typename Alloc >
void o2::dataformats::IOMCTruthContainerView::copyandflatten ( std::vector< char, Alloc > &  output) const
inline

A function to recreate a flat output vector from this buffer. This function is copying the data.

Definition at line 92 of file IOMCTruthContainerView.h.

◆ getSize()

size_t o2::dataformats::IOMCTruthContainerView::getSize ( ) const
inline

return total size in bytes

Definition at line 108 of file IOMCTruthContainerView.h.


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