Project
Loading...
Searching...
No Matches
mask-maker-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 workflowOptions.insert(workflowOptions.end(), options.begin(), options.end());
30}
31
35
37{
38 auto feeIdConfigFilename = cfgc.options().get<std::string>("feeId-config-file");
39 o2::mid::FEEIdConfig feeIdConfig;
40 if (!feeIdConfigFilename.empty()) {
41 feeIdConfig = o2::mid::FEEIdConfig(feeIdConfigFilename.c_str());
42 }
43 auto crateMasksFilename = cfgc.options().get<std::string>("crate-masks-file");
44 o2::mid::CrateMasks crateMasks;
45 if (!crateMasksFilename.empty()) {
46 crateMasks = o2::mid::CrateMasks(crateMasksFilename.c_str());
47 }
48 WorkflowSpec specs;
49 specs.emplace_back(o2::mid::getMaskMakerSpec(feeIdConfig, crateMasks));
50 specs.emplace_back(o2::mid::getMaskHandlerSpec());
51
52 return specs;
53}
Processor to handle the masks.
Processor to compute the masks.
ConfigParamRegistry & options() const
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
void customize(std::vector< ConfigParamSpec > &workflowOptions)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getMaskMakerSpec(const FEEIdConfig &feeIdConfig, const CrateMasks &crateMasks)
framework::DataProcessorSpec getMaskHandlerSpec()