Skip to content

Commit a4bd6bc

Browse files
matthias-kleinerwiechula
authored andcommitted
TPC: move nthreads to local option
1 parent c36617d commit a4bd6bc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Detectors/TPC/workflow/include/TPCWorkflow/TPCFourierTransformAggregatorSpec.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class TPCFourierTransformAggregatorSpec : public o2::framework::Task
6464
mLengthIDCScalerSeconds = ic.options().get<float>("tpcScalerLengthS");
6565
mDisableScaler = ic.options().get<bool>("disable-scaler");
6666
mEnableFFTCCDB = ic.options().get<bool>("enable-fft-CCDB");
67+
int nthreads = ic.options().get<int>("nthreads");
68+
TPCFourierTransformAggregatorSpec::IDCFType::setNThreads(nthreads);
6769
resizeBuffer(mInputLanes);
6870
}
6971

@@ -448,7 +450,8 @@ DataProcessorSpec getTPCFourierTransformAggregatorSpec(const unsigned int rangeI
448450
{"dump-coefficients-agg", VariantType::Bool, false, {"Dump fourier coefficients to file"}},
449451
{"tpcScalerLengthS", VariantType::Float, 300.f, {"Length of the TPC scalers in seconds"}},
450452
{"disable-scaler", VariantType::Bool, false, {"Disable creation of IDC scaler"}},
451-
{"enable-fft-CCDB", VariantType::Bool, false, {"Enable writing of FFT coefficients to CCDB"}}}};
453+
{"enable-fft-CCDB", VariantType::Bool, false, {"Enable writing of FFT coefficients to CCDB"}},
454+
{"nthreads", VariantType::Int, 1, {"Number of threads which will be used during the calculation of the fourier coefficients."}}}};
452455
}
453456

454457
} // namespace o2::tpc

Detectors/TPC/workflow/src/tpc-fouriertransform-aggregator.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
2626
std::vector<ConfigParamSpec> options{
2727
{"rangeIDC", VariantType::Int, 200, {"Number of 1D-IDCs which will be used for the calculation of the fourier coefficients. TODO ALREADY SET IN ABERAGEGROUP"}},
2828
{"nFourierCoeff", VariantType::Int, 60, {"Number of fourier coefficients (real+imag) which will be stored in the CCDB. The maximum can be 'rangeIDC + 2'."}},
29-
{"nthreads", VariantType::Int, 1, {"Number of threads which will be used during the calculation of the fourier coefficients."}},
3029
{"inputLanes", VariantType::Int, 2, {"Number of expected input lanes."}},
3130
{"sendOutput", VariantType::Bool, false, {"send fourier coefficients"}},
3231
{"use-naive-fft", VariantType::Bool, false, {"using naive fourier transform (true) or FFTW (false)"}},
@@ -51,8 +50,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& config)
5150
const bool processSACs = config.options().get<bool>("process-SACs");
5251
const auto rangeIDC = static_cast<unsigned int>(config.options().get<int>("rangeIDC"));
5352
const auto nFourierCoeff = std::clamp(static_cast<unsigned int>(config.options().get<int>("nFourierCoeff")), static_cast<unsigned int>(0), rangeIDC + 2);
54-
const auto nthreadsFourier = static_cast<unsigned long>(config.options().get<int>("nthreads"));
55-
TPCFourierTransformAggregatorSpec::IDCFType::setNThreads(nthreadsFourier);
5653
TPCFourierTransformAggregatorSpec::IDCFType::setFFT(!fft);
5754
const auto inputLanes = config.options().get<int>("inputLanes");
5855
WorkflowSpec workflow{getTPCFourierTransformAggregatorSpec(rangeIDC, nFourierCoeff, sendOutput, processSACs, inputLanes)};

0 commit comments

Comments
 (0)