Skip to content

Commit 675ac5c

Browse files
committed
[RDF][Docs] Move main snapshot documentation to non-template overload.
Due to the deprecation marker, the snapshot documentation is parsed incorrectly in doxygen. Here, the main documentation is moved to the non-template overload, and the other overloads are referring to this one using the full argument list. "See above" typically doesn't work, since doxygen sorts the functions.
1 parent d9c0023 commit 675ac5c

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

tree/dataframe/inc/ROOT/RDF/RInterface.hxx

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,27 @@ public:
12511251
/// \param[in] options RSnapshotOptions struct with extra options to pass to the output TFile and TTree/RNTuple.
12521252
/// \return a `RDataFrame` that wraps the snapshotted dataset.
12531253
///
1254+
template <typename... ColumnTypes>
1255+
R__DEPRECATED(
1256+
6, 40, "Snapshot does not need template arguments anymore, you can safely remove them from this function call.")
1257+
RResultPtr<RInterface<RLoopManager>> Snapshot(std::string_view treename, std::string_view filename,
1258+
const ColumnNames_t &columnList,
1259+
const RSnapshotOptions &options = RSnapshotOptions())
1260+
{
1261+
return Snapshot(treename, filename, columnList, options);
1262+
}
1263+
1264+
////////////////////////////////////////////////////////////////////////////
1265+
/// \brief Save selected columns to disk, in a new TTree or RNTuple `treename` in file `filename`.
1266+
/// \param[in] treename The name of the output TTree or RNTuple.
1267+
/// \param[in] filename The name of the output TFile.
1268+
/// \param[in] columnList The list of names of the columns/branches/fields to be written.
1269+
/// \param[in] options RSnapshotOptions struct with extra options to pass to TFile and TTree/RNTuple.
1270+
/// \return a `RDataFrame` that wraps the snapshotted dataset.
1271+
///
1272+
/// This function returns a `RDataFrame` built with the output TTree or RNTuple as a source.
1273+
/// The types of the columns are automatically inferred and do not need to be specified.
1274+
///
12541275
/// Support for writing of nested branches/fields is limited (although RDataFrame is able to read them) and dot ('.')
12551276
/// characters in input column names will be replaced by underscores ('_') in the branches produced by Snapshot.
12561277
/// When writing a variable size array through Snapshot, it is required that the column indicating its size is also
@@ -1306,28 +1327,6 @@ public:
13061327
/// opts.fOutputFormat = ROOT::RDF::ESnapshotOutputFormat::kRNTuple;
13071328
/// df.Snapshot("outputNTuple", "outputFile.root", {"x"}, opts);
13081329
/// ~~~
1309-
template <typename... ColumnTypes>
1310-
R__DEPRECATED(
1311-
6, 40, "Snapshot does not need template arguments anymore, you can safely remove them from this function call.")
1312-
RResultPtr<RInterface<RLoopManager>> Snapshot(std::string_view treename, std::string_view filename,
1313-
const ColumnNames_t &columnList,
1314-
const RSnapshotOptions &options = RSnapshotOptions())
1315-
{
1316-
return Snapshot(treename, filename, columnList, options);
1317-
}
1318-
1319-
////////////////////////////////////////////////////////////////////////////
1320-
/// \brief Save selected columns to disk, in a new TTree or RNTuple `treename` in file `filename`.
1321-
/// \param[in] treename The name of the output TTree or RNTuple.
1322-
/// \param[in] filename The name of the output TFile.
1323-
/// \param[in] columnList The list of names of the columns/branches/fields to be written.
1324-
/// \param[in] options RSnapshotOptions struct with extra options to pass to TFile and TTree/RNTuple.
1325-
/// \return a `RDataFrame` that wraps the snapshotted dataset.
1326-
///
1327-
/// This function returns a `RDataFrame` built with the output TTree or RNTuple as a source.
1328-
/// The types of the columns are automatically inferred and do not need to be specified.
1329-
///
1330-
/// See above for a more complete description and example usages.
13311330
RResultPtr<RInterface<RLoopManager>> Snapshot(std::string_view treename, std::string_view filename,
13321331
const ColumnNames_t &columnList,
13331332
const RSnapshotOptions &options = RSnapshotOptions())
@@ -1464,7 +1463,7 @@ public:
14641463
/// This function returns a `RDataFrame` built with the output TTree or RNTuple as a source.
14651464
/// The types of the columns are automatically inferred and do not need to be specified.
14661465
///
1467-
/// See above for a more complete description and example usages.
1466+
/// See Snapshot(std::string_view, std::string_view, const ColumnNames_t&, const RSnapshotOptions &) for a more complete description and example usages.
14681467
RResultPtr<RInterface<RLoopManager>> Snapshot(std::string_view treename, std::string_view filename,
14691468
std::string_view columnNameRegexp = "",
14701469
const RSnapshotOptions &options = RSnapshotOptions())
@@ -1507,7 +1506,7 @@ public:
15071506
/// This function returns a `RDataFrame` built with the output TTree or RNTuple as a source.
15081507
/// The types of the columns are automatically inferred and do not need to be specified.
15091508
///
1510-
/// See above for a more complete description and example usages.
1509+
/// See Snapshot(std::string_view, std::string_view, const ColumnNames_t&, const RSnapshotOptions &) for a more complete description and example usages.
15111510
RResultPtr<RInterface<RLoopManager>> Snapshot(std::string_view treename, std::string_view filename,
15121511
std::initializer_list<std::string> columnList,
15131512
const RSnapshotOptions &options = RSnapshotOptions())

0 commit comments

Comments
 (0)