Project
Loading...
Searching...
No Matches
tracks-writer-workflow.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 <vector>
13
#include "
Framework/ConfigParamSpec.h
"
14
#include "
Framework/CompletionPolicyHelpers.h
"
15
#include "
MCHIO/TrackWriterSpec.h
"
16
17
using namespace
o2::framework
;
18
19
void
customize
(std::vector<o2::framework::CompletionPolicy>& policies)
20
{
21
// ordered policies for the writers
22
policies.push_back(
CompletionPolicyHelpers::consumeWhenAllOrdered
(
".*(?:MCH|mch).*[W,w]riter.*"
));
23
}
24
25
// we need to add workflow options before including Framework/runDataProcessing
26
void
customize
(std::vector<ConfigParamSpec>& workflowOptions)
27
{
28
workflowOptions.emplace_back(
"enable-mc"
, VariantType::Bool,
false
,
ConfigParamSpec::HelpString
{
"Propagate MC info"
});
29
workflowOptions.emplace_back(
"digits"
, VariantType::Bool,
false
,
ConfigParamSpec::HelpString
{
"Write associated digits"
});
30
}
31
32
#include "
Framework/runDataProcessing.h
"
33
34
WorkflowSpec
defineDataProcessing
(
const
ConfigContext
& config)
35
{
36
bool
useMC = config.
options
().
get
<
bool
>(
"enable-mc"
);
37
bool
digits
= config.
options
().
get
<
bool
>(
"digits"
);
38
return
WorkflowSpec
{
o2::mch::getTrackWriterSpec
(useMC,
"mch-track-writer"
,
"mchtracks.root"
,
digits
)};
39
}
CompletionPolicyHelpers.h
ConfigParamSpec.h
defineDataProcessing
WorkflowSpec defineDataProcessing(const ConfigContext &config)
Definition
tracks-writer-workflow.cxx:34
customize
void customize(std::vector< o2::framework::CompletionPolicy > &policies)
Definition
tracks-writer-workflow.cxx:19
TrackWriterSpec.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::WorkflowSpec
std::vector< DataProcessorSpec > WorkflowSpec
Definition
HBFUtilsInitializer.h:39
o2::mch::getTrackWriterSpec
o2::framework::DataProcessorSpec getTrackWriterSpec(bool useMC, const char *specName="mch-track-writer", const char *fileName="mchtracks.root", bool digits=false)
Definition
TrackWriterSpec.cxx:31
runDataProcessing.h
o2::framework::CompletionPolicyHelpers::consumeWhenAllOrdered
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
Definition
CompletionPolicyHelpers.cxx:174
o2::framework::ConfigParamSpec::HelpString
Definition
ConfigParamSpec.h:34
digits
std::vector< Digit > digits
Definition
test_ctf_io_hmpid.cxx:40
Detectors
MUON
MCH
IO
src
tracks-writer-workflow.cxx
Generated on Tue Feb 25 2025 23:16:24 for Project by
1.9.8