Skip to content

Commit df83500

Browse files
committed
commented more code
1 parent 1416632 commit df83500

File tree

4 files changed

+155
-155
lines changed

4 files changed

+155
-155
lines changed

Framework/Core/include/Framework/ASoA.h

Lines changed: 134 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ std::string cutString(std::string&& str);
4040
std::string strToUpper(std::string&& str);
4141
} // namespace o2::framework
4242

43-
#define DECLARE_SOA_METADATA() \
44-
template <typename T> \
45-
struct MetadataTrait { \
46-
using metadata = std::void_t<T>; \
47-
};
48-
49-
#define DECLARE_SOA_ITERATOR_METADATA() \
50-
template <o2::soa::soa_iterator IT> \
51-
struct MetadataTrait<IT> { \
52-
using metadata = typename MetadataTrait<typename IT::parent_t>::metadata; \
53-
};
43+
#define DECLARE_SOA_METADATA()
44+
// template <typename T> \
45+
// struct MetadataTrait { \
46+
// using metadata = std::void_t<T>; \
47+
// };
48+
49+
#define DECLARE_SOA_ITERATOR_METADATA()
50+
// template <o2::soa::soa_iterator IT> \
51+
// struct MetadataTrait<IT> { \
52+
// using metadata = typename MetadataTrait<typename IT::parent_t>::metadata; \
53+
// };
5454

5555
namespace o2::soa
5656
{
@@ -164,83 +164,83 @@ consteval auto intersectOriginals()
164164
}
165165
}
166166

167-
struct OriginEnc {
168-
static constexpr auto size = 4U;
169-
uint64_t value;
170-
consteval OriginEnc(uint32_t v) : value{v}
171-
{
172-
}
173-
#if defined(__clang__)
174-
consteval OriginEnc(std::string_view in) noexcept : value{0}
175-
#elif defined(__GNUC__) || defined(__GNUG__)
176-
constexpr OriginEnc(std::string_view in) noexcept : value{0}
177-
#endif
178-
{
179-
for (auto i = 0U; i < (size < (uint32_t)in.size() ? size : (uint32_t)in.size()); ++i) {
180-
value |= ((uint32_t)in[i]) << (8 * i);
181-
}
182-
}
183-
constexpr operator std::string_view() const noexcept
184-
{
185-
return static_cast<const char*>(static_cast<const void*>(&value));
186-
}
167+
// struct OriginEnc {
168+
// static constexpr auto size = 4U;
169+
// uint64_t value;
170+
// consteval OriginEnc(uint32_t v) : value{v}
171+
// {
172+
// }
173+
// #if defined(__clang__)
174+
// consteval OriginEnc(std::string_view in) noexcept : value{0}
175+
// #elif defined(__GNUC__) || defined(__GNUG__)
176+
// constexpr OriginEnc(std::string_view in) noexcept : value{0}
177+
// #endif
178+
// {
179+
// for (auto i = 0U; i < (size < (uint32_t)in.size() ? size : (uint32_t)in.size()); ++i) {
180+
// value |= ((uint32_t)in[i]) << (8 * i);
181+
// }
182+
// }
183+
// constexpr operator std::string_view() const noexcept
184+
// {
185+
// return static_cast<const char*>(static_cast<const void*>(&value));
186+
// }
187187

188-
consteval operator o2::header::DataOrigin()
189-
{
190-
return o2::header::DataOrigin{static_cast<uint32_t>(value)};
191-
}
188+
// consteval operator o2::header::DataOrigin()
189+
// {
190+
// return o2::header::DataOrigin{static_cast<uint32_t>(value)};
191+
// }
192192

193-
constexpr OriginEnc(OriginEnc const& other) noexcept = default;
194-
constexpr OriginEnc(OriginEnc&& other) noexcept = default;
195-
constexpr OriginEnc& operator=(OriginEnc const& other) noexcept = default;
196-
constexpr OriginEnc& operator=(OriginEnc&& other) noexcept = default;
193+
// constexpr OriginEnc(OriginEnc const& other) noexcept = default;
194+
// constexpr OriginEnc(OriginEnc&& other) noexcept = default;
195+
// constexpr OriginEnc& operator=(OriginEnc const& other) noexcept = default;
196+
// constexpr OriginEnc& operator=(OriginEnc&& other) noexcept = default;
197197

198-
constexpr bool operator==(OriginEnc const& other) const
199-
{
200-
return this->value == other.value;
201-
}
202-
};
198+
// constexpr bool operator==(OriginEnc const& other) const
199+
// {
200+
// return this->value == other.value;
201+
// }
202+
// };
203203

