Project
Loading...
Searching...
No Matches
preclusters-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>
16
17using namespace o2::framework;
18
19void 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
26void customize(std::vector<ConfigParamSpec>& workflowOptions)
27{
28 workflowOptions.emplace_back("enable-mc", VariantType::Bool, false, ConfigParamSpec::HelpString{"Propagate MC info"});
29}
30
32
34{
35 bool useMC = config.options().get<bool>("enable-mc");
36 return WorkflowSpec{o2::mch::getPreClusterWriterSpec(useMC, "mch-precluster-writer")};
37}
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getPreClusterWriterSpec(bool useMC, const char *specName="mch-precluster-writer")
WorkflowSpec defineDataProcessing(const ConfigContext &config)
void customize(std::vector< o2::framework::CompletionPolicy > &policies)
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...