1414
1515#include " TPCWorkflow/TPCTimeSeriesSpec.h"
1616#include " TPCWorkflow/TPCTimeSeriesWriterSpec.h"
17+ #include " DetectorsCommonDataFormats/DetID.h"
1718#include " CommonUtils/ConfigurableParam.h"
1819#include " TPCReaderWorkflow/TPCSectorCompletionPolicy.h"
20+ #include " DetectorsBase/DPLWorkflowUtils.h"
21+ #include " GlobalTrackingWorkflowHelpers/InputHelper.h"
22+ #include " DetectorsRaw/HBFUtilsInitializer.h"
23+ #include " DataFormatsITSMFT/DPLAlpideParamInitializer.h"
1924#include " Framework/ConfigParamSpec.h"
2025#include " GPUDebugStreamer.h"
2126
2227using namespace o2 ::framework;
28+ using GID = o2::dataformats::GlobalTrackID;
29+ using DetID = o2::detectors::DetID;
30+
31+ // ------------------------------------------------------------------
32+ void customize (std::vector<o2::framework::CallbacksPolicy>& policies)
33+ {
34+ o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback (policies);
35+ }
2336
2437void customize (std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
2538{
2639 // option allowing to set parameters
2740 std::vector<ConfigParamSpec> options{
2841 ConfigParamSpec{" configKeyValues" , VariantType::String, " " , {" Semicolon separated key=value strings" }},
2942 {" disable-root-output" , VariantType::Bool, false , {" disable root-files output writers" }},
43+ {" disable-root-input" , VariantType::Bool, false , {" disable root-files input reader" }},
3044 {" enable-unbinned-root-output" , VariantType::Bool, false , {" writing out unbinned track data" }},
31- {" track-sources" , VariantType::String, std::string{o2::dataformats::GlobalTrackID ::ALL }, {" comma-separated list of sources to use" }},
45+ {" track-sources" , VariantType::String, std::string{GID ::ALL }, {" comma-separated list of sources to use" }},
3246 {" material-type" , VariantType::Int, 2 , {" Type for the material budget during track propagation: 0=None, 1=Geo, 2=LUT" }}};
33-
47+ o2::itsmft::DPLAlpideParamInitializer::addITSConfigOption (options);
48+ o2::raw::HBFUtilsInitializer::addConfigOption (options);
3449 std::swap (workflowOptions, options);
3550}
3651
@@ -42,11 +57,28 @@ WorkflowSpec defineDataProcessing(ConfigContext const& config)
4257 o2::conf::ConfigurableParam::updateFromString (config.options ().get <std::string>(" configKeyValues" ));
4358 const bool disableWriter = config.options ().get <bool >(" disable-root-output" );
4459 const bool enableUnbinnedWriter = config.options ().get <bool >(" enable-unbinned-root-output" );
45- auto src = o2::dataformats::GlobalTrackID::getSourcesMask (config.options ().get <std::string>(" track-sources" ));
60+ GID ::mask_t allowedSources = GID::getSourcesMask (" ITS,TPC,ITS-TPC,ITS-TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD-TOF,FT0" );
61+ auto srcTrc = allowedSources & GID::getSourcesMask (config.options ().get <std::string>(" track-sources" ));
62+ o2::dataformats::GlobalTrackID::mask_t srcCls = GID::getSourcesMask (" TPC" );
63+ if (GID::includesDet (DetID::ITS , srcTrc)) {
64+ srcCls |= GID::getSourcesMask (" ITS" );
65+ }
66+ if (GID::includesDet (DetID::TRD , srcTrc)) {
67+ srcCls |= GID::getSourcesMask (" TRD" );
68+ }
69+ if (GID::includesDet (DetID::TOF , srcTrc)) {
70+ srcCls |= GID::getSourcesMask (" TOF" );
71+ }
72+
4673 auto materialType = static_cast <o2::base::Propagator::MatCorrType>(config.options ().get <int >(" material-type" ));
47- workflow.emplace_back (o2::tpc::getTPCTimeSeriesSpec (disableWriter, materialType, enableUnbinnedWriter, src));
74+
75+ o2::globaltracking::InputHelper::addInputSpecs (config, workflow, srcCls, srcTrc, srcTrc, false );
76+ o2::globaltracking::InputHelper::addInputSpecsPVertex (config, workflow, false ); // P-vertex is always needed
77+
78+ workflow.emplace_back (o2::tpc::getTPCTimeSeriesSpec (disableWriter, materialType, enableUnbinnedWriter, srcTrc));
4879 if (!disableWriter) {
4980 workflow.emplace_back (o2::tpc::getTPCTimeSeriesWriterSpec ());
5081 }
82+ o2::raw::HBFUtilsInitializer hbfIni (config, workflow);
5183 return workflow;
5284}
0 commit comments