Project
Loading...
Searching...
No Matches
tpc-monitor-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
21
22using namespace o2::framework;
23
24// customize the completion policy
25void customize(std::vector<o2::framework::CompletionPolicy>& policies)
26{
28 policies.push_back(CompletionPolicyHelpers::defineByName("tpc-monitor-workflow", CompletionPolicy::CompletionOp::Consume));
29}
30
31// we need to add workflow options before including Framework/runDataProcessing
32void customize(std::vector<ConfigParamSpec>& workflowOptions)
33{
34
35 std::vector<ConfigParamSpec> options{
36 {"use-digit-input", VariantType::Bool, false, {"use TPC digits as input, instead of raw data"}},
37 {"input-spec", VariantType::String, "tpcraw:TPC/RAWDATA", {"selection string input specs"}},
38 };
39
40 std::swap(workflowOptions, options);
41}
42
44
46{
47 const bool useDigitsAsInput = cfg.options().get<bool>("use-digit-input");
48 auto inputSpec = cfg.options().get<std::string>("input-spec");
49 if (useDigitsAsInput) {
50 inputSpec = "tpcdigits:TPC/DIGITS";
51 }
52
53 WorkflowSpec specs;
54
55 specs.emplace_back(o2::tpc::getMonitorWorkflowSpec(inputSpec));
56
57 return specs;
58}
Raw data monitor workflow.
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getMonitorWorkflowSpec(std::string inputSpec="tpcraw:TPC/RAWDATA")
static CompletionPolicy defineByName(std::string const &name, CompletionPolicy::CompletionOp op)
WorkflowSpec defineDataProcessing(ConfigContext const &cfg)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< o2::framework::CompletionPolicy > &policies)