Skip to content

Commit a264ccc

Browse files
committed
add lane ID to debug file name if more than 1 lanes
1 parent e952633 commit a264ccc

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "Framework/Task.h"
2222
#include "Framework/DataRefUtils.h"
2323
#include "Framework/CCDBParamSpec.h"
24+
#include "Framework/DeviceSpec.h"
2425
#include <string>
2526
#include "TStopwatch.h"
2627
#include "Framework/ConfigParamRegistry.h"
@@ -94,6 +95,9 @@ void TPCITSMatchingDPL::init(InitContext& ic)
9495
{
9596
mTimer.Stop();
9697
mTimer.Reset();
98+
int lane = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
99+
int maxLanes = ic.services().get<const o2::framework::DeviceSpec>().maxInputTimeslices;
100+
mMatching.setDebugTreeFileName(maxLanes == 1 ? "dbg_TPCITSmatch.root" : fmt::format("dbg_TPCITSmatch_{}.root", lane));
97101
o2::base::GRPGeomHelper::instance().setRequest(mGGCCDBRequest);
98102
mMatching.setNThreads(std::max(1, ic.options().get<int>("nthreads")));
99103
mMatching.setUseBCFilling(!ic.options().get<bool>("ignore-bc-check"));

Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "DataFormatsFT0/RecPoints.h"
2727
#include "Framework/ConfigParamRegistry.h"
2828
#include "Framework/CCDBParamSpec.h"
29+
#include "Framework/DeviceSpec.h"
2930
#include "FT0Reconstruction/InteractionTag.h"
3031
#include "ITSMFTBase/DPLAlpideParam.h"
3132
#include "DetectorsCommonDataFormats/DetID.h"
@@ -118,8 +119,12 @@ void TrackingStudySpec::init(InitContext& ic)
118119
{
119120
o2::base::GRPGeomHelper::instance().setRequest(mGGCCDBRequest);
120121
mTPCCorrMapsLoader.init(ic);
121-
mDBGOut = std::make_unique<o2::utils::TreeStreamRedirector>("trackStudy.root", "recreate");
122-
mDBGOutVtx = std::make_unique<o2::utils::TreeStreamRedirector>("trackStudyVtx.root", "recreate");
122+
int lane = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
123+
int maxLanes = ic.services().get<const o2::framework::DeviceSpec>().maxInputTimeslices;
124+
std::string dbgnm = maxLanes == 1 ? "trackStudy.root" : fmt::format("trackStudy_{}.root", lane);
125+
mDBGOut = std::make_unique<o2::utils::TreeStreamRedirector>(dbgnm.c_str(), "recreate");
126+
dbgnm = maxLanes == 1 ? "trackStudyVtx.root" : fmt::format("trackStudyVtx_{}.root", lane);
127+
mDBGOutVtx = std::make_unique<o2::utils::TreeStreamRedirector>(dbgnm.c_str(), "recreate");
123128
mStoreWithITSOnly = ic.options().get<bool>("with-its-only");
124129
mMaxVTTimeDiff = ic.options().get<float>("max-vtx-timediff");
125130
mMaxNeighbours = ic.options().get<int>("max-vtx-neighbours");

0 commit comments

Comments
 (0)