Project
Loading...
Searching...
No Matches
o2::raw::RawFileWriter::LinkData Struct Reference

#include <RawFileWriter.h>

Public Member Functions

 LinkData ()=default
 
 ~LinkData ()=default
 
 LinkData (const LinkData &src)
 
LinkDataoperator= (const LinkData &src)
 
void close (const IR &ir)
 
void print () const
 
void addData (const IR &ir, const gsl::span< char > data, bool preformatted=false, uint32_t trigger=0, uint32_t detField=0)
 
RDHAnygetLastRDH ()
 
int getCurrentPageSize () const
 
bool isNewPage () const
 
std::string describe () const
 

Public Attributes

RDHAny rdhCopy
 
IR updateIR
 
int lastRDHoffset = -1
 
bool startOfRun = true
 
uint8_t packetCounter = 0
 
uint16_t pageCnt = 0
 
LinkSubSpec_t subspec = 0
 
bool discardData = false
 
size_t nTFWritten = 0
 
size_t nRDHWritten = 0
 
size_t nBytesWritten = 0
 
std::string fileName {}
 
std::vector< charbuffer
 
RawFileWriterwriter = nullptr
 
PayloadCache cacheBuffer
 
std::unique_ptr< TTree > cacheTree
 
std::mutex mtx
 

Static Public Attributes

static constexpr int MarginToFlush = 10 * sizeof(RDHAny)
 

Protected Member Functions

void addDataInternal (const IR &ir, const gsl::span< char > data, bool preformatted=false, uint32_t trigger=0, uint32_t detField=0, bool checkEmpty=true)
 
void openHBFPage (const RDHAny &rdh, uint32_t trigger=0)
 
void addHBFPage (bool stop=false)
 
void closeHBFPage ()
 
void flushSuperPage (bool keepLastPage=false)
 
void fillEmptyHBHs (const IR &ir, bool dataAdded)
 
void addPreformattedCRUPage (const gsl::span< char > data)
 
void cacheData (const IR &ir, const gsl::span< char > data, bool preformatted, uint32_t trigger=0, uint32_t detField=0)
 
size_t expandBufferBy (size_t by)
 expand buffer by positive increment and return old size
 
size_t pushBack (const char *ptr, size_t sz, bool keepLastOnFlash=true)
 append to the end of the buffer and return the point where appended to
 
size_t pushBack (const RDHAny &rdh)
 add RDH to buffer. In case this requires flushing of the superpage, do not keep the previous page
 

Detailed Description

===================================================================================== Single GBT link helper

Definition at line 81 of file RawFileWriter.h.

Constructor & Destructor Documentation

◆ LinkData() [1/2]

o2::raw::RawFileWriter::LinkData::LinkData ( )
default

◆ ~LinkData()

o2::raw::RawFileWriter::LinkData::~LinkData ( )
default

◆ LinkData() [2/2]

RawFileWriter::LinkData::LinkData ( const LinkData src)

Definition at line 110 of file RawFileWriter.cxx.

Member Function Documentation

◆ addData()

void RawFileWriter::LinkData::addData ( const IR ir,
const gsl::span< char data,
bool  preformatted = false,
uint32_t  trigger = 0,
uint32_t  detField = 0 
)

Definition at line 308 of file RawFileWriter.cxx.

◆ addDataInternal()

void RawFileWriter::LinkData::addDataInternal ( const IR ir,
const gsl::span< char data,
bool  preformatted = false,
uint32_t  trigger = 0,
uint32_t  detField = 0,
bool  checkEmpty = true 
)
protected

Definition at line 316 of file RawFileWriter.cxx.

◆ addHBFPage()

void RawFileWriter::LinkData::addHBFPage ( bool  stop = false)
protected

Add new page (RDH) to existing one for the link (possibly stop page)

Definition at line 468 of file RawFileWriter.cxx.

◆ addPreformattedCRUPage()

void RawFileWriter::LinkData::addPreformattedCRUPage ( const gsl::span< char data)
protected

Definition at line 447 of file RawFileWriter.cxx.

◆ cacheData()

void RawFileWriter::LinkData::cacheData ( const IR ir,
const gsl::span< char data,
bool  preformatted,
uint32_t  trigger = 0,
uint32_t  detField = 0 
)
protected

Definition at line 286 of file RawFileWriter.cxx.

◆ close()

void RawFileWriter::LinkData::close ( const IR ir)

Definition at line 622 of file RawFileWriter.cxx.

◆ closeHBFPage()

void RawFileWriter::LinkData::closeHBFPage ( )
protected

Definition at line 540 of file RawFileWriter.cxx.

◆ describe()

std::string RawFileWriter::LinkData::describe ( ) const

Definition at line 679 of file RawFileWriter.cxx.

◆ expandBufferBy()

size_t o2::raw::RawFileWriter::LinkData::expandBufferBy ( size_t  by)
inlineprotected

expand buffer by positive increment and return old size