204-
template <template <o2::soa::OriginEnc, typename...> class base, typename derived>
205-
struct is_base_of_template_origin_impl {
206-
template <o2::soa::OriginEnc ORIGIN, typename... Ts>
207-
static constexpr std::true_type test(const base<ORIGIN, Ts...>*);
208-
static constexpr std::false_type test(...);
209-
using type = decltype(test(std::declval<derived*>()));
210-
};
204+
// template <template <o2::soa::OriginEnc, typename...> class base, typename derived>
205+
// struct is_base_of_template_origin_impl {
206+
// template <o2::soa::OriginEnc ORIGIN, typename... Ts>
207+
// static constexpr std::true_type test(const base<ORIGIN, Ts...>*);
208+
// static constexpr std::false_type test(...);
209+
// using type = decltype(test(std::declval<derived*>()));
210+
// };
211211

212-
template <template <o2::soa::OriginEnc, typename...> class base, typename derived>
213-
using is_base_of_template_origin = typename is_base_of_template_origin_impl<base, derived>::type;
212+
// template <template <o2::soa::OriginEnc, typename...> class base, typename derived>
213+
// using is_base_of_template_origin = typename is_base_of_template_origin_impl<base, derived>::type;
214214

215-
template <template <o2::soa::OriginEnc, typename...> class base, typename derived>
216-
inline constexpr bool is_base_of_template_origin_v = is_base_of_template_origin<base, derived>::value;
215+
// template <template <o2::soa::OriginEnc, typename...> class base, typename derived>
216+
// inline constexpr bool is_base_of_template_origin_v = is_base_of_template_origin<base, derived>::value;
217217
} // namespace o2::soa
218218

219-
template <>
220-
struct fmt::formatter<o2::soa::OriginEnc> {
221-
char presentation = 's';
222-
constexpr auto parse(format_parse_context& ctx)
223-
{
224-
auto it = ctx.begin(), end = ctx.end();
225-
if (it != end && (*it == 's')) {
226-
presentation = *it++;
227-
}
219+
// template <>
220+
// struct fmt::formatter<o2::soa::OriginEnc> {
221+
// char presentation = 's';
222+
// constexpr auto parse(format_parse_context& ctx)
223+
// {
224+
// auto it = ctx.begin(), end = ctx.end();
225+
// if (it != end && (*it == 's')) {
226+
// presentation = *it++;
227+
// }
228228

229-
// Check if reached the end of the range:
230-
if (it != end && *it != '}') {
231-
throw format_error("invalid pick format");
232-
}
229+
// // Check if reached the end of the range:
230+
// if (it != end && *it != '}') {
231+
// throw format_error("invalid pick format");
232+
// }
233233

234-
// Return an iterator past the end of the parsed range:
235-
return it;
236-
}
234+
// // Return an iterator past the end of the parsed range:
235+
// return it;
236+
// }
237237

238-
template <typename FormatContext>
239-
auto format(o2::soa::OriginEnc const& origin, FormatContext& ctx)
240-
{
241-
return fmt::format_to(ctx.out(), "{}", (std::string_view)origin);
242-
}
243-
};
238+
// template <typename FormatContext>
239+
// auto format(o2::soa::OriginEnc const& origin, FormatContext& ctx)
240+
// {
241+
// return fmt::format_to(ctx.out(), "{}", (std::string_view)origin);
242+
// }
243+
// };
244244

