Skip to content

Commit 917f3c7

Browse files
shahor02noferini
authored andcommitted
Fix missing HBFUtilsInitialize plugins in various reader workflows
1 parent 6d6876e commit 917f3c7

File tree

6 files changed

+55
-5
lines changed

6 files changed

+55
-5
lines changed

Detectors/FIT/FT0/workflow/src/recpoints-reader-workflow.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,20 @@
1616

1717
#include "Framework/CallbackService.h"
1818
#include "Framework/ControlService.h"
19+
#include "Framework/CallbacksPolicy.h"
1920
#include "Framework/ConfigParamRegistry.h"
2021
#include "Framework/Task.h"
2122
#include "FT0Workflow/RecPointReaderSpec.h"
2223
#include "CommonUtils/ConfigurableParam.h"
24+
#include "DetectorsRaw/HBFUtilsInitializer.h"
2325

2426
using namespace o2::framework;
2527

28+
void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
29+
{
30+
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies);
31+
}
32+
2633
// we need to add workflow options before including Framework/runDataProcessing
2734
void customize(std::vector<ConfigParamSpec>& workflowOptions)
2835
{
@@ -32,6 +39,7 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
3239
{"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation even if available"}}};
3340
std::string keyvaluehelp("Semicolon separated key=value strings");
3441
options.push_back(ConfigParamSpec{"configKeyValues", VariantType::String, "", {keyvaluehelp}});
42+
o2::raw::HBFUtilsInitializer::addConfigOption(options);
3543
std::swap(workflowOptions, options);
3644
}
3745

@@ -43,5 +51,7 @@ WorkflowSpec defineDataProcessing(const ConfigContext& ctx)
4351
o2::conf::ConfigurableParam::updateFromString(ctx.options().get<std::string>("configKeyValues"));
4452
DataProcessorSpec producer = o2::ft0::getRecPointReaderSpec(ctx.options().get<bool>("disable-mc"));
4553
specs.push_back(producer);
54+
// configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
55+
o2::raw::HBFUtilsInitializer hbfIni(ctx, specs);
4656
return specs;
4757
}

Detectors/ITSMFT/common/workflow/src/digit-reader-workflow.cxx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@
1212
#include "ITSMFTWorkflow/DigitReaderSpec.h"
1313
#include "CommonUtils/ConfigurableParam.h"
1414
#include "Framework/ConfigParamSpec.h"
15+
#include "Framework/CallbacksPolicy.h"
16+
#include "DetectorsRaw/HBFUtilsInitializer.h"
1517

1618
using namespace o2::framework;
1719

1820
// ------------------------------------------------------------------
1921

22+
void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
23+
{
24+
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies);
25+
}
26+
2027
// we need to add workflow options before including Framework/runDataProcessing
2128
void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
2229
{
@@ -27,7 +34,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
2734
ConfigParamSpec{"runmft", VariantType::Bool, false, {"expect MFT data"}},
2835
ConfigParamSpec{"suppress-triggers-output", VariantType::Bool, false, {"suppress dummy triggers output"}},
2936
ConfigParamSpec{"configKeyValues", VariantType::String, "", {"semicolon separated key=value strings"}}};
30-
37+
o2::raw::HBFUtilsInitializer::addConfigOption(options);
3138
std::swap(workflowOptions, options);
3239
}
3340

@@ -49,5 +56,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
4956
} else {
5057
wf.emplace_back(o2::itsmft::getITSDigitReaderSpec(useMC, calib, withTriggers));
5158
}
59+
o2::raw::HBFUtilsInitializer hbfIni(cfgc, wf);
5260
return wf;
5361
}

Detectors/MUON/MID/Workflow/src/tracks-reader-workflow.cxx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,34 @@
1515

1616
#include <vector>
1717
#include "Framework/ConfigParamSpec.h"
18+
#include "Framework/CallbacksPolicy.h"
1819
#include "MIDWorkflow/TrackReaderSpec.h"
1920
#include "CommonUtils/ConfigurableParam.h"
21+
#include "DetectorsRaw/HBFUtilsInitializer.h"
2022

2123
using namespace o2::framework;
2224

