41 : mTimeFrames{timeframes}, mOutLanes{outlanes}
44 mDataDescrOut.reserve(mOutLanes);
45 for (
int i = 0;
i < mOutLanes; ++
i) {
52 const auto& sacPoint = pc.inputs().get<std::vector<o2::tpc::sac::DataPoint>>(
"sac");
53 for (
const auto&
val : sacPoint) {
55 const auto sac =
val.currents[
stack];
56 mSACs[
stack].emplace_back(sac);
60 if (mCCDBTimeStamp == 0 && !sacPoint.empty()) {
61 const auto reftime = pc.inputs().get<
double>(
"reftime");
66 if (mProcessedTFs == mTimeFrames) {
69 mCurrentOutLane = ++mCurrentOutLane % mOutLanes;
71 for (
auto& sac : mSACs) {
87 const std::string
name = fmt::format(
"SACVEC{}", lane).data();
94 const unsigned int mTimeFrames{};
95 const unsigned int mOutLanes{};
97 std::array<std::vector<int32_t>, o2::tpc::GEMSTACKS> mSACs{};
98 unsigned int mCurrentOutLane{0};
99 uint64_t mCCDBTimeStamp{0};
100 std::vector<header::DataDescription> mDataDescrOut{};
104 LOGP(info,
"Sending SACs on lane: {} for {} TFs", mCurrentOutLane, mProcessedTFs);
106 for (
unsigned int i = 0;
i < o2::tpc::GEMSTACKS; ++
i) {
114 std::vector<InputSpec> inputSpecs;
115 inputSpecs.emplace_back(
InputSpec{
"sac", gDataOriginTPC,
"DECODEDSAC", 0, Lifetime::Sporadic});
116 inputSpecs.emplace_back(
InputSpec{
"reftime", gDataOriginTPC,
"REFTIMESAC", 0, Lifetime::Sporadic});
118 std::vector<OutputSpec> outputSpecs;
119 for (
unsigned int lane = 0; lane < outlanes; ++lane) {
125 "tpc-distribute-sac",
128 AlgorithmSpec{adaptFromTask<TPCDistributeSACSpec>(timeframes, outlanes)}};
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.