34namespace Experimental {
72struct IsDataContainer {
73 using Test_t =
typename std::decay<T>::type;
76 static constexpr bool Test(A *
pt, A
const *cpt =
nullptr,
decltype(
pt->begin()) * =
nullptr,
77 decltype(
pt->end()) * =
nullptr,
decltype(cpt->begin()) * =
nullptr,
78 decltype(cpt->end()) * =
nullptr,
typename A::iterator *pi =
nullptr,
79 typename A::const_iterator *pci =
nullptr)
81 using It_t =
typename A::iterator;
82 using CIt_t =
typename A::const_iterator;
83 using V_t =
typename A::value_type;
84 return std::is_same<
decltype(
pt->begin()), It_t>::value && std::is_same<
decltype(
pt->end()), It_t>::value &&
85 std::is_same<
decltype(cpt->begin()), CIt_t>::value && std::is_same<
decltype(cpt->end()), CIt_t>::value &&
86 std::is_same<
decltype(**pi), V_t &>::value && std::is_same<
decltype(**pci), V_t
const &>::value &&
87 !std::is_same<T, std::string>::value;
91 static constexpr bool Test(...)
96 static constexpr bool value = Test<Test_t>(
nullptr);
100struct IsDataContainer<std::vector<bool>> {
101 static constexpr bool value =
true;
106 static constexpr bool value =
true;
110struct IsDataContainer<std::span<T>> {
111 static constexpr bool value =
true;
116struct IsVector_t :
public std::false_type {};
118template <
typename T,
typename A>
119struct IsVector_t<std::vector<T, A>> :
public std::true_type {};
126 bool vector2rvec =
true);
133template <
bool MustRemove,
typename TypeList>
134struct RemoveFirstParameterIf {
138template <
typename TypeList>
139struct RemoveFirstParameterIf<true,
TypeList> {
143template <
bool MustRemove,
typename TypeList>
144using RemoveFirstParameterIf_t =
typename RemoveFirstParameterIf<MustRemove, TypeList>::type;
146template <
bool MustRemove,
typename TypeList>
147struct RemoveFirstTwoParametersIf {
151template <
typename TypeList>
152struct RemoveFirstTwoParametersIf<true,
TypeList> {
153 using typeTmp =
typename RemoveFirstParameterIf<true, TypeList>::type;
154 using type =
typename RemoveFirstParameterIf<true, typeTmp>::type;
157template <
bool MustRemove,
typename TypeList>
158using RemoveFirstTwoParametersIf_t =
typename RemoveFirstTwoParametersIf<MustRemove, TypeList>::type;
162struct IsRVec_t :
public std::false_type {};
169template <typename T, bool IsDataContainer = IsDataContainer<typename std::decay<T>::type>::value || std::is_same<std::string, T>::value>
171 using value_type =
typename T::value_type;
175struct ValueType<
T, false> {
176 using value_type =
T;
181 using value_type =
T;
188void Erase(
const T &that, std::vector<T> &
v)
190 v.erase(std::remove(
v.begin(),
v.end(), that),
v.end());
207#ifdef R__HAS_HARDWARE_INTERFERENCE_SIZE
209 inline constexpr std::size_t kCacheLineSize = std::hardware_destructive_interference_size;
212 static constexpr std::size_t kCacheLineSize = 64;
218constexpr std::size_t CacheLineStep() {
219 return (kCacheLineSize +
sizeof(T) - 1) /
sizeof(
T);
A log configuration for a channel, e.g.
RDataSource defines an API that RDataFrame can use to read arbitrary data formats.
typename RemoveFirstParameter< T >::type RemoveFirstParameter_t
A "std::vector"-like collection of values implementing handy operation to analyse them.
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
A TTree represents a columnar dataset.
std::vector< std::string > ColumnNames_t
std::vector< std::string > ReplaceDotWithUnderscore(const std::vector< std::string > &columnNames)
Replace occurrences of '.
const std::type_info & TypeName2TypeID(const std::string &name)
Return the type_info associated to a name.
std::string ColumnName2ColumnTypeName(const std::string &colName, TTree *tree, RDataSource *ds, RDefineBase *define, bool vector2rvec)
Return a string containing the type of the given branch.
char TypeName2ROOTTypeName(const std::string &b)
Convert type name (e.g.
std::string TypeID2TypeName(const std::type_info &id)
Returns the name of a type starting from its type_info An empty string is returned in case of failure...
bool IsInternalColumn(std::string_view colName)
Long64_t InterpreterCalc(const std::string &code, const std::string &context)
void InterpreterDeclare(const std::string &code)
ROOT type_traits extensions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Lightweight storage for a collection of types.