25+
void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
26+
{
27+
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies);
28+
}
29+
2330
// we need to add workflow options before including Framework/runDataProcessing
2431
void customize(std::vector<ConfigParamSpec>& workflowOptions)
2532
{
26-
workflowOptions.emplace_back("disable-mc", VariantType::Bool, false, ConfigParamSpec::HelpString{"Disable MC info"});
27-
workflowOptions.emplace_back("configKeyValues", VariantType::String, "", ConfigParamSpec::HelpString{"Semicolon separated key=value strings ..."});
33+
std::vector<ConfigParamSpec> options{{"disable-mc", VariantType::Bool, false, ConfigParamSpec::HelpString{"Disable MC info"}},
34+
{"configKeyValues", VariantType::String, "", ConfigParamSpec::HelpString{"Semicolon separated key=value strings ..."}}};
35+
o2::raw::HBFUtilsInitializer::addConfigOption(options);
36+
std::swap(workflowOptions, options);
2837
}
2938

3039
#include "Framework/runDataProcessing.h"
3140

3241
WorkflowSpec defineDataProcessing(const ConfigContext& config)
3342
{
3443
bool useMC = !config.options().get<bool>("disable-mc");
35-
return WorkflowSpec{o2::mid::getTrackReaderSpec(useMC)};
44+
WorkflowSpec specs{o2::mid::getTrackReaderSpec(useMC)};
45+
// configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
46+
o2::raw::HBFUtilsInitializer hbfIni(config, specs);
47+
return specs;
3648
}

Detectors/TRD/workflow/io/src/digit-reader-workflow.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ using namespace o2::framework;
1818

1919
// ------------------------------------------------------------------
2020

21+
void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
22+
{
23+
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies);
24+
}
25+
2126
// we need to add workflow options before including Framework/runDataProcessing
2227
void customize(std::vector<ConfigParamSpec>& workflowOptions)
2328
{
@@ -45,5 +50,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
4550
auto dataSubspec = configcontext.options().get<int>("digit-subspec");
4651
WorkflowSpec specs;
4752
specs.emplace_back(o2::trd::getTRDDigitReaderSpec(useMC, sendTriggerRecords, dataSubspec));
53+
o2::raw::HBFUtilsInitializer hbfIni(configcontext, specs);
4854
return specs;
4955
}

Detectors/TRD/workflow/io/src/trd-track-reader-workflow.cxx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@
1414
#include "Framework/ConfigParamSpec.h"
1515
#include "TRDWorkflowIO/TRDTrackReaderSpec.h"
1616
#include "ReconstructionDataFormats/GlobalTrackID.h"
17+
#include "DetectorsRaw/HBFUtilsInitializer.h"
1718

1819
using namespace o2::framework;
1920
using GTrackID = o2::dataformats::GlobalTrackID;
2021

2122
// ------------------------------------------------------------------
2223

24+
void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
25+
{
26+
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies);
27+
}
28+
2329
// we need to add workflow options before including Framework/runDataProcessing
2430
void customize(std::vector<ConfigParamSpec>& workflowOptions)
2531
{
@@ -29,7 +35,7 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
2935
{"track-types", VariantType::String, std::string{GTrackID::ALL}, {"comma-separated list of sources to use for tracking"}},
3036
{"output-strict", o2::framework::VariantType::Bool, false, {"outputs specs should correspond to strict matching mode"}},
3137
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
32-
38+
o2::raw::HBFUtilsInitializer::addConfigOption(options);
3339
std::swap(workflowOptions, options);
3440
}
3541

@@ -58,5 +64,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
5864
if (GTrackID::includesSource(GTrackID::Source::TPCTRD, srcTRD)) {
5965
specs.emplace_back(o2::trd::getTRDTPCTrackReaderSpec(useMC, configcontext.options().get<bool>("output-strict")));
6066
}
67+
o2::raw::HBFUtilsInitializer hbfIni(configcontext, specs);
6168
return specs;
6269
}

Detectors/ZDC/workflow/src/digits-reader-workflow.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "Framework/CallbackService.h"
1818
#include "Framework/ControlService.h"
19+
#include "Framework/CallbacksPolicy.h"
1920
#include "Framework/ConfigParamRegistry.h"
2021
#include "Framework/Task.h"
2122
#include "ZDCWorkflow/DigitReaderSpec.h"
@@ -24,6 +25,11 @@
2425

2526
using namespace o2::framework;
2627

28+
void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
29+
{
30+
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies);
31+
}
32+
2733
// we need to add workflow options before including Framework/runDataProcessing
2834
void customize(std::vector<ConfigParamSpec>& workflowOptions)
2935
{
@@ -34,6 +40,7 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
3440

3541
std::string keyvaluehelp("Semicolon separated key=value strings");
3642
options.push_back(ConfigParamSpec{"configKeyValues", VariantType::String, "", {keyvaluehelp}});
43+
o2::raw::HBFUtilsInitializer::addConfigOption(options);
3744
std::swap(workflowOptions, options);
3845
}
3946

0 commit comments

Comments
 (0)