Skip to content

Commit e138d7c

Browse files
committed
Add pass-through input mode to tpc-reco-workflow
1 parent ed93a0d commit e138d7c

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ namespace tpc
3434
namespace reco_workflow
3535
{
3636
/// define input and output types of the workflow
37-
enum struct InputType { Digitizer, // directly read digits from channel {TPC:DIGITS}
37+
enum struct InputType { PassThrough, // No processing, just pass through available inputs to the writers, defined by the OutputType
38+
Digitizer, // directly read digits from channel {TPC:DIGITS}
3839
Digits, // read digits from file
3940
ClustersHardware, // read hardware clusters in raw page format from file
4041
Clusters, // read native clusters from file

Detectors/TPC/workflow/src/RecoWorkflow.cxx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ template <typename T>
6767
using BranchDefinition = MakeRootTreeWriterSpec::BranchDefinition<T>;
6868

6969
const std::unordered_map<std::string, InputType> InputMap{
70+
{"pass-through", InputType::PassThrough},
7071
{"digitizer", InputType::Digitizer},
7172
{"digits", InputType::Digits},
7273
{"clustershardware", InputType::ClustersHardware},
@@ -121,7 +122,7 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
121122
zsOnTheFly = false;
122123
propagateMC = false;
123124
}
124-
if (inputType == InputType::ClustersHardware || inputType == InputType::Clusters) {
125+
if (inputType == InputType::PassThrough || inputType == InputType::ClustersHardware || inputType == InputType::Clusters) {
125126
caClusterer = false;
126127
}
127128
if (!caClusterer) {
@@ -161,7 +162,7 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
161162
return false;
162163
}};
163164

164-
if (!disableRootInput) {
165+
if (!disableRootInput || inputType == InputType::PassThrough) {
165166
// The OutputSpec of the PublisherSpec is configured depending on the input
166167
// type. Note that the configuration of the dispatch trigger in the main file
167168
// needs to be done in accordance. This means, if a new input option is added
@@ -236,6 +237,10 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
236237
//bool runZSDecode = inputType == InputType::ZSRaw;
237238
bool zsToDigit = inputType == InputType::ZSRaw && isEnabled(OutputType::Digits);
238239

240+
if (inputType == InputType::PassThrough) {
241+
runTracker = runHWDecoder = runClusterer = runClusterEncoder = zsToDigit = false;
242+
}
243+
239244
WorkflowSpec parallelProcessors;
240245
//////////////////////////////////////////////////////////////////////////////////////////////
241246
//
@@ -398,7 +403,7 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
398403
BranchDefinition<std::vector<char>>{InputSpec{"mc", ConcreteDataTypeMatcher{"TPC", "CLNATIVEMCLBL"}},
399404
"TPCClusterNativeMCTruth",
400405
"mcbranch", fillLabels},
401-
(caClusterer || decompressTPC) && !isEnabled(OutputType::SendClustersPerSector)));
406+
(caClusterer || decompressTPC || inputType == InputType::PassThrough) && !isEnabled(OutputType::SendClustersPerSector)));
402407
}
403408

404409
if (zsOnTheFly) {

Detectors/TPC/workflow/src/tpc-reco-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
4848
using namespace o2::framework;
4949

5050
std::vector<ConfigParamSpec> options{
51-
{"input-type", VariantType::String, "digits", {"digitizer, digits, zsraw, clustershw, clustersnative, compressed-clusters, compressed-clusters-ctf"}},
51+
{"input-type", VariantType::String, "digits", {"digitizer, digits, zsraw, clustershw, clustersnative, compressed-clusters, compressed-clusters-ctf, pass-through"}},
5252
{"output-type", VariantType::String, "tracks", {"digits, zsraw, clustershw, clustersnative, tracks, compressed-clusters, encoded-clusters, disable-writer, send-clusters-per-sector, qa, no-shared-cluster-map"}},
5353
{"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input reader"}},
5454
{"no-ca-clusterer", VariantType::Bool, false, {"Use HardwareClusterer instead of clusterer of GPUCATracking"}},

GPU/Workflow/src/gpu-reco-workflow.cxx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
3939

4040
std::vector<ConfigParamSpec> options{
4141
{"input-type", VariantType::String, "digits", {"digitizer, digits, zsraw, zsonthefly, clustersnative, compressed-clusters-root, compressed-clusters-ctf, trd-tracklets"}},
42-
{"output-type", VariantType::String, "tracks", {"clustersnative, tracks, compressed-clusters-ctf, qa, no-shared-cluster-map"}},
42+
{"output-type", VariantType::String, "tracks", {"clustersnative, tracks, compressed-clusters-ctf, qa, no-shared-cluster-map, send-clusters-per-sector"}},
4343
{"disable-root-input", VariantType::Bool, true, {"disable root-files input reader"}},
4444
{"disable-mc", VariantType::Bool, false, {"disable sending of MC information"}},
4545
{"ignore-dist-stf", VariantType::Bool, false, {"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}},
@@ -76,7 +76,8 @@ enum struct ioType { Digits,
7676
Tracks,
7777
QA,
7878
TRDTracklets,
79-
NoSharedMap };
79+
NoSharedMap,
80+
SendClustersPerSector };
8081

8182
static const std::unordered_map<std::string, ioType> InputMap{
8283
{"digits", ioType::Digits},
@@ -92,7 +93,8 @@ static const std::unordered_map<std::string, ioType> OutputMap{
9293
{"tracks", ioType::Tracks},
9394
{"compressed-clusters-ctf", ioType::CompClustCTF},
9495
{"qa", ioType::QA},
95-
{"no-shared-cluster-map", ioType::NoSharedMap}};
96+
{"no-shared-cluster-map", ioType::NoSharedMap},
97+
{"send-clusters-per-sector", ioType::SendClustersPerSector}};
9698

9799
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
98100
{
@@ -132,7 +134,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
132134
cfg.outputQA = isEnabled(outputTypes, ioType::QA);
133135
cfg.outputSharedClusterMap = (cfg.outputCAClusters || cfg.caClusterer || isEnabled(inputTypes, ioType::Clusters)) && cfg.outputTracks && !isEnabled(outputTypes, ioType::NoSharedMap);
134136
cfg.processMC = doMC;
135-
cfg.sendClustersPerSector = false;
137+
cfg.sendClustersPerSector = isEnabled(outputTypes, ioType::SendClustersPerSector);
136138
cfg.askDISTSTF = !cfgc.options().get<bool>("ignore-dist-stf");
137139
cfg.readTRDtracklets = isEnabled(inputTypes, ioType::TRDTracklets);
138140
specs.emplace_back(o2::gpu::getGPURecoWorkflowSpec(&gPolicyData, cfg, tpcSectors, gTpcSectorMask, "gpu-reconstruction"));

0 commit comments

Comments
 (0)