Definition at line 129 of file RawFileWriter.h.

◆ fillEmptyHBHs()

void RawFileWriter::LinkData::fillEmptyHBHs ( const IR ir,
bool  dataAdded 
)
protected

Definition at line 639 of file RawFileWriter.cxx.

◆ flushSuperPage()

void RawFileWriter::LinkData::flushSuperPage ( bool  keepLastPage = false)
protected

Definition at line 598 of file RawFileWriter.cxx.

◆ getCurrentPageSize()

int o2::raw::RawFileWriter::LinkData::getCurrentPageSize ( ) const
inline

Definition at line 113 of file RawFileWriter.h.

◆ getLastRDH()

RDHAny * o2::raw::RawFileWriter::LinkData::getLastRDH ( )
inline

Definition at line 112 of file RawFileWriter.h.

◆ isNewPage()

bool o2::raw::RawFileWriter::LinkData::isNewPage ( ) const
inline

Definition at line 115 of file RawFileWriter.h.

◆ openHBFPage()

void RawFileWriter::LinkData::openHBFPage ( const RDHAny rdh,
uint32_t  trigger = 0 
)
protected

create 1st page of the new HBF

Definition at line 562 of file RawFileWriter.cxx.

◆ operator=()

RawFileWriter::LinkData & RawFileWriter::LinkData::operator= ( const LinkData src)

Definition at line 115 of file RawFileWriter.cxx.

◆ print()

void RawFileWriter::LinkData::print ( ) const

Definition at line 689 of file RawFileWriter.cxx.

◆ pushBack() [1/2]

size_t RawFileWriter::LinkData::pushBack ( const char ptr,
size_t  sz,
bool  keepLastOnFlash = true 
)
protected

append to the end of the buffer and return the point where appended to

Definition at line 695 of file RawFileWriter.cxx.

◆ pushBack() [2/2]

size_t o2::raw::RawFileWriter::LinkData::pushBack ( const RDHAny rdh)
inlineprotected

add RDH to buffer. In case this requires flushing of the superpage, do not keep the previous page

Definition at line 140 of file RawFileWriter.h.

Member Data Documentation

◆ buffer

std::vector<char> o2::raw::RawFileWriter::LinkData::buffer

Definition at line 97 of file RawFileWriter.h.

◆ cacheBuffer

PayloadCache o2::raw::RawFileWriter::LinkData::cacheBuffer

Definition at line 100 of file RawFileWriter.h.

◆ cacheTree

std::unique_ptr<TTree> o2::raw::RawFileWriter::LinkData::cacheTree

Definition at line 101 of file RawFileWriter.h.

◆ discardData

bool o2::raw::RawFileWriter::LinkData::discardData = false

Definition at line 90 of file RawFileWriter.h.

◆ fileName

std::string o2::raw::RawFileWriter::LinkData::fileName {}

Definition at line 96 of file RawFileWriter.h.

◆ lastRDHoffset

int o2::raw::RawFileWriter::LinkData::lastRDHoffset = -1

Definition at line 85 of file RawFileWriter.h.

◆ MarginToFlush

constexpr int o2::raw::RawFileWriter::LinkData::MarginToFlush = 10 * sizeof(RDHAny)
staticconstexpr

Definition at line 82 of file RawFileWriter.h.

◆ mtx

std::mutex o2::raw::RawFileWriter::LinkData::mtx

Definition at line 103 of file RawFileWriter.h.

◆ nBytesWritten

size_t o2::raw::RawFileWriter::LinkData::nBytesWritten = 0

Definition at line 94 of file RawFileWriter.h.

◆ nRDHWritten

size_t o2::raw::RawFileWriter::LinkData::nRDHWritten = 0

Definition at line 93 of file RawFileWriter.h.

◆ nTFWritten

size_t o2::raw::RawFileWriter::LinkData::nTFWritten = 0

Definition at line 92 of file RawFileWriter.h.

◆ packetCounter

uint8_t o2::raw::RawFileWriter::LinkData::packetCounter = 0

Definition at line 87 of file RawFileWriter.h.

◆ pageCnt

uint16_t o2::raw::RawFileWriter::LinkData::pageCnt = 0

Definition at line 88 of file RawFileWriter.h.

◆ rdhCopy

RDHAny o2::raw::RawFileWriter::LinkData::rdhCopy

Definition at line 83 of file RawFileWriter.h.

◆ startOfRun

bool o2::raw::RawFileWriter::LinkData::startOfRun = true

Definition at line 86 of file RawFileWriter.h.

◆ subspec

LinkSubSpec_t o2::raw::RawFileWriter::LinkData::subspec = 0

Definition at line 89 of file RawFileWriter.h.

◆ updateIR

IR o2::raw::RawFileWriter::LinkData::updateIR

Definition at line 84 of file RawFileWriter.h.

◆ writer

RawFileWriter* o2::raw::RawFileWriter::LinkData::writer = nullptr

Definition at line 98 of file RawFileWriter.h.


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