Project
Loading...
Searching...
No Matches
digit-reader-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
12
#include <string>
13
#include <vector>
14
#include "
Framework/Variant.h
"
15
#include "
Framework/ConfigParamSpec.h
"
16
#include "
Framework/CallbacksPolicy.h
"
17
#include "
DataFormatsEMCAL/Digit.h
"
18
#include "
DetectorsRaw/HBFUtilsInitializer.h
"
19
#include "
EMCALWorkflow/PublisherSpec.h
"
20
#include "
CommonUtils/ConfigurableParam.h
"
21
#include "
DetectorsRaw/HBFUtils.h
"
22
23
using namespace
o2::framework
;
24
using namespace
o2::emcal
;
25
26
// ------------------------------------------------------------------
27
void
customize
(std::vector<o2::framework::CallbacksPolicy>& policies)
28
{
29
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback
(policies);
30
}
31
32
// we need to add workflow options before including Framework/runDataProcessing
33
void
customize
(std::vector<ConfigParamSpec>& workflowOptions)
34
{
35
std::vector<ConfigParamSpec> options{{
"disable-mc"
, VariantType::Bool,
false
, {
"Do not propagate MC labels"
}},
36
{
"configKeyValues"
, VariantType::String,
""
, {
"Semicolon separated key=value strings"
}}};
37
o2::raw::HBFUtilsInitializer::addConfigOption
(options);
38
workflowOptions.insert(workflowOptions.end(), options.begin(), options.end());
39
}
40
41
#include "
Framework/runDataProcessing.h
"
42
43
WorkflowSpec
defineDataProcessing
(
ConfigContext
const
& cfgc)
44
{
45
bool
disableMC = cfgc.
options
().
get
<
bool
>(
"disable-mc"
);
46
o2::conf::ConfigurableParam::updateFromString
(cfgc.
options
().
get
<std::string>(
"configKeyValues"
));
47
48
WorkflowSpec
specs;
49
specs.emplace_back(
o2::emcal::getPublisherSpec
<std::vector<o2::emcal::Digit>>(
PublisherConf
{
50
"emcal-digit-reader"
,
51
"o2sim"
,
52
"emcdigits.root"
,
53
{
"digitbranch"
,
"EMCALDigit"
,
"Digit branch"
},
54
{
"digittriggerbranch"
,
"EMCALDigitTRGR"
,
"Trigger record branch"
},
55
{
"mcbranch"
,
"EMCALDigitMCTruth"
,
"MC label branch"
},
56
o2::framework::OutputSpec
{
"EMC"
,
"DIGITS"
},
57
o2::framework::OutputSpec
{
"EMC"
,
"DIGITSTRGR"
},
58
o2::framework::OutputSpec
{
"EMC"
,
"DIGITSMCTR"
}},
59
!disableMC));
60
61
// configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
62
o2::raw::HBFUtilsInitializer
hbfIni(cfgc, specs);
63
64
return
specs;
65
}
CallbacksPolicy.h
ConfigParamSpec.h
ConfigurableParam.h
Digit.h
PublisherSpec.h
defineDataProcessing
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
Definition
digit-reader-workflow.cxx:43
customize
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
Definition
digit-reader-workflow.cxx:27
HBFUtilsInitializer.h
HBFUtils.h
Variant.h
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::emcal
Definition
SimTraits.h:131
o2::emcal::getPublisherSpec
framework::DataProcessorSpec getPublisherSpec(PublisherConf const &config, uint32_t subspec=0, bool propagateMC=true)
Definition
PublisherSpec.h:52
o2::framework
Defining PrimaryVertex explicitly as messageable.
Definition
TFIDInfo.h:20
o2::framework::WorkflowSpec
std::vector< DataProcessorSpec > WorkflowSpec
Definition
HBFUtilsInitializer.h:39
runDataProcessing.h
o2::emcal::PublisherConf
Definition
PublisherSpec.h:33
o2::framework::OutputSpec
Definition
OutputSpec.h:33
o2::raw::HBFUtilsInitializer
Definition
HBFUtilsInitializer.h:45
o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback
static void addNewTimeSliceCallback(std::vector< o2::framework::CallbacksPolicy > &policies)
Definition
HBFUtilsInitializer.cxx:267
o2::raw::HBFUtilsInitializer::addConfigOption
static void addConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts, const std::string &defOpt=std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE))
Definition
HBFUtilsInitializer.cxx:323
Detectors
EMCAL
workflow
src
digit-reader-workflow.cxx
Generated on Tue Feb 25 2025 23:16:35 for Project by
1.9.8