Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Detail Namespace Reference

Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target type inherits from TObject and a new constructor that takes the TCollection by pointer. More...

Namespaces

namespace  RDF
 
namespace  VecOps
 

Classes

struct  CallableTraitsImpl
 Extract types from the signature of a callable object. See CallableTraits. More...
 
struct  CallableTraitsImpl< R(*)(Args...), false >
 
struct  CallableTraitsImpl< R(Args...), false >
 
struct  CallableTraitsImpl< R(T::*)(Args...) const, false >
 
struct  CallableTraitsImpl< R(T::*)(Args...), false >
 
struct  CallableTraitsImpl< T, true >
 
struct  indices
 
struct  is_array_class
 
struct  is_array_class< std::array< T, N > >
 
struct  is_array_class< std::initializer_list< T > >
 
struct  is_array_class< std::vector< T > >
 
struct  make_indices_
 
struct  make_indices_impl
 
struct  make_indices_impl< First, Step, N, typename std::enable_if<(N > 1 &&N % 2==0)>::type >
 
struct  make_indices_impl< First, Step, N, typename std::enable_if<(N > 1 &&N % 2==1)>::type >
 
struct  make_indices_impl< First, Step, N, typename std::enable_if<(N==0)>::type >
 
struct  make_indices_impl< First, Step, N, typename std::enable_if<(N==1)>::type >
 
struct  make_indices_next
 
struct  make_indices_next2
 
struct  make_indices_next2< indices< Indices... >, Next, Tail >
 
struct  make_indices_next< indices< Indices... >, Next >
 
class  TBranchProxy
 Base class for all the proxy object. More...
 
class  TCollectionProxyInfo
 
class  TFutureImpl
 
class  TRangeCast
 
class  TSchemaRuleSet
 
class  TStatusBitsChecker
 

Typedefs

template<size_t Start, size_t Last, size_t Step = 1>
using make_indices = typename make_indices_< Start, Last, Step >::type
 
template<typename T >
using TRangeStaticCast = TRangeCast< T, false >
 TRangeStaticCast is an adapter class that allows the typed iteration through a TCollection.
 

Functions

template<class F , class Tuple , std::size_t... I>
constexpr decltype(auto) apply_impl (F &&f, Tuple &&t, std::index_sequence< I... >)
 
R__ALWAYS_INLINE bool HasBeenDeleted (const TObject *obj)
 Check if the TObject's memory has been deleted.
 
template<typename T >
constexpr bool HasCallOp (char)
 
template<typename T >
constexpr auto HasCallOp (int) -> decltype(&T::operator(), true)
 
template<class F , class... Args>
auto INVOKE (F &&f, Args &&... args) -> decltype(std::forward< F >(f)(std::forward< Args >(args)...))
 
template<class PMD , class Pointer >
auto INVOKE (PMD pmd, Pointer &&ptr) -> decltype((*std::forward< Pointer >(ptr)).*pmd)
 
template<class PMF , class Pointer , class... Args>
auto INVOKE (PMF pmf, Pointer &&ptr, Args &&... args) -> decltype(((*std::forward< Pointer >(ptr)).*pmf)(std::forward< Args >(args)...))
 
template<class Base , class T , class Derived >
auto INVOKE (T Base::*pmd, Derived &&ref) -> decltype(std::forward< Derived >(ref).*pmd)
 
template<class Base , class T , class Derived , class... Args>
auto INVOKE (T Base::*pmf, Derived &&ref, Args &&... args) -> decltype((std::forward< Derived >(ref).*pmf)(std::forward< Args >(args)...))
 
template<class ArrayL , class ArrayR >
R__CONSTEXPR_IF_CXX14 bool operator_equal_impl (ArrayL const &lhs, size_t const lhs_size, ArrayR const &rhs, size_t const rhs_size)
 

Detailed Description

Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target type inherits from TObject and a new constructor that takes the TCollection by pointer.

Template Parameters
TThe new type to convert to.
isDynamicIf true, dynamic_cast is used, otherwise static_cast is used.

Typedef Documentation

◆ make_indices

template<size_t Start, size_t Last, size_t Step = 1>
using ROOT::Detail::make_indices = typedef typename make_indices_< Start, Last, Step >::type

Definition at line 140 of file span.hxx.

◆ TRangeStaticCast

template<typename T >
using ROOT::Detail::TRangeStaticCast = typedef TRangeCast<T, false>

TRangeStaticCast is an adapter class that allows the typed iteration through a TCollection.

This requires the collection to contain elements of the type requested (or a derived class). Any deviation from this expectation will only be caught/reported by an assert in debug builds.

This is best used with a TClonesArray, for other cases prefered TRangeDynCast.

The typical use is:

for(auto bcl : TRangeStaticCast<TBaseClass>( *tbaseClassClonesArrayPtr )) {
... use bcl as a TBaseClass*
}
for(auto bcl : TRangeStaticCast<TBaseClass>( tbaseClassClonesArrayPtr )) {
... use bcl as a TBaseClass*
}
#define a(i)
Definition RSha256.hxx:99
Each class (see TClass) has a linked list of its base class(es).
Definition TBaseClass.h:33
Template Parameters
TThe new type to convert to.

Definition at line 337 of file TCollection.h.

Function Documentation

◆ apply_impl()

template<class F , class Tuple , std::size_t... I>
constexpr decltype(auto) ROOT::Detail::apply_impl ( F &&  f,
Tuple &&  t,
std::index_sequence< I... >   
)
constexpr

Definition at line 77 of file impl_tuple_apply.hxx.

◆ HasBeenDeleted()

R__ALWAYS_INLINE bool ROOT::Detail::HasBeenDeleted ( const TObject obj)

Check if the TObject's memory has been deleted.

Warning
This should be only used for error mitigation as the answer is only sometimes correct. It actually just checks whether the object has been deleted, so this will falsely return true for an object that has been destructed but its memory has not been deleted. This will return an undefined value if the memory is re-used between the deletion and the check. i.e. This is useful to prevent a segmentation fault in case where the problem can be detected when the deletion and the usage are 'close-by'
In enviroment where delete taints (changes) the memory, this function always returns false as the marker left by ~TObject will be overwritten.
Parameters
objThe memory to check
Returns
true if the object has been destructed and it can be inferred that it has been deleted

Definition at line 404 of file TObject.h.

◆ HasCallOp() [1/2]

template<typename T >
constexpr bool ROOT::Detail::HasCallOp ( char  )
constexpr

Definition at line 32 of file TypeTraits.hxx.

◆ HasCallOp() [2/2]

template<typename T >
constexpr auto ROOT::Detail::HasCallOp ( int  ) -> decltype(&T::operator(), true)
constexpr

Definition at line 31 of file TypeTraits.hxx.

◆ INVOKE() [1/5]

template<class F , class... Args>
auto ROOT::Detail::INVOKE ( F &&  f,
Args &&...  args 
) -> decltype(std::forward<F>(f)(std::forward<Args>(args)...))
inline

Definition at line 29 of file impl_tuple_apply.hxx.

◆ INVOKE() [2/5]

template<class PMD , class Pointer >
auto ROOT::Detail::INVOKE ( PMD  pmd,
Pointer &&  ptr 
) -> decltype((*std::forward<Pointer>(ptr)).*pmd)
inline

Definition at line 41 of file impl_tuple_apply.hxx.

◆ INVOKE() [3/5]

template<class PMF , class Pointer , class... Args>
auto ROOT::Detail::INVOKE ( PMF  pmf,
Pointer &&  ptr,
Args &&...  args 
) -> decltype(((*std::forward<Pointer>(ptr)).*pmf)(std::forward<Args>(args)...))
inline

Definition at line 53 of file impl_tuple_apply.hxx.

◆ INVOKE() [4/5]

template<class Base , class T , class Derived >
auto ROOT::Detail::INVOKE ( T Base::*  pmd,
Derived &&  ref 
) -> decltype(std::forward<Derived>(ref).*pmd)
inline

Definition at line 35 of file impl_tuple_apply.hxx.

◆ INVOKE() [5/5]

template<class Base , class T , class Derived , class... Args>
auto ROOT::Detail::INVOKE ( T Base::*  pmf,
Derived &&  ref,
Args &&...  args 
) -> decltype((std::forward<Derived>(ref).*pmf)(std::forward<Args>(args)...))
inline

Definition at line 47 of file impl_tuple_apply.hxx.

◆ operator_equal_impl()

template<class ArrayL , class ArrayR >
R__CONSTEXPR_IF_CXX14 bool ROOT::Detail::operator_equal_impl ( ArrayL const &  lhs,
size_t const  lhs_size,
ArrayR const &  rhs,
size_t const  rhs_size 
)
inline

Definition at line 448 of file span.hxx.