Project
Loading...
Searching...
No Matches
digits-to-clusters-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
14
26#include "Framework/Task.h"
27#include "Framework/Variant.h"
29
30void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
31{
33}
34
35void customize(std::vector<o2::framework::CompletionPolicy>& policies)
36{
37 // ordered policies for the writers
38 policies.push_back(o2::framework::CompletionPolicyHelpers::consumeWhenAllOrdered(".*HMPClustersWriter.*"));
39}
40
43// we need to add workflow options before including Framework/runDataProcessing
44void customize(std::vector<ConfigParamSpec>& workflowOptions)
45{
46 std::string keyvaluehelp("Semicolon separated key=value strings ...");
47 workflowOptions.push_back(ConfigParamSpec{"configKeyValues", VariantType::String, "", {keyvaluehelp}});
48
49 workflowOptions.push_back(ConfigParamSpec{"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input readers"}});
50
51 workflowOptions.push_back(ConfigParamSpec{"disable-root-output", VariantType::Bool, false, {"disable root-files output writers"}});
52
54}
55
60// #include "HMPIDWorkflow/HMPIDDigitizerSpec.h"ss
61
62using namespace o2;
63using namespace o2::framework;
64
66{
67 WorkflowSpec specs;
69 configcontext.options().get<std::string>("configKeyValues"));
70
71 auto disableRootInp = configcontext.options().get<bool>("disable-root-input"); // read upstream by default
72 auto disableRootOut = configcontext.options().get<bool>("disable-root-output"); // write upstream by default
73
75
76 specs.push_back(consumer);
77
78 // Read to File; input file and dir can be specified using
79 // --hmpid-digit-infile and --input-dir (from DigitsReaderSpec Class)
80 if (!disableRootInp) {
81 specs.emplace_back(hmpid::getDigitsReaderSpec());
82 }
83
84 // Write to Cluster-File; output file and dir can be specified using
85 // --outfile and --output-dir (from MakeTreeRootWriter Class)
86 if (!disableRootOut) {
87 specs.push_back(hmpid::getClusterWriterSpec());
88 }
89
90 return specs;
91}
Implementation of writing HMPID clusters to file.
Implementation of clusterization for HMPID; read upstream/from file write upstream/to file.
Definition of the Names Generator class.
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
WorkflowSpec defineDataProcessing(const ConfigContext &configcontext)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getDigitsReaderSpec()
o2::framework::DataProcessorSpec getClusterWriterSpec()
o2::framework::DataProcessorSpec getDigitsToClustersSpec()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
static void addNewTimeSliceCallback(std::vector< o2::framework::CallbacksPolicy > &policies)
static void addConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts, const std::string &defOpt=std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE))