Project
Loading...
Searching...
No Matches
diststf-sender-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
17#include "Framework/Logger.h"
18#include <string>
19
20using namespace o2::framework;
21using namespace o2::raw;
22
23//_________________________________________________________
24void customize(std::vector<CallbacksPolicy>& policies)
25{
27}
28
29//_________________________________________________________
30void customize(std::vector<ConfigParamSpec>& workflowOptions)
31{
32 std::vector<ConfigParamSpec> options{
33 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
34 {"max-tf", o2::framework::VariantType::Int, 1, {"how many TFs to process"}},
35 {"dist-tf-subspec", o2::framework::VariantType::Int, 0xccdb, {"Subspec to use for FLP/DISTSUBTIMEFRAME"}}};
37 std::swap(workflowOptions, options);
38}
39
40#include "Framework/runDataProcessing.h" // the main driver
41
42//_________________________________________________________
44{
45 WorkflowSpec specs;
46 int maxTF = configcontext.options().get<int>("max-tf");
47 unsigned subSpec = static_cast<unsigned>(configcontext.options().get<int>("dist-tf-subspec"));
48 specs.push_back(o2::raw::getDistSTFSenderSpec(maxTF > 0 ? maxTF : 1, subSpec));
49 // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
50 o2::raw::HBFUtilsInitializer hbfIni(configcontext, specs);
51 return specs;
52}
sends DISTSUBTIMEFRAME messages
ConfigParamRegistry & options() const
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< CallbacksPolicy > &policies)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getDistSTFSenderSpec(int maxTF, unsigned subsp)
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))