Project
Loading...
Searching...
No Matches
align-record-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
18
26
27using namespace o2::framework;
28using namespace std;
29
31
32void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
33{
35}
36
37void customize(std::vector<ConfigParamSpec>& workflowOptions)
38{
39 // option allowing to set parameters
40 std::vector<o2::framework::ConfigParamSpec> options{
41 {"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation"}},
42 {"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input reader"}},
43 {"disable-root-output", o2::framework::VariantType::Bool, false, {"do not write output root files"}},
44 {"disable-ccdb", VariantType::Bool, false, {"disable input files from CCDB"}},
45 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
47 std::swap(workflowOptions, options);
48}
49
52{
53 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
54 o2::conf::ConfigurableParam::writeINI("o2mchalignrecord-workflow_configuration.ini");
55
56 auto useMC = !configcontext.options().get<bool>("disable-mc");
57 bool disableCCDB = configcontext.options().get<bool>("disable-ccdb");
58 bool disableRootOutput = configcontext.options().get<bool>("disable-root-output");
59
60 WorkflowSpec specs;
61 specs.emplace_back(o2::mch::getAlignRecordSpec(useMC, disableCCDB));
62 auto srcTracks = GID::getSourcesMask("MCH");
63 auto srcClusters = GID::getSourcesMask("MCH");
64 auto matchMask = GID::getSourcesMask("MCH-MID");
65
66 if (!disableRootOutput) {
67 specs.emplace_back(o2::fwdalign::getMilleRecordWriterSpec(useMC));
68 }
69
70 o2::globaltracking::InputHelper::addInputSpecs(configcontext, specs, srcClusters, matchMask, srcTracks, useMC, srcClusters, srcTracks);
71
72 // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
73 o2::raw::HBFUtilsInitializer hbfIni(configcontext, specs);
74
75 return std::move(specs);
76}
Definition of the process for creating alignment record during reconstruction.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Implementation of a data processor to write MillePede record in a root file.
WorkflowSpec defineDataProcessing(const ConfigContext &configcontext)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
static void writeINI(std::string const &filename, std::string const &keyOnly="")
static void updateFromString(std::string const &)
static mask_t getSourcesMask(const std::string_view srcList)
ConfigParamRegistry & options() const
static int addInputSpecs(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, GID::mask_t maskClusters, GID::mask_t maskMatches, GID::mask_t maskTracks, bool useMC=true, GID::mask_t maskClustersMC=GID::getSourcesMask(GID::ALL), GID::mask_t maskTracksMC=GID::getSourcesMask(GID::ALL), bool subSpecStrict=false)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getMilleRecordWriterSpec(bool useMC, const char *specName="fwdalign-millerecord-writer", const char *fileName="millerecords.root")
o2::framework::DataProcessorSpec getAlignRecordSpec(bool useMC, bool disableCCDB=false)
Defining DataPointCompositeObject explicitly as copiable.
static void addNewTimeSliceCallback(std::vector< o2::framework::CallbacksPolicy > &policies)
static void addConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts, const std::string &defOpt=std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE))