Project
Loading...
Searching...
No Matches
alignment-workflow.cxx
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
16
17
#include "
MCHAlign/AlignmentSpec.h
"
18
19
#include "
CCDB/BasicCCDBManager.h
"
20
#include "
CCDB/CCDBTimeStampUtils.h
"
21
#include "
CommonUtils/ConfigurableParam.h
"
22
#include "
DetectorsRaw/HBFUtils.h
"
23
#include "
Headers/STFHeader.h
"
24
#include "
Framework/CallbackService.h
"
25
#include "
Framework/ConcreteDataMatcher.h
"
26
#include "
Framework/ConfigParamRegistry.h
"
27
#include "
Framework/ControlService.h
"
28
#include "
Framework/DataProcessorSpec.h
"
29
#include "
Framework/Lifetime.h
"
30
#include "
Framework/Output.h
"
31
#include "
Framework/Task.h
"
32
#include "
Framework/Logger.h
"
33
34
using namespace
o2::framework
;
35
using namespace
std
;
36
37
namespace
o2::mch
38
{
39
40
class
SeederTask
:
public
Task
41
{
42
public
:
43
void
run
(
ProcessingContext
& pc)
final
44
{
45
const
auto
& hbfu =
o2::raw::HBFUtils::Instance
();
46
auto
& tinfo = pc.services().get<
o2::framework::TimingInfo
>();
47
if
(hbfu.startTime != 0) {
48
tinfo.
creation
= hbfu.startTime;
49
}
else
{
50
tinfo.creation = std::chrono::time_point_cast<std::chrono::milliseconds>(std::chrono::system_clock::now()).time_since_epoch().count();
51
}
52
if
(hbfu.orbitFirstSampled != 0) {
53
tinfo.firstTForbit = hbfu.orbitFirstSampled;
54
}
else
{
55
tinfo.firstTForbit = 0;
56
}
57
auto
& stfDist = pc.outputs().make<
o2::header::STFHeader
>(
Output
{
"FLP"
,
"DISTSUBTIMEFRAME"
, 0});
58
pc.services().get<
ControlService
>().
endOfStream
();
59
pc.services().get<
ControlService
>().readyToQuit(QuitRequest::Me);
60
}
61
};
62
63
}
// namespace o2::mch
64
65
o2::framework::DataProcessorSpec
getSeederSpec
()
66
{
67
return
DataProcessorSpec
{
68
"seeder"
,
69
Inputs
{},
70
Outputs
{{
"FLP"
,
"DISTSUBTIMEFRAME"
, 0}},
71
AlgorithmSpec
{o2::framework::adaptFromTask<o2::mch::SeederTask>()},
72
Options
{}};
73
}
74
75
// we need to add workflow options before including Framework/runDataProcessing
76
void
customize
(vector<ConfigParamSpec>& workflowOptions)
77
{
78
workflowOptions.emplace_back(
"configKeyValues"
, VariantType::String,
""
,
79
ConfigParamSpec::HelpString
{
"Semicolon separated key=value strings"
});
80
workflowOptions.emplace_back(
"disable-input-from-ccdb"
, VariantType::Bool,
false
,
81
ConfigParamSpec::HelpString
{
"Do not read magnetic field and geometry from CCDB"
});
82
}
83
84
#include "
Framework/runDataProcessing.h
"
85
WorkflowSpec
defineDataProcessing
(
const
ConfigContext
& configcontext)
86
{
87
o2::conf::ConfigurableParam::updateFromString
(configcontext.
options
().
get
<std::string>(
"configKeyValues"
));
88
bool
disableCCDB = configcontext.
options
().
get
<
bool
>(
"disable-input-from-ccdb"
);
89
return
WorkflowSpec
{
o2::mch::getAlignmentSpec
(disableCCDB),
getSeederSpec
()};
90
}
AlignmentSpec.h
Definition of alignment process for muon spectrometer.
BasicCCDBManager.h
CCDBTimeStampUtils.h
CallbackService.h
ConcreteDataMatcher.h
ConfigParamRegistry.h
ConfigurableParam.h
ControlService.h
DataProcessorSpec.h
HBFUtils.h
Lifetime.h
Logger.h
Output.h
STFHeader.h
Task.h
customize
void customize(vector< ConfigParamSpec > &workflowOptions)
Definition
alignment-workflow.cxx:76
defineDataProcessing
WorkflowSpec defineDataProcessing(const ConfigContext &configcontext)
Definition
alignment-workflow.cxx:85
getSeederSpec
o2::framework::DataProcessorSpec getSeederSpec()
Definition
alignment-workflow.cxx:65
o2::conf::ConfigurableParamHelper< HBFUtils >::Instance
static const HBFUtils & Instance()
Definition
ConfigurableParamHelper.h:81
o2::conf::ConfigurableParam::updateFromString
static void updateFromString(std::string const &)
Definition
ConfigurableParam.cxx:433
o2::framework::ConfigContext
Definition
ConfigContext.h:24
o2::framework::ConfigContext::options
ConfigParamRegistry & options() const
Definition
ConfigContext.h:28
o2::framework::ConfigParamRegistry::get
T get(const char *key) const
Definition
ConfigParamRegistry.h:98
o2::framework::ControlService
Definition
ControlService.h:40
o2::framework::ProcessingContext
Definition
ProcessingContext.h:27
o2::framework::Task
Definition
Task.h:32
o2::framework::Task::endOfStream
virtual void endOfStream(EndOfStreamContext &context)
This is invoked whenever we have an EndOfStream event.
Definition
Task.h:43
o2::mch::SeederTask
Definition
alignment-workflow.cxx:41
o2::mch::SeederTask::run
void run(ProcessingContext &pc) final
Definition
alignment-workflow.cxx:43
o2::framework
Defining PrimaryVertex explicitly as messageable.
Definition
TFIDInfo.h:20
o2::framework::WorkflowSpec
std::vector< DataProcessorSpec > WorkflowSpec
Definition
HBFUtilsInitializer.h:39
o2::framework::Inputs
std::vector< InputSpec > Inputs
Definition
DataProcessorSpec.h:29
o2::framework::Outputs
std::vector< OutputSpec > Outputs
Definition
DataProcessorSpec.h:30
o2::mch
Definition
SimTraits.h:155
o2::mch::getAlignmentSpec
o2::framework::DataProcessorSpec getAlignmentSpec(bool disableCCDB=false)
Definition
AlignmentSpec.cxx:899
std
Defining DataPointCompositeObject explicitly as copiable.
Definition
CcdbObjectInfo.h:121
runDataProcessing.h
Options
Definition
TreeMergerTool.cxx:26
o2::framework::AlgorithmSpec
Definition
AlgorithmSpec.h:43
o2::framework::ConfigParamSpec::HelpString
Definition
ConfigParamSpec.h:34
o2::framework::DataProcessorSpec
Definition
DataProcessorSpec.h:41
o2::framework::Output
Definition
Output.h:27
o2::framework::TimingInfo
Definition
TimingInfo.h:24
o2::framework::TimingInfo::creation
uint64_t creation
Definition
TimingInfo.h:34
o2::header::STFHeader
Definition
STFHeader.h:21
Detectors
MUON
MCH
Align
src
alignment-workflow.cxx
Generated on Tue Feb 25 2025 23:16:21 for Project by
1.9.8