Skip to content

Commit 817ed2a

Browse files
authored
Revert "PWGMM: Mult: use concepts instead of functions (#5573)" (#5586)
This reverts commit 2dc5272.
1 parent 9638f83 commit 817ed2a

File tree

2 files changed

+77
-71
lines changed

2 files changed

+77
-71
lines changed

PWGMM/Mult/Core/include/Functions.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,26 @@ namespace pwgmm::mult
1717
{
1818
using namespace o2;
1919

20-
// clang-format off
20+
// helper function to determine if collision/mccollison type contains centrality
2121
template <typename T>
22-
concept hasSimCent = (T*) //NOLINT
22+
static constexpr bool hasSimCent()
2323
{
24-
requires {T::template contains<aod::HepMCHeavyIons>();}
25-
};
24+
if constexpr (!soa::is_soa_join_v<T>) {
25+
return false;
26+
} else {
27+
return T::template contains<aod::HepMCHeavyIons>();
28+
}
29+
}
2630

2731
template <typename T>
28-
concept hasRecoCent = (T*) //NOLINT
32+
static constexpr bool hasRecoCent()
2933
{
30-
requires {T::template contains<aod::CentFT0Cs>() || T::template contains<aod::CentFT0Ms>();}
31-
};
32-
33-
//clang-format on
34+
if constexpr (!soa::is_soa_join_v<T>) {
35+
return false;
36+
} else {
37+
return T::template contains<aod::CentFT0Cs>() || T::template contains<aod::CentFT0Ms>();
38+
}
39+
}
3440
} // namespace pwgmm::mult
3541

3642
#endif // PWGMM_MULT_CORE_INCLUDE_FUNCTIONS_H_

0 commit comments

Comments
 (0)