Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions roofit/roofitcore/inc/RooAbsDataHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,17 @@ class RActionImpl;
///
/// All arguments passed to are forwarded to RooDataSet::RooDataSet() / RooDataHist::RooDataHist().
///
/// #### Usage example:
/// #### Usage example for a weighted RooDataSet:
/// ```
/// RooRealVar x("x", "x", -5., 5.);
/// RooRealVar y("y", "y", -50., 50.);
/// auto myDataSet = rdataframe.Book<double, double>(
/// RooDataSetHelper{"dataset", // Name (directly forwarded to RooDataSet::RooDataSet())
/// "Title of dataset", // Title ( ~ " ~ )
/// RooArgSet(x, y) }, // Variables to create in dataset
/// auto myDataSet = rdataframe.Book<double, double, double>( // three template arguments for "x", "y", and "weight"
/// RooDataSetHelper{
/// "dataset", // Name (directly forwarded to RooDataSet::RooDataSet())
/// "Title of dataset", // Title ( ~ " ~ )
/// RooArgSet(x, y), // Variables to create in dataset
/// RooFit::WeightVar("weight") // skip in case of RooDataHist or unweighted dataset
/// },
/// {"x", "y", "weight"} // Column names from RDataFrame
/// // (this example uses an additional column for the weight)
/// );
Expand Down
Loading