Project
Loading...
Searching...
No Matches
track-and-cluster-filter.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
23
24using namespace o2::framework;
25
26// customize the completion policy
27void customize(std::vector<o2::framework::CompletionPolicy>& policies)
28{
30 // the TPC sector completion policy checks when the set of TPC/CLUSTERNATIVE data is complete
31 // in addition we require to have input from all other routes
32 policies.push_back(o2::tpc::TPCSectorCompletionPolicy("tpc-track-and-cluster-filter",
34 InputSpec{"cluster", ConcreteDataTypeMatcher{"TPC", "CLUSTERNATIVE"}})());
35}
36
37// we need to add workflow options before including Framework/runDataProcessing
38void customize(std::vector<ConfigParamSpec>& workflowOptions)
39{
40
41 std::vector<ConfigParamSpec> options{
42 // {"use-digit-input", VariantType::Bool, false, {"use TPC digits as input, instead of raw data"}},
43 {"data-description", VariantType::String, "TRACKS", {"Can be used to select filterd tracks, e.g. 'LASERTRACKS', 'MIPS'"}},
44 {"write-mc", VariantType::Bool, false, {"Can be used to write mc labels, e.g. 'TPCTracksMCTruth'"}},
45 };
46
47 std::swap(workflowOptions, options);
48}
49
51
53{
54 // const bool useDigitsAsInput = cfg.options().get<bool>("use-digit-input");
55 const auto dataDescription = cfg.options().get<std::string>("data-description");
56 const auto writeMC = cfg.options().get<bool>("write-mc");
57
58 WorkflowSpec specs;
59
60 specs.emplace_back(o2::tpc::getTrackAndClusterFilterSpec(dataDescription, writeMC));
61
62 return specs;
63}
DPL completion policy helper for TPC scetor data.
track and cluster filtering
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getTrackAndClusterFilterSpec(const std::string dataDescriptionStr="TRACKS", const bool writeMC=false)
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)