From ffa7147741dd45e4c4662ce4a95f8a592c8e4301 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 4 Jun 2025 13:02:03 +0000 Subject: [PATCH] Please consider the following formatting changes --- .../Strangeness/strangenessbuilder.cxx | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx b/PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx index 89a83d53535..c38c792f5e1 100644 --- a/PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx +++ b/PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx @@ -2650,68 +2650,68 @@ struct StrangenessBuilder { WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { auto strangenessBuilderTask = adaptAnalysisTask(cfgc); - bool isRun3 = true, hasRunInfo = false; + bool isRun3 = true, hasRunInfo = false; bool isMC = false, hasDataTypeInfo = false; - if(cfgc.options().hasOption("aod-metadata-Run") == true){ + if (cfgc.options().hasOption("aod-metadata-Run") == true) { hasRunInfo = true; - if(cfgc.options().get("aod-metadata-Run") == "2"){ + if (cfgc.options().get("aod-metadata-Run") == "2") { isRun3 = false; } } - if(cfgc.options().hasOption("aod-metadata-DataType") == true){ + if (cfgc.options().hasOption("aod-metadata-DataType") == true) { hasDataTypeInfo = true; - if(cfgc.options().get("aod-metadata-DataType") == "MC"){ + if (cfgc.options().get("aod-metadata-DataType") == "MC") { isMC = true; } } - int idxSwitches[8]; //8 switches (real / real r2 / MC / MC r2 + PID) + int idxSwitches[8]; // 8 switches (real / real r2 / MC / MC r2 + PID) bool autoConfigureProcessConfig = true; bool withPID = false; - for(size_t ipar = 0; ipar(); // check if autoconfig requested } // use withPID in case preselection is requested - if(option.name == "preSelectOpts.preselectOnlyDesiredV0s" || option.name == "preSelectOpts.preselectOnlyDesiredCascades" ){ + if (option.name == "preSelectOpts.preselectOnlyDesiredV0s" || option.name == "preSelectOpts.preselectOnlyDesiredCascades") { withPID = withPID || option.defaultValue.get(); } } - if((!hasRunInfo || !hasDataTypeInfo) && autoConfigureProcessConfig){ + if ((!hasRunInfo || !hasDataTypeInfo) && autoConfigureProcessConfig) { throw std::runtime_error("Autoconfigure requested but no metadata information found! Please check if --aod-file was used in the last workflow added in the execution and if the AO2D in question has metadata saved in it."); } - // positions of switches are known. Next: flip if asked for - if(autoConfigureProcessConfig){ - int relevantProcess = static_cast(!isRun3) + 2*static_cast(isMC) + 4*static_cast(withPID); + // positions of switches are known. Next: flip if asked for + if (autoConfigureProcessConfig) { + int relevantProcess = static_cast(!isRun3) + 2 * static_cast(isMC) + 4 * static_cast(withPID); LOGF(info, "Automatic configuration of process switches requested! Autodetected settings: isRun3? %i, isMC? %i, withPID? %i (switch #%i)", hasRunInfo, hasDataTypeInfo, isRun3, isMC, withPID, relevantProcess); - for(size_t idx = 0; idx < 8; idx ++){ + for (size_t idx = 0; idx < 8; idx++) { auto option = strangenessBuilderTask.options[idxSwitches[idx]]; option.defaultValue = false; // switch all off }