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  Internal
 
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  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

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 ArrayL , class ArrayR >
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 148 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

◆ 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 402 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.

◆ operator_equal_impl()

template<class ArrayL , class ArrayR >
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 456 of file span.hxx.