A type-erased version of RResultPtr and RResultMap.
RResultHandles are used to invoke ROOT::RDF::RunGraphs() and can also be useful to store result pointers of different types in the same collection. Knowledge about the actual result type will still be needed to access it.
Definition at line 33 of file RResultHandle.hxx.
Public Member Functions | |
RResultHandle ()=default | |
template<class T > | |
RResultHandle (const Experimental::RResultMap< T > &resultMap) | |
RResultHandle (const RResultHandle &)=default | |
template<class T > | |
RResultHandle (const RResultPtr< T > &resultPtr) | |
RResultHandle (RResultHandle &&)=default | |
template<class T > | |
T * | GetPtr () |
Get the pointer to the encapsulated object. | |
template<class T > | |
const T & | GetValue () |
Get a const reference to the encapsulated object. | |
bool | IsReady () const |
Check whether the result has already been computed. | |
bool | operator!= (const RResultHandle &rhs) const |
bool | operator== (const RResultHandle &rhs) const |
template<class T > | |
R__DEPRECATED (6, 32, "Please use RResultPtr directly and only cast to RResultHandle in order to call RunGraphs.") RResultPtr< T > GetResultPtr() | |
Get an RResultPtr to the encapsulated object. | |
Private Member Functions | |
void | CheckType (const std::type_info &type) |
Compare given type to the type of the wrapped result and throw if the types don't match. | |
void * | Get () |
Get the pointer to the encapsulated result. | |
void | ThrowIfNull () |
Private Attributes | |
std::shared_ptr< ROOT::Internal::RDF::RActionBase > | fActionPtr |
Owning pointer to the action that will produce this result. | |
ROOT::Detail::RDF::RLoopManager * | fLoopManager = nullptr |
std::shared_ptr< void > | fObjPtr |
Type erased shared pointer encapsulating the wrapped result. | |
const std::type_info * | fType = nullptr |
Type of the wrapped result. | |
std::shared_ptr< ROOT::Internal::RDF::RActionBase > | fVariedActionPtr |
Owning pointer to the varied action that will produce these results if any. | |
Friends | |
unsigned int | RunGraphs (std::vector< RResultHandle >) |
Trigger the event loop of multiple RDataFrames concurrently. | |
#include <ROOT/RResultHandle.hxx>
|
inline |
Definition at line 77 of file RResultHandle.hxx.
|
inline |
Definition at line 79 of file RResultHandle.hxx.
|
default |
|
default |
|
default |
|
inlineprivate |
Compare given type to the type of the wrapped result and throw if the types don't match.
Definition at line 58 of file RResultHandle.hxx.
|
inlineprivate |
Get the pointer to the encapsulated result.
Ownership is not transferred to the caller. Triggers event loop and execution of all actions booked in the associated RLoopManager.
Definition at line 50 of file RResultHandle.hxx.
|
inline |
Get the pointer to the encapsulated object.
Triggers event loop and execution of all actions booked in the associated RLoopManager. If the RResultHandle was created from a RResultMap, this returns a pointer to the nominal value.
T | Type of the action result |
Definition at line 97 of file RResultHandle.hxx.
|
inline |
Get a const reference to the encapsulated object.
Triggers event loop and execution of all actions booked in the associated RLoopManager. If the RResultHandle was created from a RResultMap, this returns a pointer to the nominal value.
T | Type of the action result |
Definition at line 109 of file RResultHandle.hxx.
|
inline |
Check whether the result has already been computed.
Definition at line 135 of file RResultHandle.hxx.
|
inline |
Definition at line 146 of file RResultHandle.hxx.
|
inline |
Definition at line 141 of file RResultHandle.hxx.
|
inline |
Get an RResultPtr to the encapsulated object.
T | Type of the action result |
Definition at line 119 of file RResultHandle.hxx.
|
inlineprivate |
Definition at line 69 of file RResultHandle.hxx.
|
friend |
Trigger the event loop of multiple RDataFrames concurrently.
[in] | handles | A vector of RResultHandles |
This function triggers the event loop of all computation graphs which relate to the given RResultHandles. The advantage compared to running the event loop implicitly by accessing the RResultPtr is that the event loops will run concurrently. Therefore, the overall computation of all results is generally more efficient. It should be noted that user-defined operations (e.g., Filters and Defines) of the different RDataFrame graphs are assumed to be safe to call concurrently.
|
private |
Owning pointer to the action that will produce this result.
Ownership is shared with RResultPtrs and RResultHandles that refer to the same result.
Definition at line 37 of file RResultHandle.hxx.
|
private |
Definition at line 34 of file RResultHandle.hxx.
|
private |
Type erased shared pointer encapsulating the wrapped result.
Definition at line 38 of file RResultHandle.hxx.
|
private |
Type of the wrapped result.
Definition at line 42 of file RResultHandle.hxx.
|
private |
Owning pointer to the varied action that will produce these results if any.
Null if the RResultHandle was created from a RResultPtr, so no variations were present.
Definition at line 41 of file RResultHandle.hxx.