forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecpoints-reader-workflow.cxx
More file actions
57 lines (47 loc) · 2.11 KB
/
recpoints-reader-workflow.cxx
File metadata and controls
57 lines (47 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright 2019-2024 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file recpoints-reader-workflow.cxx
/// \brief FDD RecPoints reader workflow
///
/// \author Andreas Molander andreas.molander@cern.ch
#include "FDDWorkflow/RecPointReaderSpec.h"
#include "CommonUtils/ConfigurableParam.h"
#include "DetectorsRaw/HBFUtilsInitializer.h"
#include "Framework/CallbacksPolicy.h"
#include "Framework/ConfigParamSpec.h"
#include "Framework/Variant.h"
#include <vector>
using namespace o2::framework;
void customize(std::vector<CallbacksPolicy>& policies)
{
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies);
}
// we need to add workflow options before including Framework/runDataProcessing
void customize(std::vector<ConfigParamSpec>& workflowOptions)
{
std::vector<ConfigParamSpec> options{
{"disable-mc", VariantType::Bool, false, {"disable MC propagation even if available"}},
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
o2::raw::HBFUtilsInitializer::addConfigOption(options);
std::swap(workflowOptions, options);
}
#include "Framework/runDataProcessing.h"
WorkflowSpec defineDataProcessing(const ConfigContext& ctx)
{
o2::conf::ConfigurableParam::updateFromString(ctx.options().get<std::string>("configKeyValues"));
bool disableMC = ctx.options().get<bool>("disable-mc");
WorkflowSpec specs;
DataProcessorSpec producer = o2::fdd::getFDDRecPointReaderSpec(!disableMC);
specs.push_back(producer);
// configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
o2::raw::HBFUtilsInitializer hbfIni(ctx, specs);
return specs;
}