Project
Loading...
Searching...
No Matches
MCTruthTestWorkflow.cxx
Go to the documentation of this file.
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 <boost/program_options.hpp>
13
14
#include "
Framework/WorkflowSpec.h
"
15
#include "
Framework/ConfigParamSpec.h
"
16
#include "
Framework/CompletionPolicy.h
"
17
#include "
Framework/CompletionPolicyHelpers.h
"
18
#include "
Framework/DeviceSpec.h
"
19
#include "
MCTruthSourceSpec.h
"
20
#include "
MCTruthWriterSpec.h
"
21
#include "
MCTruthReaderSpec.h
"
22
23
using namespace
o2::framework
;
24
25
void
customize
(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
26
{
27
// option to disable MC truth
28
workflowOptions.push_back(
ConfigParamSpec
{
"newmctruth"
,
o2::framework::VariantType::Bool
,
false
, {
"enable new container"
}});
29
workflowOptions.push_back(
ConfigParamSpec
{
"consumers"
,
o2::framework::VariantType::Int
, 1, {
"number of mc consumers"
}});
30
}
31
32
#include "
Framework/runDataProcessing.h
"
33
36
WorkflowSpec
defineDataProcessing
(
ConfigContext
const
& configcontext)
37
{
38
WorkflowSpec
specs;
39
40
bool
newmctruth = configcontext.
options
().
get
<
bool
>(
"newmctruth"
);
41
42
// connect the source
43
specs.emplace_back(
o2::getMCTruthSourceSpec
(newmctruth));
44
// connect some consumers
45
for
(
int
i
= 0;
i
< configcontext.
options
().
get
<
int
>(
"consumers"
); ++
i
) {
46
specs.emplace_back(
o2::getMCTruthWriterSpec
(
i
,
i
== 0, newmctruth));
47
}
48
// connect a device reading back the labels
49
specs.emplace_back(
o2::getMCTruthReaderSpec
(newmctruth));
50
// connect a device reading back the labels
51
specs.emplace_back(
o2::getMCTruthWriterSpec
(-1,
false
, newmctruth));
52
53
return
specs;
54
}
CompletionPolicyHelpers.h
CompletionPolicy.h
ConfigParamSpec.h
DeviceSpec.h
i
int32_t i
Definition
GPUCommonAlgorithm.h:443
MCTruthReaderSpec.h
MCTruthSourceSpec.h
customize
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
Definition
MCTruthTestWorkflow.cxx:25
defineDataProcessing
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
This function hooks up the the workflow specifications into the DPL driver.
Definition
MCTruthTestWorkflow.cxx:36
MCTruthWriterSpec.h
WorkflowSpec.h
o2::framework::ConfigContext
Definition
ConfigContext.h:24
o2::framework::ConfigContext::options
ConfigParamRegistry & options() const
Definition
ConfigContext.h:28
o2::framework::ConfigParamRegistry::get
T get(const char *key) const
Definition
ConfigParamRegistry.h:98
o2::framework
Defining PrimaryVertex explicitly as messageable.
Definition
TFIDInfo.h:20
o2::framework::VariantType::Int
@ Int
o2::framework::VariantType::Bool
@ Bool
o2::framework::WorkflowSpec
std::vector< DataProcessorSpec > WorkflowSpec
Definition
HBFUtilsInitializer.h:39
o2::getMCTruthSourceSpec
o2::framework::DataProcessorSpec getMCTruthSourceSpec(bool newmctruth)
Definition
MCTruthSourceSpec.cxx:77
o2::getMCTruthReaderSpec
o2::framework::DataProcessorSpec getMCTruthReaderSpec(bool newmctruth)
Definition
MCTruthReaderSpec.h:89
o2::getMCTruthWriterSpec
o2::framework::DataProcessorSpec getMCTruthWriterSpec(int id, bool doio, bool newmctruth)
Definition
MCTruthWriterSpec.cxx:102
runDataProcessing.h
o2::framework::ConfigParamSpec
Definition
ConfigParamSpec.h:31
Steer
DigitizerWorkflow
src
MCTruthTestWorkflow.cxx
Generated on Tue Feb 25 2025 23:16:46 for Project by
1.9.8