Skip to content

Commit 543175b

Browse files
author
Mattia Faggin
committed
Customize tmpDir for TrackTuner download accoding to track-propagation devices.
1 parent f7f3381 commit 543175b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Common/TableProducer/trackPropagation.cxx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
//
1515

1616
#include "TableHelper.h"
17+
1718
#include "Common/Tools/TrackTuner.h"
1819

1920
// The Run 3 AO2D stores the tracks at the point of innermost update. For a track with ITS this is the innermost (or second innermost)
@@ -133,7 +134,20 @@ struct TrackPropagation {
133134
break;
134135
}
135136

136-
trackTunerObj.getDcaGraphs();
137+
/// see if other track-propagation devices are present
138+
int counter = 0;
139+
LOG(info) << " ---> looking for track-propagation devices";
140+
const auto& workflows = initContext.services().get<RunningWorkflowInfo const>();
141+
for (const DeviceSpec& device : workflows.devices) {
142+
if (device.name.compare("track-propagation") == 0) {
143+
// init HF event selection helper
144+
LOG(info) << " FOUND!";
145+
counter++;
146+
}
147+
}
148+
149+
std::string tmpDirName = std::string("./") + std::to_string(counter);
150+
trackTunerObj.getDcaGraphs(tmpDirName);
137151
trackTunedTracks->SetTitle(outputStringParams.c_str());
138152
trackTunedTracks->GetXaxis()->SetBinLabel(1, "all tracks");
139153
}

Common/Tools/TrackTuner.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ struct TrackTuner : o2::framework::ConfigurableGroup {
447447
return outputString;
448448
}
449449

450-
void getDcaGraphs()
450+
void getDcaGraphs(std::string tmpDir = ".")
451451
{
452452
std::string fullNameInputFile = "";
453453
std::string fullNameFileQoverPt = "";
@@ -456,7 +456,6 @@ struct TrackTuner : o2::framework::ConfigurableGroup {
456456
/// use input correction file from CCDB
457457

458458
// properly init the ccdb
459-
std::string tmpDir = ".";
460459
ccdbApi.init("http://alice-ccdb.cern.ch");
461460

462461
// get the DCA correction file from CCDB

0 commit comments

Comments
 (0)