From 3b1f18b50821e86b1ef419b2d4ba208055d89652 Mon Sep 17 00:00:00 2001 From: Markus Fasel Date: Mon, 18 Oct 2021 17:33:01 +0200 Subject: [PATCH] [EMCAL-507] Setting default files for objects handled by ROOTTreeReader --- Detectors/EMCAL/workflow/include/EMCALWorkflow/PublisherSpec.h | 2 ++ Detectors/EMCAL/workflow/src/PublisherSpec.cxx | 2 +- Detectors/EMCAL/workflow/src/RecoWorkflow.cxx | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Detectors/EMCAL/workflow/include/EMCALWorkflow/PublisherSpec.h b/Detectors/EMCAL/workflow/include/EMCALWorkflow/PublisherSpec.h index a354563137614..74f0d7c1663ed 100644 --- a/Detectors/EMCAL/workflow/include/EMCALWorkflow/PublisherSpec.h +++ b/Detectors/EMCAL/workflow/include/EMCALWorkflow/PublisherSpec.h @@ -36,6 +36,7 @@ struct PublisherConf { std::string processName; std::string defaultTreeName; + std::string defaultFileName; BranchOptionConfig databranch; BranchOptionConfig triggerrecordbranch; BranchOptionConfig mcbranch; @@ -84,6 +85,7 @@ inline framework::DataProcessorSpec getCellReaderSpec(bool propagateMC) using cellInputType = std::vector; return getPublisherSpec(PublisherConf{"emcal-cell-reader", "o2sim", + "emccells.root", {"cellbranch", "EMCALCell", "Cell branch"}, {"celltriggerbranch", "EMCALCellTRGR", "Trigger record branch"}, {"mcbranch", "EMCALCellMCTruth", "MC label branch"}, diff --git a/Detectors/EMCAL/workflow/src/PublisherSpec.cxx b/Detectors/EMCAL/workflow/src/PublisherSpec.cxx index 94c84c318d129..0792c5b066ac5 100644 --- a/Detectors/EMCAL/workflow/src/PublisherSpec.cxx +++ b/Detectors/EMCAL/workflow/src/PublisherSpec.cxx @@ -108,7 +108,7 @@ o2::framework::DataProcessorSpec createPublisherSpec(PublisherConf const& config {createOutputSpecs()}, o2::framework::AlgorithmSpec(initFunction), o2::framework::Options{ - {"infile", o2::framework::VariantType::String, "", {"Name of the input file"}}, + {"infile", o2::framework::VariantType::String, config.defaultFileName, {"Name of the input file"}}, {"input-dir", o2::framework::VariantType::String, "none", {"Input directory"}}, {"treename", o2::framework::VariantType::String, config.defaultTreeName.c_str(), {"Name of input tree"}}, {dtb.option.c_str(), o2::framework::VariantType::String, dtb.defval.c_str(), {dtb.help.c_str()}}, diff --git a/Detectors/EMCAL/workflow/src/RecoWorkflow.cxx b/Detectors/EMCAL/workflow/src/RecoWorkflow.cxx index 528be3775953f..3186f927b583c 100644 --- a/Detectors/EMCAL/workflow/src/RecoWorkflow.cxx +++ b/Detectors/EMCAL/workflow/src/RecoWorkflow.cxx @@ -125,6 +125,7 @@ o2::framework::WorkflowSpec getWorkflow(bool propagateMC, specs.emplace_back(o2::emcal::getPublisherSpec(PublisherConf{ "emcal-digit-reader", "o2sim", + "emcdigits.root", {"digitbranch", "EMCALDigit", "Digit branch"}, {"digittriggerbranch", "EMCALDigitTRGR", "Trigger record branch"}, {"mcbranch", "EMCALDigitMCTruth", "MC label branch"}, @@ -147,6 +148,7 @@ o2::framework::WorkflowSpec getWorkflow(bool propagateMC, specs.emplace_back(o2::emcal::getPublisherSpec(PublisherConf{ "emcal-cell-reader", "o2sim", + "emccells.root", {"cellbranch", "EMCALCell", "Cell branch"}, {"celltriggerbranch", "EMCALCellTRGR", "Trigger record branch"}, {"mcbranch", "EMCALCellMCTruth", "MC label branch"},