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  RFieldVisitor
 Abstract base class for classes implementing the visitor design pattern. More...
class  RLogBuilder
 Builds a diagnostic entry, emitted by the static RLogManager upon destruction of this builder, where - by definition - the RLogEntry has been completely built. More...
class  RRawPtrWriteEntry
 A container of const raw pointers, corresponding to a row in the data set. More...
class  TBranchProxy
 Base class for all the proxy object. More...
class  TCollectionProxyInfo
class  TKeyMapIterable
struct  TKeyMapNode
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

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 = typename make_indices_< Start, Last, Step >::type

Definition at line 147 of file span.hxx.

◆ TRangeStaticCast

template<typename T>
using ROOT::Detail::TRangeStaticCast = 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 TRangeDynCast is preferred.

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
TRangeCast< T, false > TRangeStaticCast
TRangeStaticCast is an adapter class that allows the typed iteration through a TCollection.
Template Parameters
TThe new type to convert to.

Definition at line 339 of file TCollection.h.

Function Documentation

◆ HasBeenDeleted()

bool ROOT::Detail::HasBeenDeleted ( const TObject * obj)
inline

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 409 of file TObject.h.

◆ HasCallOp() [1/2]

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

Definition at line 32 of file TypeTraits.hxx.

◆ HasCallOp() [2/2]

template<typename T>
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 462 of file span.hxx.