Project
Loading...
Searching...
No Matches
HBFUtilsInitializer.h
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
12// @brief Aux.class initialize HBFUtils
13// @author ruben.shahoyan@cern.ch
14
15#ifndef _O2_HBFUTILS_INITIALIZER_
16#define _O2_HBFUTILS_INITIALIZER_
17
18#include <vector>
19#include <string>
23
24namespace o2
25{
26
27namespace header
28{
29class DataHeader;
30}
31namespace framework
32{
33class ConfigContext;
36class DeviceSpec;
37class ConfigParamSpec;
38class CallbacksPolicy;
39using WorkflowSpec = std::vector<DataProcessorSpec>;
40} // namespace framework
41
42namespace raw
43{
44
51 static constexpr char DelayOpt[] = "reader-delay";
52 static constexpr char HBFConfOpt[] = "hbfutils-config";
53 static constexpr char HBFTFInfoOpt[] = "tf-info-source";
54 static constexpr char HBFIRFrameOpt[] = "irframes-info-source";
55 static constexpr char IgnoreIRFramesOpt[] = "ignore-irframes";
56 static constexpr char HBFUSrc[] = "hbfutils";
57 static constexpr char ReaderDriverDevice[] = "reader-driver";
58 static constexpr char UpstreamOpt[] = "upstream";
59
60 static int NTFs;
61 static long LastIRFrameIndex; // index of the last used entry in the optional IRFrame vector
62 static bool LastIRFrameSplit; // flag that the last IRFrame was split between two TFs
63 static std::vector<o2::dataformats::IRFrame> IRFrames;
64 static o2::dataformats::IRFrame IRFrameSel; // IRFrame selected for the current TF
65
67 static HBFOpt getOptType(const std::string& optString, bool throwOnFailure = true);
68 static std::vector<o2::dataformats::TFIDInfo> readTFIDInfoVector(const std::string& fname);
69 static void readIRFramesVector(const std::string& fname);
70 static void assignDataHeaderFromTFIDInfo(const std::vector<o2::dataformats::TFIDInfo>& tfinfoVec, o2::header::DataHeader& dh, o2::framework::DataProcessingHeader& dph);
73 static void addNewTimeSliceCallback(std::vector<o2::framework::CallbacksPolicy>& policies);
74 static void addConfigOption(std::vector<o2::framework::ConfigParamSpec>& opts, const std::string& defOpt = std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE));
75};
76
77} // namespace raw
78} // namespace o2
79
80#endif
Class to delimit start and end IR of certain time period.
Definition of the Names Generator class.
static constexpr std::string_view DIGITIZATIONCONFIGFILE
Definition NameConf.h:89
std::vector< DataProcessorSpec > WorkflowSpec
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
the main header struct
Definition DataHeader.h:618
static std::vector< o2::dataformats::IRFrame > IRFrames
static void assignDataHeaderFromHBFUtilWithIRFrames(o2::header::DataHeader &dh, o2::framework::DataProcessingHeader &dph)
static constexpr char HBFConfOpt[]
static void readIRFramesVector(const std::string &fname)
static constexpr char HBFUSrc[]
static constexpr char DelayOpt[]
static constexpr char UpstreamOpt[]
static void assignDataHeaderFromTFIDInfo(const std::vector< o2::dataformats::TFIDInfo > &tfinfoVec, o2::header::DataHeader &dh, o2::framework::DataProcessingHeader &dph)
static HBFOpt getOptType(const std::string &optString, bool throwOnFailure=true)
static constexpr char ReaderDriverDevice[]
static constexpr char HBFIRFrameOpt[]
static constexpr char IgnoreIRFramesOpt[]
static void addNewTimeSliceCallback(std::vector< o2::framework::CallbacksPolicy > &policies)
static std::vector< o2::dataformats::TFIDInfo > readTFIDInfoVector(const std::string &fname)
static void assignDataHeaderFromHBFUtils(o2::header::DataHeader &dh, o2::framework::DataProcessingHeader &dph)
static void addConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts, const std::string &defOpt=std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE))
static o2::dataformats::IRFrame IRFrameSel
static constexpr char HBFTFInfoOpt[]