Project
Loading...
Searching...
No Matches
decoded-digits-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
16
17#include <string>
18#include <vector>
19#include "Framework/Variant.h"
22
23using namespace o2::framework;
24
25// we need to add workflow options before including Framework/runDataProcessing
26void customize(std::vector<ConfigParamSpec>& workflowOptions)
27{
28 std::vector<ConfigParamSpec>
29 options{
30 {"mid-digits-output-filename", VariantType::String, "mid-digits-decoded.root", {"Decoded digits output file"}},
31 {"mid-digits-tree-name", VariantType::String, "middigits", {"Name of tree in digits file"}}};
32 workflowOptions.insert(workflowOptions.end(), options.begin(), options.end());
33}
34
35void customize(std::vector<o2::framework::CompletionPolicy>& policies)
36{
37 // ordered policies for the writers
38 policies.push_back(CompletionPolicyHelpers::consumeWhenAllOrdered(".*(?:MID|mid).*[W,w]riter.*"));
39}
40
45
47{
48 auto outputFilename = cfgc.options().get<std::string>("mid-digits-output-filename");
49 auto treeFilename = cfgc.options().get<std::string>("mid-digits-tree-name");
50 WorkflowSpec specs;
51 specs.emplace_back(MakeRootTreeWriterSpec("MIDDigitWriter",
52 outputFilename.c_str(),
53 treeFilename.c_str(),
54 -1,
61
62 return specs;
63}
Strip pattern (aka digits)
Definition of the MID event record.
Configurable generator for RootTreeWriter processor spec.
ConfigParamRegistry & options() const
Generate a processor spec for the RootTreeWriter utility.
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
void customize(std::vector< ConfigParamSpec > &workflowOptions)
constexpr o2::header::DataOrigin gDataOriginMID
Definition DataHeader.h:573
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...