Skip to content

Commit 5cdac2f

Browse files
f3schmconcas
authored andcommitted
ITS: fix CookedTracker due to memory refactor
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 5074d71 commit 5cdac2f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/CookedTrackerSpec.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@
1919
#include "ITStracking/TimeFrame.h"
2020
#include "ITStracking/Vertexer.h"
2121
#include "ITStracking/VertexerTraits.h"
22+
#include "ITStracking/BoundedAllocator.h"
2223
#include "DataFormatsParameters/GRPObject.h"
2324
#include "DataFormatsITSMFT/TopologyDictionary.h"
2425
#include "Framework/Task.h"
2526
#include "TStopwatch.h"
2627
#include "DetectorsBase/GRPGeomHelper.h"
2728

29+
#include <oneapi/tbb/task_arena.h>
30+
2831
using namespace o2::framework;
2932

3033
namespace o2
@@ -57,6 +60,8 @@ class CookedTrackerDPL : public Task
5760
o2::its::CookedTracker mTracker;
5861
std::unique_ptr<VertexerTraits> mVertexerTraitsPtr = nullptr;
5962
std::unique_ptr<Vertexer> mVertexerPtr = nullptr;
63+
std::shared_ptr<BoundedMemoryResource> mMemoryPool;
64+
std::shared_ptr<tbb::task_arena> mTaskArena;
6065
TStopwatch mTimer;
6166
};
6267

Detectors/ITSMFT/ITS/workflow/src/CookedTrackerSpec.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ void CookedTrackerDPL::init(InitContext& ic)
6464
o2::base::GRPGeomHelper::instance().setRequest(mGGCCDBRequest);
6565
auto nthreads = ic.options().get<int>("nthreads");
6666
mTracker.setNumberOfThreads(nthreads);
67+
mTaskArena = std::make_shared<tbb::task_arena>(nthreads);
68+
mMemoryPool = std::make_unique<BoundedMemoryResource>();
69+
mVertexerPtr->setMemoryPool(mMemoryPool);
70+
mVertexerPtr->setNThreads(nthreads, mTaskArena);
71+
mVertexerTraitsPtr->setMemoryPool(mMemoryPool);
6772
}
6873

6974
void CookedTrackerDPL::run(ProcessingContext& pc)
@@ -104,6 +109,7 @@ void CookedTrackerDPL::run(ProcessingContext& pc)
104109
mc2rofs = pc.inputs().get<gsl::span<itsmft::MC2ROFRecord>>("MC2ROframes");
105110
}
106111
TimeFrame mTimeFrame;
112+
mTimeFrame.setMemoryPool(mMemoryPool);
107113

108114
LOG(info) << "ITSCookedTracker pulled " << compClusters.size() << " clusters, in " << rofs.size() << " RO frames";
109115

0 commit comments

Comments
 (0)