Project
Loading...
Searching...
No Matches
FT0TimeOffsetCalibration-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
13
18
19using namespace o2::framework;
20
21void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
22{
23 // probably some option will be added
24 std::vector<o2::framework::ConfigParamSpec> options;
25 options.push_back(ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}});
26
27 std::swap(workflowOptions, options);
28}
29
31
33{
34 using CalibrationDeviceType = o2::fit::FITCalibrationDevice<float,
36 std::vector<o2::framework::InputSpec> inputs;
37 std::vector<o2::framework::OutputSpec> outputs;
38 const o2::header::DataDescription inputDataDescriptor{"TIME_SPECTRA"};
39 const o2::header::DataDescription outputDataDescriptor{"FT0_TIME_CALIB"};
40 CalibrationDeviceType::prepareVecInputSpec(inputs, o2::header::gDataOriginFT0, inputDataDescriptor);
41 CalibrationDeviceType::prepareVecOutputSpec(outputs, outputDataDescriptor);
42
43 o2::conf::ConfigurableParam::updateFromString(config.options().get<std::string>("configKeyValues"));
44 auto ccdbRequest = std::make_shared<o2::base::GRPGeomRequest>(true, // orbitResetTime
45 true, // GRPECS=true
46 false, // GRPLHCIF
47 false, // GRPMagField
48 false, // askMatLUT
50 inputs);
51 o2::framework::DataProcessorSpec dataProcessorSpec{
52 "ft0-time-offset-calib",
53 inputs,
54 outputs,
55 o2::framework::AlgorithmSpec{o2::framework::adaptFromTask<CalibrationDeviceType>(ccdbRequest, outputDataDescriptor)},
57 {"tf-per-slot", o2::framework::VariantType::UInt32, 56000u, {""}},
58 {"max-delay", o2::framework::VariantType::UInt32, 3u, {""}},
59 {"extra-info-per-slot", o2::framework::VariantType::String, "", {"Extra info for time slot(usually for debugging)"}}}};
60
61 WorkflowSpec workflow;
62 workflow.emplace_back(dataProcessorSpec);
63 return workflow;
64}
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
WorkflowSpec defineDataProcessing(ConfigContext const &config)
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
constexpr o2::header::DataOrigin gDataOriginFT0
Definition DataHeader.h:566
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< ConfigParamSpec > Options