245245
namespace o2::soa
246246
{
@@ -271,7 +271,7 @@ using is_self_index_t = typename std::conditional_t<self_index_column<C>, std::t
271271

272272
namespace o2::aod
273273
{
274-
DECLARE_SOA_METADATA();
274+
// DECLARE_SOA_METADATA();
275275

276276
template <typename D, typename... Cs>
277277
struct TableMetadata {
@@ -477,8 +477,8 @@ concept spawnable = std::is_same_v<typename T::spawnable_t, std::true_type>;
477477
// template <typename T>
478478
// inline constexpr bool is_soa_extension_table_v<T, std::void_t<decltype(sizeof(typename T::expression_pack_t))>> = true;
479479

480-
template <typename T>
481-
concept extension_table = not_void<typename T::expression_pack_t>;
480+
// template <typename T>
481+
// concept extension_table = not_void<typename T::expression_pack_t>;
482482

483483
// template <typename T, typename = void>
484484
// inline constexpr bool is_index_table_v = false;
@@ -508,40 +508,40 @@ constexpr bool is_index_equivalent_v = EquivalentIndex<B, E>::value || Equivalen
508508
template <aod::aod_hash A, aod::aod_hash B>
509509
constexpr bool is_ng_index_equivalent_v = EquivalentIndexNG<A, B>::value || EquivalentIndexNG<B, A>::value;
510510

511-
template <typename H, typename... T>
512-
consteval decltype(auto) make_originals_from_type()
513-
{
514-
using decayed = std::decay_t<H>;
515-
if constexpr (sizeof...(T) == 0) {
516-
if constexpr (is_type_with_originals_v<decayed>) {
517-
return typename decayed::originals{};
518-
} else if constexpr (is_type_with_originals_v<typename decayed::table_t>) {
519-
return typename decayed::table_t::originals{};
520-
} else if constexpr (is_type_with_parent_v<decayed>) {
521-
return make_originals_from_type<typename decayed::parent_t>();
522-
} else {
523-
return framework::pack<decayed>{};
524-
}
525-
} else if constexpr (is_type_with_originals_v<decayed>) {
526-
return framework::concatenate_pack(typename decayed::originals{}, make_originals_from_type<T...>());
527-
} else if constexpr (is_type_with_originals_v<typename decayed::table_t>) {
528-
return framework::concatenate_pack(typename decayed::table_t::originals{}, make_originals_from_type<T...>());
529-
} else {
530-
return framework::concatenate_pack(framework::pack<decayed>{}, make_originals_from_type<T...>());
531-
}
532-
}
511+
// template <typename H, typename... T>
512+
// consteval decltype(auto) make_originals_from_type()
513+
// {
514+
// using decayed = std::decay_t<H>;
515+
// if constexpr (sizeof...(T) == 0) {
516+
// if constexpr (is_type_with_originals_v<decayed>) {
517+
// return typename decayed::originals{};
518+
// } else if constexpr (is_type_with_originals_v<typename decayed::table_t>) {
519+
// return typename decayed::table_t::originals{};
520+
// } else if constexpr (is_type_with_parent_v<decayed>) {
521+
// return make_originals_from_type<typename decayed::parent_t>();
522+
// } else {
523+
// return framework::pack<decayed>{};
524+
// }
525+
// } else if constexpr (is_type_with_originals_v<decayed>) {
526+
// return framework::concatenate_pack(typename decayed::originals{}, make_originals_from_type<T...>());
527+
// } else if constexpr (is_type_with_originals_v<typename decayed::table_t>) {
528+
// return framework::concatenate_pack(typename decayed::table_t::originals{}, make_originals_from_type<T...>());
529+
// } else {
530+
// return framework::concatenate_pack(framework::pack<decayed>{}, make_originals_from_type<T...>());
531+
// }
532+
// }
533533

534-
template <typename... T>
535-
consteval decltype(auto) make_originals_from_type(framework::pack<T...> p)
536-
{
537-
if constexpr (sizeof...(T) == 0) {
538-
return framework::pack<>{};
539-
} else {
540-
return []<typename H, typename... Ta>(framework::pack<H, Ta...>) {
541-
return make_originals_from_type<H, Ta...>();
542-
}(p);
543-
}
544-
}
534+
// template <typename... T>
535+
// consteval decltype(auto) make_originals_from_type(framework::pack<T...> p)
536+
// {
537+
// if constexpr (sizeof...(T) == 0) {
538+
// return framework::pack<>{};
539+
// } else {
540+
// return []<typename H, typename... Ta>(framework::pack<H, Ta...>) {
541+
// return make_originals_from_type<H, Ta...>();
542+
// }(p);
543+
// }
544+
// }
545545

546546
/// Policy class for columns which are chunked. This
547547
/// will make the compiler take the most generic (and
@@ -1552,17 +1552,17 @@ constexpr bool are_bindings_compatible_v(framework::pack<Os...>&&)
15521552
template <typename T>
15531553
concept ng_table = framework::is_base_of_template_v<soa::TableNG, T>;
15541554

1555-
/// special case for the template with origin
1556-
template <typename T, template <OriginEnc, typename...> class Ref>
1557-
struct is_specialization_origin : std::false_type {
1558-
};
1555+
// /// special case for the template with origin
1556+
// template <typename T, template <OriginEnc, typename...> class Ref>
1557+
// struct is_specialization_origin : std::false_type {
1558+
// };
15591559

1560-
template <template <OriginEnc, typename...> class Ref, OriginEnc ORIGIN, typename... Args>
1561-
struct is_specialization_origin<Ref<ORIGIN, Args...>, Ref> : std::true_type {
1562-
};
1560+
// template <template <OriginEnc, typename...> class Ref, OriginEnc ORIGIN, typename... Args>
1561+
// struct is_specialization_origin<Ref<ORIGIN, Args...>, Ref> : std::true_type {
1562+
// };
15631563

1564-
template <typename T, template <OriginEnc, typename...> class Ref>
1565-
inline constexpr bool is_specialization_origin_v = is_specialization_origin<T, Ref>::value;
1564+
// template <typename T, template <OriginEnc, typename...> class Ref>
1565+
// inline constexpr bool is_specialization_origin_v = is_specialization_origin<T, Ref>::value;
15661566

15671567
//! Helper to check if a type T is an iterator
15681568
// template <typename T>
@@ -3087,18 +3087,18 @@ O2ORIGIN("TEST");
30873087
O2HASH("TEST/0");
30883088
} // namespace o2::aod
30893089

3090-
#define DECLARE_SOA_VERSIONING() \
3091-
template <typename T> \
3092-
consteval int getVersion() \
3093-
{ \
3094-
if constexpr (o2::soa::has_metadata<T>) { \
3095-
return MetadataTrait<T>::metadata::version(); \
3096-
} else if constexpr (o2::soa::is_type_with_originals_v<T>) { \
3097-
return MetadataTrait<o2::framework::pack_head_t<typename T::originals>>::metadata::version(); \
3098-
} else { \
3099-
static_assert(o2::framework::always_static_assert_v<T>, "Not a versioned type"); \
3100-
} \
3101-
}
3090+
#define DECLARE_SOA_VERSIONING()
3091+
// template <typename T> \
3092+
// consteval int getVersion() \
3093+
// { \
3094+
// if constexpr (o2::soa::has_metadata<T>) { \
3095+
// return MetadataTrait<T>::metadata::version(); \
3096+
// } else if constexpr (o2::soa::is_type_with_originals_v<T>) { \
3097+
// return MetadataTrait<o2::framework::pack_head_t<typename T::originals>>::metadata::version(); \
3098+
// } else { \
3099+
// static_assert(o2::framework::always_static_assert_v<T>, "Not a versioned type"); \
3100+
// } \
3101+
// }
31023102

31033103
#define DECLARE_EQUIVALENT_FOR_INDEX(_Base_, _Equiv_) \
31043104
template <> \

Framework/Core/include/Framework/AnalysisManagers.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,11 @@ static inline auto doExtractOriginal(framework::pack<Ts...>, ProcessingContext&
483483
}
484484
}
485485

486-
template <typename O>
487-
static inline auto extractOriginalJoined(ProcessingContext& pc)
488-
{
489-
return o2::soa::ArrowHelpers::joinTables({doExtractOriginal(soa::make_originals_from_type<O>(), pc)});
490-
}
486+
// template <typename O>
487+
// static inline auto extractOriginalJoined(ProcessingContext& pc)
488+
// {
489+
// return o2::soa::ArrowHelpers::joinTables({doExtractOriginal(soa::make_originals_from_type<O>(), pc)});
490+
// }
491491

492492
template <typename... Os>
493493
static inline auto extractOriginalsVector(framework::pack<Os...>, ProcessingContext& pc)

Framework/Core/include/Framework/AnalysisTask.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ struct AnalysisDataProcessorBuilder {
8282
return soa::tableRef2ConfigParamSpec<R>();
8383
}
8484

85-
template <typename... T>
86-
static inline std::vector<ConfigParamSpec> getInputSpecs(framework::pack<T...>)
87-
{
88-
return std::vector{getSpec<T>()...};
89-
}
85+
// template <typename... T>
86+
// static inline std::vector<ConfigParamSpec> getInputSpecs(framework::pack<T...>)
87+
// {
88+
// return std::vector{getSpec<T>()...};
89+
// }
9090

9191
// template <typename T>
9292
// static inline auto getSources() requires soa::is_soa_index_table_v<std::decay_t<T>>

Framework/Core/src/AODReaderHelpers.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ static inline auto doExtractOriginal(framework::pack<Ts...>, ProcessingContext&
6565
}
6666
}
6767

68-
template <typename O>
69-
static inline auto extractTypedOriginal(ProcessingContext& pc)
70-
{
71-
return O{doExtractOriginal(soa::make_originals_from_type<O>(), pc)};
72-
}
73-
74-
template <typename O>
75-
static inline auto extractOriginal(ProcessingContext& pc)
76-
{
77-
return o2::soa::ArrowHelpers::joinTables({doExtractOriginal(soa::make_originals_from_type<O>(), pc)});
78-
}
68+
// template <typename O>
69+
// static inline auto extractTypedOriginal(ProcessingContext& pc)
70+
// {
71+
// return O{doExtractOriginal(soa::make_originals_from_type<O>(), pc)};
72+
// }
73+
74+
// template <typename O>
75+
// static inline auto extractOriginal(ProcessingContext& pc)
76+
// {
77+
// return o2::soa::ArrowHelpers::joinTables({doExtractOriginal(soa::make_originals_from_type<O>(), pc)});
78+
// }
7979

8080
template <typename... Os>
8181
static inline auto extractOriginalsTuple(framework::pack<Os...>, ProcessingContext& pc)

0 commit comments

Comments
 (0)