CbmRoot
Loading...
Searching...
No Matches
TimeslicedDigiBuilder.cxx
Go to the documentation of this file.
1/* Copyright (C) 2025 Jagiellonian University, Krakow
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Bartosz Sobol [committer] */
4
5
7
8TimeslicedDigiBuilder::TimeslicedDigiBuilder(const std::size_t bufferInitCapacity) : fBuffer{}, fTs{nullptr}
9{
10 fBuffer.reserve(bufferInitCapacity);
11}
12
13void TimeslicedDigiBuilder::init(uint32_t numCoreMicroslices, uint64_t index, uint64_t tsPos)
14{
15 L_(trace) << fmt::format(
16 "[TimeslicedDigiBuilder::init] Initializing Timeslice(numCoreMicroslices={}, index={}, tsPos={})",
17 numCoreMicroslices, index, tsPos);
18
19 fTs = std::make_unique<fles::StorableTimeslice>(numCoreMicroslices, index, tsPos);
20}
21
22fles::StorableTimeslice* TimeslicedDigiBuilder::getRelease()
23{
24 L_(trace) << fmt::format("[TimeslicedDigiBuilder::getRelease] Releasing timeslice {}", fTs->index());
25
26 return fTs.release();
27}
#define L_(level)
std::unique_ptr< fles::StorableTimeslice > fTs
fles::StorableTimeslice * getRelease()
std::vector< char > fBuffer
TimeslicedDigiBuilder(const std::size_t bufferInitCapacity=1<< 27)
void init(uint32_t numCoreMicroslices, uint64_t index=UINT64_MAX, uint64_t tsPos=UINT64_MAX)