Project
Loading...
Searching...
No Matches
cpv-calib-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 "
Framework/DataProcessorSpec.h
"
13
#include "
PedestalCalibratorSpec.h
"
14
#include "
NoiseCalibratorSpec.h
"
15
#include "
GainCalibratorSpec.h
"
16
17
using namespace
o2::framework
;
18
19
// we need to add workflow options before including Framework/runDataProcessing
20
void
customize
(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
21
{
22
// option allowing to set parameters
23
workflowOptions.push_back(
ConfigParamSpec
{
"pedestals"
,
o2::framework::VariantType::Bool
,
false
, {
"do pedestal calibration"
}});
24
workflowOptions.push_back(
ConfigParamSpec
{
"noise"
,
o2::framework::VariantType::Bool
,
false
, {
"do noise scan calibration"
}});
25
workflowOptions.push_back(
ConfigParamSpec
{
"gains"
,
o2::framework::VariantType::Bool
,
false
, {
"do gain calibration"
}});
26
// workflowOptions.push_back(ConfigParamSpec{"badmap", o2::framework::VariantType::Bool, false, {"do bad map calibration"}});
27
workflowOptions.push_back(
ConfigParamSpec
{
"configKeyValues"
, VariantType::String,
""
, {
"Semicolon separated key=value strings"
}});
28
}
29
30
// ------------------------------------------------------------------
31
32
#include "
Framework/runDataProcessing.h
"
33
34
WorkflowSpec
defineDataProcessing
(
ConfigContext
const
& configcontext)
35
{
36
WorkflowSpec
specs;
37
o2::conf::ConfigurableParam::updateFromString
(configcontext.
options
().
get
<std::string>(
"configKeyValues"
));
38
auto
doPedestals = configcontext.
options
().
get
<
bool
>(
"pedestals"
);
39
auto
doNoise = configcontext.
options
().
get
<
bool
>(
"noise"
);
40
auto
doGain = configcontext.
options
().
get
<
bool
>(
"gains"
);
41
// auto doBadMap = configcontext.options().get<bool>("badmap");
42
int
nProcessors = (
int
)doPedestals + (
int
)doNoise + (
int
)doGain;
43
if
(nProcessors > 1) {
44
LOG
(error) <<
"Can not run several calibrations simulteneously in one executable"
;
45
return
specs;
46
}
47
if
(doGain) {
48
specs.emplace_back(getCPVGainCalibratorSpec());
49
}
50
// if (doBadMap) {
51
// specs.emplace_back(getCPVBadMapCalibratorSpec());
52
// }
53
if
(doPedestals) {
54
specs.emplace_back(getCPVPedestalCalibratorSpec());
55
}
56
if
(doNoise) {
57
specs.emplace_back(getCPVNoiseCalibratorSpec());
58
}
59
return
specs;
60
}
DataProcessorSpec.h
GainCalibratorSpec.h
NoiseCalibratorSpec.h
PedestalCalibratorSpec.h
int
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
Defining PrimaryVertex explicitly as messageable.
Definition
TFIDInfo.h:20
o2::framework::VariantType::Bool
@ Bool
o2::framework::WorkflowSpec
std::vector< DataProcessorSpec > WorkflowSpec
Definition
HBFUtilsInitializer.h:39
runDataProcessing.h
o2::framework::ConfigParamSpec
Definition
ConfigParamSpec.h:31
customize
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
Definition
cpv-calib-workflow.cxx:20
defineDataProcessing
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
Definition
cpv-calib-workflow.cxx:34
LOG
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
Detectors
CPV
calib
testWorkflow
cpv-calib-workflow.cxx
Generated on Tue Feb 25 2025 23:16:13 for Project by
1.9.8