Project
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
filtering-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 "FilteringSpec.h"
20
21using namespace o2::framework;
24
25void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
26{
28}
29
30void customize(std::vector<ConfigParamSpec>& workflowOptions)
31{
32 // option allowing to set parameters
33 std::vector<o2::framework::ConfigParamSpec> options{
34 {"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input reader"}},
35 {"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation"}},
36 {"disable-secondary-vertices", o2::framework::VariantType::Bool, false, {"disable filling secondary vertices"}},
37 {"data-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of sources to use"}},
38 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
40 std::swap(workflowOptions, options);
41}
42
44
46{
47 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
48 auto useMC = !configcontext.options().get<bool>("disable-mc");
49 bool enableSV = !configcontext.options().get<bool>("disable-secondary-vertices");
50 GID::mask_t allowedSrc = GID::getSourcesMask("ITS,TPC,ITS-TPC,ITS-TPC-TOF,TPC-TOF,FT0,FV0,FDD,TPC-TRD,ITS-TPC-TRD,FT0,FV0,FDD,CTP");
51 GID::mask_t src = allowedSrc & GID::getSourcesMask(configcontext.options().get<std::string>("data-sources"));
52
53 WorkflowSpec specs;
54 specs.emplace_back(o2::filtering::getDataFilteringSpec(src, enableSV, useMC));
55
56 o2::globaltracking::InputHelper::addInputSpecs(configcontext, specs, src, src, src, useMC, src);
58 if (enableSV) {
60 }
61
62 // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
63 o2::raw::HBFUtilsInitializer hbfIni(configcontext, specs);
64
65 return std::move(specs);
66}
Global index for barrel track: provides provenance (detectors combination), index in respective array...
MID filtering spec.
static void updateFromString(std::string const &)
static mask_t getSourcesMask(const std::string_view srcList)
static constexpr std::string_view ALL
keywork for all sources
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
ConfigParamRegistry & options() const
static int addInputSpecs(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, GID::mask_t maskClusters, GID::mask_t maskMatches, GID::mask_t maskTracks, bool useMC=true, GID::mask_t maskClustersMC=GID::getSourcesMask(GID::ALL), GID::mask_t maskTracksMC=GID::getSourcesMask(GID::ALL), bool subSpecStrict=false)
static int addInputSpecsSVertex(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs)
static int addInputSpecsPVertex(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, bool mc)
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
GLenum src
Definition glcorearb.h:1767
DataProcessorSpec getDataFilteringSpec(GID::mask_t src, bool enableSV, bool useMC)
create a processor spec
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
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))