Project
Loading...
Searching...
No Matches
tpc-vdrift-tgl-calibration-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
15
16using namespace o2::framework;
17
18// we need to add workflow options before including Framework/runDataProcessing
19void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
20{
21 // option allowing to set parameters
22 std::vector<o2::framework::ConfigParamSpec> options{
23 {"nbins-tgl", o2::framework::VariantType::Int, 20, {"number of bins in tgL"}},
24 {"max-tgl-its", o2::framework::VariantType::Float, 2.f, {"max range for tgL of ITS tracks"}},
25 {"nbins-dtgl", o2::framework::VariantType::Int, 50, {"number of bins in tgL_ITS - tgl_TPC"}},
26 {"max-dtgl-itstpc", o2::framework::VariantType::Float, 0.15f, {"max range for tgL_ITS - tgl_TPC"}},
27 {"min-entries-per-slot", o2::framework::VariantType::Int, 10000, {"mininal number of entries per slot"}},
28 {"time-slot-seconds", o2::framework::VariantType::Int, 600, {"time slot length in seconds"}},
29 {"first-slot-length-fraction", o2::framework::VariantType::Float, 0.3f, {"1st slot length as fraction of nominal"}},
30 {"max-slots-delay", o2::framework::VariantType::Float, 0.1f, {"difference in slot units between the current TF and oldest slot (end TF) to account for the TF"}},
31 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
32 std::swap(workflowOptions, options);
33}
34
35// ------------------------------------------------------------------
36
38
40{
41 WorkflowSpec specs;
42 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
43 specs.emplace_back(o2::tpc::getTPCVDriftTglCalibSpec(configcontext.options().get<int>("nbins-tgl"),
44 configcontext.options().get<float>("max-tgl-its"),
45 configcontext.options().get<int>("nbins-dtgl"),
46 configcontext.options().get<float>("max-dtgl-itstpc"),
47 configcontext.options().get<int>("time-slot-seconds"),
48 configcontext.options().get<float>("first-slot-length-fraction"),
49 configcontext.options().get<float>("max-slots-delay"),
50 configcontext.options().get<int>("min-entries-per-slot")));
51 return specs;
52}
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getTPCVDriftTglCalibSpec(int ntgl, float tglMax, int ndtgl, float dtglMax, size_t slotL, float offset, float maxDelay, size_t minEnt)
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
This function hooks up the the workflow specifications into the DPL driver.