Project
Loading...
Searching...
No Matches
compare-tracks-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
13#include "CompareTask.h"
22#include "Framework/Logger.h"
23#include "Framework/Task.h"
24#include "Framework/Variant.h"
26#include <string>
27
28using namespace o2::framework;
29using namespace o2::mch;
30
31void customize(std::vector<ConfigParamSpec>& workflowOptions)
32{
33 std::vector<ConfigParamSpec> options{
34 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
35 std::swap(workflowOptions, options);
36}
37
39
41{
42 WorkflowSpec specs;
43
44 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
45
46 Inputs inputs{};
47 inputs.emplace_back("rofs1", "MCH", "TRACKROFS", 0, Lifetime::Timeframe);
48 inputs.emplace_back("tracks1", "MCH", "TRACKS", 0, Lifetime::Timeframe);
49 inputs.emplace_back("clusters1", "MCH", "TRACKCLUSTERS", 0, Lifetime::Timeframe);
50 inputs.emplace_back("rofs2", "MCH", "TRACKROFS", 1, Lifetime::Timeframe);
51 inputs.emplace_back("tracks2", "MCH", "TRACKS", 1, Lifetime::Timeframe);
52 inputs.emplace_back("clusters2", "MCH", "TRACKCLUSTERS", 1, Lifetime::Timeframe);
53
54 auto ccdbRequest = std::make_shared<o2::base::GRPGeomRequest>(false, // orbitResetTime
55 false, // GRPECS=true
56 false, // GRPLHCIF
57 true, // GRPMagField
58 false, // askMatLUT
60 inputs);
61 specs.emplace_back(DataProcessorSpec{
62 "mch-compare-tracks",
63 inputs,
64 Outputs{},
65 AlgorithmSpec{adaptFromTask<eval::CompareTask>(ccdbRequest)},
66 Options{
67 {"precision", VariantType::Double, 1.e-4, {"precision used for comparisons"}},
68 {"apply-track-selection", VariantType::Bool, false, {"apply standard track selection cuts"}},
69 {"print-diff", VariantType::Bool, false, {"print differences"}},
70 {"print-all", VariantType::Bool, false, {"print all differences"}},
71 {"outfile", VariantType::String, "compare.root", {"output Root filename"}},
72 {"pdf-outfile", VariantType::String, "", {"output PDF filename (leave empty for no PDF output)"}}}});
73
74 return specs;
75}
Definition of the MCH cluster minimal structure.
Helper for geometry and GRP related CCDB requests.
Definition of the MCH ROFrame record.
Definition of the MCH track.
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< ConfigParamSpec > &workflowOptions)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< InputSpec > Inputs
std::vector< OutputSpec > Outputs