template<class DataSet_t>
class RooAbsDataHelper< DataSet_t >
This is a helper for an RDataFrame action, which fills RooFit data classes.
- Template Parameters
-
| DataSet_t | Either RooDataSet or RooDataHist. |
To construct RooDataSet / RooDataHist within RDataFrame
- Construct one of the two action helpers RooDataSetHelper or RooDataHistHelper. Pass constructor arguments to RooAbsDataHelper::RooAbsDataHelper() as for the original classes. The arguments are forwarded to the actual data classes without any changes.
- Book the helper as an RDataFrame action. Here, the RDataFrame column types have to be passed as template parameters.
- Pass the column names to the Book action. These are matched by position to the variables of the dataset. If there is one more column name than variables in the dataset, the last columns values will be used as weights.
All arguments passed to are forwarded to RooDataSet::RooDataSet() / RooDataHist::RooDataHist().
Usage example for a weighted RooDataSet:
"dataset",
"Title of dataset",
},
{"x", "y", "weight"}
);
RooAbsDataHelper< RooDataSet > RooDataSetHelper
Helper for creating a RooDataSet inside RDataFrame.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Variable that can be changed from the outside.
RooCmdArg WeightVar(const char *name="weight", bool reinterpretAsWeight=false)
- Warning
- Variables in the dataset and columns in RDataFrame are matched by position, not by name. This enables the easy exchanging of columns that should be filled into the dataset.
Definition at line 121 of file RooAbsDataHelper.h.
|
| template<typename... Args_t> |
| | RooAbsDataHelper (Args_t &&...args) |
| | Construct a helper to create RooDataSet/RooDataHist.
|
| auto | CallFinalizeTask (unsigned int slot) -> decltype(std::declval< T >().FinalizeTask(slot)) |
| RooAbsDataHelper< DataSet_t > | CallMakeNew (void *typeErasedResSharedPtr, std::string_view variation="nominal") |
| auto | CallPartialUpdate (unsigned int slot) -> decltype(std::declval< H >().PartialUpdate(slot),(void *)(nullptr)) |
| std::vector< double > & | events (std::size_t slot) |
| template<typename... ColumnTypes> |
| void | Exec (unsigned int slot, ColumnTypes... values) |
| | Method that RDataFrame calls to pass a new event.
|
| void | ExecImpl (std::size_t nValues, std::vector< double > &vector) |
| void | Finalize () |
| | Empty all buffers into the dataset/hist to finish processing.
|
| DataSet_t & | GetAbsData () override |
| std::string | GetActionName () |
| | RDataFrame interface method.
|
| virtual std::unique_ptr< RMergeableValueBase > | GetMergeableValue () const |
| std::shared_ptr< DataSet_t > | GetResultPtr () const |
| | Return internal dataset/hist.
|
| virtual ROOT::RDF::SampleCallback_t | GetSampleCallback () |
| | Override this method to register a callback that is executed before the processing a new data sample starts.
|
| void | Initialize () |
| | RDataFrame interface method.
|
| void | InitTask (TTreeReader *, unsigned int) |
| | RDataFrame interface method. No tasks.
|