From 1c4ff134061eed54f693c648601ac2efc7c1a729 Mon Sep 17 00:00:00 2001 From: Enrico Guiraud <enrico.guiraud@cern.ch> Date: Wed, 14 Nov 2018 11:00:05 +0100 Subject: [PATCH] [DF][NFC] Make RCustomColumn::UpdateHelper private --- tree/dataframe/inc/ROOT/RDF/RCustomColumn.hxx | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/tree/dataframe/inc/ROOT/RDF/RCustomColumn.hxx b/tree/dataframe/inc/ROOT/RDF/RCustomColumn.hxx index 098c9e9c33f..bf155519ef0 100644 --- a/tree/dataframe/inc/ROOT/RDF/RCustomColumn.hxx +++ b/tree/dataframe/inc/ROOT/RDF/RCustomColumn.hxx @@ -64,6 +64,34 @@ class RCustomColumn final : public RCustomColumnBase { std::vector<RDFInternal::RDFValueTuple_t<ColumnTypes_t>> fValues; + template <std::size_t... S, typename... BranchTypes> + void UpdateHelper(unsigned int slot, Long64_t entry, std::index_sequence<S...>, TypeList<BranchTypes...>, NoneTag) + { + fLastResults[slot] = fExpression(std::get<S>(fValues[slot]).Get(entry)...); + // silence "unused parameter" warnings in gcc + (void)slot; + (void)entry; + } + + template <std::size_t... S, typename... BranchTypes> + void UpdateHelper(unsigned int slot, Long64_t entry, std::index_sequence<S...>, TypeList<BranchTypes...>, SlotTag) + { + fLastResults[slot] = fExpression(slot, std::get<S>(fValues[slot]).Get(entry)...); + // silence "unused parameter" warnings in gcc + (void)slot; + (void)entry; + } + + template <std::size_t... S, typename... BranchTypes> + void + UpdateHelper(unsigned int slot, Long64_t entry, std::index_sequence<S...>, TypeList<BranchTypes...>, SlotAndEntryTag) + { + fLastResults[slot] = fExpression(slot, entry, std::get<S>(fValues[slot]).Get(entry)...); + // silence "unused parameter" warnings in gcc + (void)slot; + (void)entry; + } + public: RCustomColumn(RLoopManager *lm, std::string_view name, F &&expression, const ColumnNames_t &bl, unsigned int nSlots, const RDFInternal::RBookedCustomColumns &customColumns, bool isDSColumn = false) @@ -97,34 +125,6 @@ public: { return fIsDataSourceColumn ? typeid(typename std::remove_pointer<ret_type>::type) : typeid(ret_type); } - - template <std::size_t... S, typename... BranchTypes> - void UpdateHelper(unsigned int slot, Long64_t entry, std::index_sequence<S...>, TypeList<BranchTypes...>, NoneTag) - { - fLastResults[slot] = fExpression(std::get<S>(fValues[slot]).Get(entry)...); - // silence "unused parameter" warnings in gcc - (void)slot; - (void)entry; - } - - template <std::size_t... S, typename... BranchTypes> - void UpdateHelper(unsigned int slot, Long64_t entry, std::index_sequence<S...>, TypeList<BranchTypes...>, SlotTag) - { - fLastResults[slot] = fExpression(slot, std::get<S>(fValues[slot]).Get(entry)...); - // silence "unused parameter" warnings in gcc - (void)slot; - (void)entry; - } - - template <std::size_t... S, typename... BranchTypes> - void - UpdateHelper(unsigned int slot, Long64_t entry, std::index_sequence<S...>, TypeList<BranchTypes...>, SlotAndEntryTag) - { - fLastResults[slot] = fExpression(slot, entry, std::get<S>(fValues[slot]).Get(entry)...); - // silence "unused parameter" warnings in gcc - (void)slot; - (void)entry; - } }; } // ns RDF -- GitLab