Skip to content

Commit 51c194e

Browse files
maciaccoGiorgioAlbertoLucia
authored andcommitted
add first skeleton of reco workflow for iotof
1 parent f28379b commit 51c194e

4 files changed

Lines changed: 95 additions & 18 deletions

File tree

Detectors/Upgrades/ALICE3/IOTOF/workflow/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ o2_add_library(IOTOFWorkflow
1313
TARGETVARNAME targetName
1414
SOURCES src/DigitReaderSpec.cxx
1515
src/DigitWriterSpec.cxx
16+
src/RecoWorkflow.cxx
1617
PUBLIC_LINK_LIBRARIES O2::Framework
1718
O2::DataFormatsIOTOF
1819
O2::DataFormatsITSMFT
1920
O2::DPLUtils
2021
)
2122

22-
#o2_add_executable(reco-workflow
23-
# SOURCES src/iotof-reco-workflow.cxx
24-
# COMPONENT_NAME alice3-iotof
25-
# PUBLIC_LINK_LIBRARIES O2::IOTOFWorkflow
26-
# O2::IOTOFSimulation
27-
# )
23+
o2_add_executable(reco-workflow
24+
SOURCES src/iotof-reco-workflow.cxx
25+
COMPONENT_NAME alice3-iotof
26+
PUBLIC_LINK_LIBRARIES O2::IOTOFWorkflow
27+
O2::IOTOFSimulation
28+
)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#ifndef O2_TF3_RECOWORKFLOW_H
13+
#define O2_TF3_RECOWORKFLOW_H
14+
15+
#include "Framework/WorkflowSpec.h"
16+
#include <string>
17+
18+
namespace o2::iotof
19+
{
20+
namespace reco_workflow
21+
{
22+
23+
o2::framework::WorkflowSpec getWorkflow(bool useMC,
24+
// const std::string& hitRecoConfig,
25+
bool upstreamDigits = false,
26+
bool upstreamClusters = false,
27+
bool disableRootOutput = false);
28+
}
29+
30+
} // namespace o2::iotof
31+
32+
#endif
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#include "IOTOFWorkflow/RecoWorkflow.h"
13+
#include "IOTOFWorkflow/DigitReaderSpec.h"
14+
#include "Framework/CCDBParamSpec.h"
15+
16+
#include <string>
17+
18+
namespace o2::iotof::reco_workflow
19+
{
20+
21+
framework::WorkflowSpec getWorkflow(bool useMC,
22+
// const std::string& hitRecoConfig,
23+
bool upstreamDigits,
24+
bool upstreamClusters,
25+
bool disableRootOutput)
26+
{
27+
framework::WorkflowSpec specs;
28+
29+
if (!(upstreamDigits || upstreamClusters)) {
30+
specs.emplace_back(o2::iotof::getIOTOFDigitReaderSpec(useMC, false, "tf3digits.root"));
31+
}
32+
if (!upstreamClusters) {
33+
// specs.emplace_back(o2::iotof::getClustererSpec(useMC));
34+
}
35+
36+
if (!disableRootOutput) {
37+
// specs.emplace_back(o2::iotof::getClusterWriterSpec(useMC));
38+
}
39+
40+
return specs;
41+
}
42+
43+
} // namespace o2::iotof::reco_workflow

Detectors/Upgrades/ALICE3/IOTOF/workflow/src/iotof-reco-workflow.cxx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
// granted to it by virtue of its status as an Intergovernmental Organization
2121
// or submit itself to any jurisdiction.
2222

23-
// #include "TRKWorkflow/RecoWorkflow.h"
24-
// #include "CommonUtils/ConfigurableParam.h"
23+
#include "IOTOFWorkflow/RecoWorkflow.h"
24+
#include "CommonUtils/ConfigurableParam.h"
2525
// #include "ITStracking/TrackingConfigParam.h"
2626
// #include "ITStracking/Configuration.h"
2727

2828
#include "Framework/CallbacksPolicy.h"
2929
#include "Framework/ConfigContext.h"
3030
#include "Framework/CompletionPolicyHelpers.h"
3131

32-
// #include <vector>
32+
#include <vector>
3333

3434
using namespace o2::framework;
3535

@@ -52,11 +52,12 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
5252
{"clusters-from-upstream", VariantType::Bool, false, {"clusters will be provided from upstream, skip clusterizer"}},
5353
{"disable-root-output", VariantType::Bool, false, {"do not write output root files"}},
5454
{"disable-mc", VariantType::Bool, false, {"disable MC propagation even if available"}},
55-
{"tracking-from-hits-config", VariantType::String, "", {"JSON file with tracking from hits configuration"}},
56-
{"disable-tracking", VariantType::Bool, false, {"disable tracking step"}},
57-
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
58-
{"use-gpu-workflow", VariantType::Bool, false, {"use GPU workflow (default: false)"}},
59-
{"gpu-device", VariantType::Int, 1, {"use gpu device: CPU=1,CUDA=2,HIP=3 (default: CPU)"}}};
55+
// {"tracking-from-hits-config", VariantType::String, "", {"JSON file with tracking from hits configuration"}},
56+
// {"disable-tracking", VariantType::Bool, false, {"disable tracking step"}},
57+
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}} //,
58+
// {"use-gpu-workflow", VariantType::Bool, false, {"use GPU workflow (default: false)"}},
59+
// {"gpu-device", VariantType::Int, 1, {"use gpu device: CPU=1,CUDA=2,HIP=3 (default: CPU)"}}
60+
};
6061
std::swap(workflowOptions, options);
6162
}
6263

@@ -67,9 +68,9 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co
6768
{
6869
// Update the (declared) parameters if changed from the command line
6970
auto useMC = !configcontext.options().get<bool>("disable-mc");
70-
auto hitRecoConfig = configcontext.options().get<std::string>("tracking-from-hits-config");
71-
auto useGpuWF = configcontext.options().get<bool>("use-gpu-workflow");
72-
auto gpuDevice = static_cast<o2::gpu::gpudatatypes::DeviceType>(configcontext.options().get<int>("gpu-device"));
71+
// auto hitRecoConfig = configcontext.options().get<std::string>("tracking-from-hits-config");
72+
// auto useGpuWF = configcontext.options().get<bool>("use-gpu-workflow");
73+
// auto gpuDevice = static_cast<o2::gpu::gpudatatypes::DeviceType>(configcontext.options().get<int>("gpu-device"));
7374
auto extDigits = configcontext.options().get<bool>("digits-from-upstream");
7475
auto extClusters = configcontext.options().get<bool>("clusters-from-upstream");
7576
auto disableRootOutput = configcontext.options().get<bool>("disable-root-output");
@@ -78,5 +79,5 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co
7879
// write the configuration used for the reco workflow
7980
o2::conf::ConfigurableParam::writeINI("o2itsrecoflow_configuration.ini");
8081

81-
return o2::iotof::reco_workflow::getWorkflow(useMC, hitRecoConfig, extDigits, extClusters, disableRootOutput, useGpuWF, gpuDevice);
82+
return o2::iotof::reco_workflow::getWorkflow(useMC, /*hitRecoConfig,*/ extDigits, extClusters, disableRootOutput/*, useGpuWF, gpuDevice*/);
8283
}

0 commit comments

Comments
 (0)