This is a helper for an RDataFrame action, which fills RooFit data classes.
DataSet_t | Either RooDataSet or RooDataHist. |
To construct RooDataSet / RooDataHist within RDataFrame
All arguments passed to are forwarded to RooDataSet::RooDataSet() / RooDataHist::RooDataHist().
Definition at line 68 of file RooAbsDataHelper.h.
Public Types | |
using | Result_t = DataSet_t |
Public Member Functions | |
template<typename... Args_t> | |
RooAbsDataHelper (Args_t &&... args) | |
Construct a helper to create RooDataSet/RooDataHist. | |
RooAbsDataHelper (const RooAbsDataHelper &)=delete | |
Copy is discouraged. | |
RooAbsDataHelper (RooAbsDataHelper &&other) | |
Move constructor. It transfers ownership of the internal RooAbsData object. | |
template<typename... ColumnTypes> | |
void | Exec (unsigned int slot, ColumnTypes... values) |
Method that RDataFrame calls to pass a new event. | |
void | Finalize () |
Empty all buffers into the dataset/hist to finish processing. | |
std::string | GetActionName () |
RDataFrame interface method. | |
std::shared_ptr< DataSet_t > | GetResultPtr () const |
Return internal dataset/hist. | |
void | Initialize () |
RDataFrame interface method. Nothing has to be initialised. | |
void | InitTask (TTreeReader *, unsigned int) |
RDataFrame interface method. No tasks. | |
Public Member Functions inherited from ROOT::Detail::RDF::RActionImpl< RooAbsDataHelper< DataSet_t > > | |
virtual | ~RActionImpl ()=default |
auto | CallFinalizeTask (unsigned int slot) -> decltype(std::declval< T >().FinalizeTask(slot)) |
void | CallFinalizeTask (unsigned int, Args...) |
RooAbsDataHelper< DataSet_t > | CallMakeNew (void *, Args...) |
auto | CallMakeNew (void *typeErasedResSharedPtr) -> decltype(std::declval< T >().MakeNew(typeErasedResSharedPtr)) |
void * | CallPartialUpdate (...) |
auto | CallPartialUpdate (unsigned int slot) -> decltype(std::declval< H >().PartialUpdate(slot),(void *)(nullptr)) |
virtual std::unique_ptr< RMergeableValueBase > | GetMergeableValue () const |
virtual ROOT::RDF::SampleCallback_t | GetSampleCallback () |
Override this method to register a callback that is executed before the processing a new data sample starts. | |
Private Member Functions | |
void | FillDataSet (const std::vector< double > &events, unsigned int eventSize) |
Append all events to the internal RooDataSet or increment the bins of a RooDataHist at the given locations. | |
Private Attributes | |
std::shared_ptr< DataSet_t > | _dataset |
std::vector< std::vector< double > > | _events |
const std::size_t | _eventSize |
std::mutex | _mutex_dataset |
std::size_t | _numInvalid = 0 |
#include <RooAbsDataHelper.h>
using RooAbsDataHelper< DataSet_t >::Result_t = DataSet_t |
Definition at line 70 of file RooAbsDataHelper.h.
|
inline |
Construct a helper to create RooDataSet/RooDataHist.
Args_t | Parameter pack of arguments. |
args | Constructor arguments for RooDataSet::RooDataSet() or RooDataHist::RooDataHist(). All arguments will be forwarded as they are. |
Definition at line 87 of file RooAbsDataHelper.h.
|
inline |
Move constructor. It transfers ownership of the internal RooAbsData object.
Definition at line 97 of file RooAbsDataHelper.h.
|
delete |
Copy is discouraged.
Use rdataframe.Book<...>(std::move(absDataHelper), ...)
instead.
|
inline |
Method that RDataFrame calls to pass a new event.
slot | When IMT is used, this is a number in the range [0, nSlots) to fill lock free. |
values | x, y, z, ... coordinates of the event. |
Definition at line 123 of file RooAbsDataHelper.h.
|
inlineprivate |
Append all events
to the internal RooDataSet or increment the bins of a RooDataHist at the given locations.
events | Events to fill into data . The layout is assumed to be (x, y, z, ...) (x, y, z, ...), (...) . |
events
must be consistent with the order given in the constructor. No matching by name is performed. eventSize | Size of a single event. |
Definition at line 166 of file RooAbsDataHelper.h.
|
inline |
Empty all buffers into the dataset/hist to finish processing.
Definition at line 146 of file RooAbsDataHelper.h.
|
inline |
RDataFrame interface method.
Definition at line 116 of file RooAbsDataHelper.h.
|
inline |
Return internal dataset/hist.
Definition at line 110 of file RooAbsDataHelper.h.
|
inline |
RDataFrame interface method. Nothing has to be initialised.
Definition at line 112 of file RooAbsDataHelper.h.
|
inline |
RDataFrame interface method. No tasks.
Definition at line 114 of file RooAbsDataHelper.h.
|
private |
Definition at line 73 of file RooAbsDataHelper.h.
|
private |
Definition at line 77 of file RooAbsDataHelper.h.
|
private |
Definition at line 78 of file RooAbsDataHelper.h.
|
private |
Definition at line 74 of file RooAbsDataHelper.h.
|
private |
Definition at line 75 of file RooAbsDataHelper.h.