Project
Loading...
Searching...
No Matches
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
16
17#include <string>
18#include <vector>
19#include "Framework/Variant.h"
21
22using namespace o2::framework;
23
24void customize(std::vector<ConfigParamSpec>& workflowOptions)
25{
26 std::vector<ConfigParamSpec> options{
27 {"feeId-config-file", VariantType::String, "", {"Filename with crate FEE ID correspondence"}},
28 {"crate-masks-file", VariantType::String, "", {"Filename with crate masks"}},
29 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
30 workflowOptions.insert(workflowOptions.end(), options.begin(), options.end());
31}
32
37#include "MIDRaw/CrateMasks.h"
38#include "MIDRaw/FEEIdConfig.h"
39
41{
42 auto feeIdConfigFilename = cfgc.options().get<std::string>("feeId-config-file");
43 o2::mid::FEEIdConfig feeIdConfig;
44 if (!feeIdConfigFilename.empty()) {
45 feeIdConfig = o2::mid::FEEIdConfig(feeIdConfigFilename.c_str());
46 }
47 auto crateMasksFilename = cfgc.options().get<std::string>("crate-masks-file");
48 o2::mid::CrateMasks crateMasks;
49 if (!crateMasksFilename.empty()) {
50 crateMasks = o2::mid::CrateMasks(crateMasksFilename.c_str());
51 }
52 o2::conf::ConfigurableParam::updateFromString(cfgc.options().get<std::string>("configKeyValues"));
53 WorkflowSpec specs;
54 specs.emplace_back(o2::mid::getCalibDataProcessorSpec(feeIdConfig, crateMasks));
55 specs.emplace_back(o2::mid::getChannelCalibratorSpec(feeIdConfig, crateMasks));
56
57 return specs;
58}
Device to convert the calibration data into a list of bad channel candidates.
Noise and dead channels calibrator spec for MID.
MID crate masks.
Hardware Id to FeeId mapper.
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
void customize(std::vector< ConfigParamSpec > &workflowOptions)
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getCalibDataProcessorSpec(const FEEIdConfig &feeIdConfig, const CrateMasks &crateMasks)
framework::DataProcessorSpec getChannelCalibratorSpec(const FEEIdConfig &feeIdConfig, const CrateMasks &crateMasks)