You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add reader-driver workflow to allow TF throttling with readers
The workflows driven by the input from the root files produced by detectors
(e.g. by the o2-global-track-cluster-reader), can be preceded by the
o2-reader-driver-workflow workflow to have TFs throttling
via usual --timeframes-rate-limit <NTF> --timeframes-rate-limit-ipcid <ID>
options. The o2-reader-driver-workflow as well as all reader workflows
must be provided with the --hbfutils-config <tf_idinfo_file>,upstream
option, with <tf_idinfo_file> being the file produced by the
o2-tfidinfo-writer-workflow: usually o2_tfidinfo.root file.
If this file is in the working directory, then the --hbfutils-config
option can be shortened to upstream only.
The o2-reader-driver-workflow is not supported for o2simdigitizerworkflow_configuration.ini
version of --hbfutils-config, since it is used only for MC, where by construction there is
only 1 TF, hence the throttling is meaningless.
Option --max-tf <n> of the o2-reader-driver-workflow allows to inject only 1st <n> TFs
by the dowsntream readers.
One can account contributions of a limited set of track sources (currently by default: ITS, TPC, ITS-TPC, TPC-TOF, ITS-TPC-TOF) by providing optiont `--track-sources`.
30
30
31
+
## Using TF throttling when reading root files from detectors processing (tracks, clusters etc.)
31
32
33
+
The workflows driven by the input from the root files produced by detectors (e.g. by the `o2-global-track-cluster-reader`), can be preceded by the
34
+
`o2-reader-driver-workflow` which will allow to have TF throttling via usual `--timeframes-rate-limit <NTF>` and `--timeframes-rate-limit-ipcid <ID>`
35
+
options.
36
+
The `o2-reader-driver-workflow` as well as all reader workflows must be provided with the `--hbfutils-config <tf_idinfo_file>,upstream` option, with <tf_idinfo_file> being the file produced by the
37
+
`o2-tfidinfo-writer-workflow` (usually o2_tfidinfo.root file). If this file is in the working directory, then the `--hbfutils-config` option can be shortened to `upstream` only.
38
+
39
+
The `o2-reader-driver-workflow` is not supported for `o2simdigitizerworkflow_configuration.ini` version of the `--hbfutils-config`, since it is used only for MC,
40
+
where by construction there is only 1 TF, hence the throttling is meaningless.
41
+
42
+
Option `--max-tf <n>` of the `o2-reader-driver-workflow` allows to inject only 1st <n> TFs by the dowsntream readers.
43
+
44
+
A typical invocation of the throttled workflow is:
{"timeframes-shm-limit", VariantType::String, "0", {"Minimum amount of SHM required in order to publish data"}},
34
+
{"metric-feedback-channel-format", VariantType::String, "name=metric-feedback,type=pull,method=connect,address=ipc://{}metric-feedback-{},transport=shmem,rateLogging=0", {"format for the metric-feedback channel for TF rate limiting"}},
auto updateHBFUtils = [&configcontext]() -> std::string {
46
+
bool upstream = false; // timing info will be provided from upstream readers-driver, just subscribe to it
47
+
48
+
auto updateHBFUtils = [&configcontext, &upstream]() -> std::string {
45
49
staticbool done = false;
46
50
static std::string confTFInfo{};
47
51
if (!done) {
48
52
bool helpasked = configcontext.helpOnCommandLine(); // if help is asked, don't take for granted that the ini file is there, don't produce an error if it is not!
49
53
auto conf = configcontext.options().isSet(HBFConfOpt) ? configcontext.options().get<std::string>(HBFConfOpt) : "";
o2f::ConfigParamsHelper::addOptionIfMissing(opts, o2f::ConfigParamSpec{HBFConfOpt, o2f::VariantType::String, defOpt, {R"(ConfigurableParam ini file or "hbfutils" for HBFUtils, root file with per-TF info or "none")"}});
207
+
o2f::ConfigParamsHelper::addOptionIfMissing(opts, o2f::ConfigParamSpec{HBFConfOpt, o2f::VariantType::String, defOpt, {R"(ConfigurableParam ini file or "hbfutils" for HBFUtils, root file with per-TF info (augmented with ,upstream if reader-driver is used) or "none")"}});
0 commit comments