Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Concepts Namespace Reference

Namespaces

namespace  Linearizer
 
namespace  SourceLinkAccessor
 
namespace  Stepper
 
namespace  VertexFinder
 
namespace  VertexFitter
 

Classes

struct  BoundTrackParametersConceptImpl
 
struct  FreeTrackParametersConceptImpl
 

Typedefs

template<typename T >
using TypeScalar = typename T::Scalar
 
template<typename T >
using TypeParametersVector = typename T::ParametersVector
 
template<typename T >
using TypeCovarianceMatrix = typename T::CovarianceMatrix
 
template<typename T >
using ReturnTypeParameters = decltype(std::declval< T >().parameters())
 
template<typename T >
using ReturnTypeCovariance = decltype(std::declval< T >().covariance())
 
template<typename T >
using ReturnTypeFourPositionFromContext = decltype(std::declval< T >().fourPosition(std::declval< GeometryContext >()))
 
template<typename T >
using ReturnTypeFourPosition = decltype(std::declval< T >().fourPosition())
 
template<typename T >
using ReturnTypePositionFromContext = decltype(std::declval< T >().position(std::declval< GeometryContext >()))
 
template<typename T >
using ReturnTypePosition = decltype(std::declval< T >().position())
 
template<typename T >
using ReturnTypeTime = decltype(std::declval< T >().time())
 
template<typename T >
using ReturnTypeDirection = decltype(std::declval< T >().direction())
 
template<typename T >
using ReturnTypeAbsoluteMomentum = decltype(std::declval< T >().absoluteMomentum())
 
template<typename T >
using ReturnTypeCharge = decltype(std::declval< T >().charge())
 
template<typename T >
using ReturnTypeReferenceSurface = decltype(std::declval< T >().referenceSurface())
 
template<template< class...> class Op, class... Args>
using is_detected = typename detail::detector< detail::nonesuch, void, Op, Args...>::value_t
 
template<template< class...> class Op, class... Args>
using detected_t = typename detail::detector< detail::nonesuch, void, Op, Args...>::type
 
template<class Expected , template< class...> class Op, class... Args>
using is_detected_exact = std::is_same< Expected, detected_t< Op, Args...>>
 
template<class To , template< class...> class Op, class... Args>
using is_detected_convertible = std::is_convertible< detected_t< Op, Args...>, To >
 
template<class Default , template< class...> class Op, class... Args>
using detected_or = detail::detector< Default, void, Op, Args...>
 

Variables

template<typename parameters_t >
constexpr bool BoundTrackParametersConcept
 
template<typename parameters_t >
constexpr bool FreeTrackParametersConcept
 
template<bool... Bs>
constexpr bool require = std::conjunction<std::bool_constant<Bs>...>::value
 
template<bool... Bs>
constexpr bool either = std::disjunction<std::bool_constant<Bs>...>::value
 
template<bool... Bs>
constexpr bool disallow = not require<Bs...>
 
template<template< class...> class Op, class... Args>
constexpr bool exists = is_detected<Op, Args...>::value
 
template<class To , template< class...> class Op, class... Args>
constexpr bool converts_to = is_detected_convertible<To, Op, Args...>::value
 
template<class Exact , template< class...> class Op, class... Args>
constexpr bool identical_to = is_detected_exact<Exact, Op, Args...>::value
 
template<typename T , typename R , template< class...> class M, typename... Arguments>
constexpr bool has_method = M<T, R, Arguments...>::template tv<T>::value
 
template<typename T , template< class...> class M, typename V >
constexpr bool has_member = identical_to<V, M, T>
 

Typedef Documentation

template<class Default , template< class...> class Op, class... Args>
using Acts::Concepts::detected_or = typedef detail::detector<Default, void, Op, Args...>

Helper which invokes the detector with a default type, and resolves to the type.

Template Parameters
DefaultThe type to resolve to if Op<Args...> does not resolve.
OpThe operation
ArgsThe argument to the operation

Definition at line 122 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 122 of file TypeTraits.hpp

template<template< class...> class Op, class... Args>
using Acts::Concepts::detected_t = typedef typename detail::detector<detail::nonesuch, void, Op, Args...>::type

This type calls into the detector (same as is_detected) but it extracts the return type of Op<Args...>.

Template Parameters
OpThe operation
ArgsThe arguments to the operation

Definition at line 96 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 96 of file TypeTraits.hpp

template<template< class...> class Op, class... Args>
using Acts::Concepts::is_detected = typedef typename detail::detector<detail::nonesuch, void, Op, Args...>::value_t

This type ties together the detection idiom. It instantiates the detector template with the Op and Args and resolves to the exact value type. In essence, if Op<Args...> succeeds, this will evaluate to std::true_type, and if not, it will evaluate to std::false_type.

Template Parameters
OpThe operation to test
ArgsThe arguments to the operation

Definition at line 88 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 88 of file TypeTraits.hpp

template<class To , template< class...> class Op, class... Args>
using Acts::Concepts::is_detected_convertible = typedef std::is_convertible<detected_t<Op, Args...>, To>

This evaluates Op inside the detector, and checks whether the resolved type is convertible to To.

Template Parameters
ToThe type to check convertibility to.
OpThe operation
ArgsThe arguments to the operation

Definition at line 114 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 114 of file TypeTraits.hpp

template<class Expected , template< class...> class Op, class... Args>
using Acts::Concepts::is_detected_exact = typedef std::is_same<Expected, detected_t<Op, Args...>>

This invokes detected_t, and checks whether its result matches Expected.

Template Parameters
ExpectedThe expected result of the operation.
OpThe operation
ArgsThe arguments to the operation

Definition at line 104 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 104 of file TypeTraits.hpp

template<typename T >
using Acts::Concepts::ReturnTypeAbsoluteMomentum = typedef decltype(std::declval<T>().absoluteMomentum())

Definition at line 53 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 53 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypeCharge = typedef decltype(std::declval<T>().charge())

Definition at line 55 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 55 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypeCovariance = typedef decltype(std::declval<T>().covariance())

Definition at line 36 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 36 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypeDirection = typedef decltype(std::declval<T>().direction())

Definition at line 50 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 50 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypeFourPosition = typedef decltype(std::declval<T>().fourPosition())

Definition at line 41 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 41 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypeFourPositionFromContext = typedef decltype(std::declval<T>().fourPosition(std::declval<GeometryContext>()))

Definition at line 39 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 39 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypeParameters = typedef decltype(std::declval<T>().parameters())

Definition at line 34 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 34 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypePosition = typedef decltype(std::declval<T>().position())

Definition at line 46 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 46 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypePositionFromContext = typedef decltype(std::declval<T>().position(std::declval<GeometryContext>()))

Definition at line 44 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 44 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypeReferenceSurface = typedef decltype(std::declval<T>().referenceSurface())

Definition at line 58 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 58 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::ReturnTypeTime = typedef decltype(std::declval<T>().time())

Definition at line 48 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 48 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::TypeCovarianceMatrix = typedef typename T::CovarianceMatrix

Definition at line 31 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 31 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::TypeParametersVector = typedef typename T::ParametersVector

Definition at line 29 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 29 of file TrackParametersConcept.hpp

template<typename T >
using Acts::Concepts::TypeScalar = typedef typename T::Scalar

Definition at line 27 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 27 of file TrackParametersConcept.hpp

Variable Documentation

template<typename parameters_t >
constexpr bool Acts::Concepts::BoundTrackParametersConcept
Initial value:

Definition at line 167 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 167 of file TrackParametersConcept.hpp

template<class To , template< class...> class Op, class... Args>
constexpr bool Acts::Concepts::converts_to = is_detected_convertible<To, Op, Args...>::value

Alias to conversion check, which also extracts the constexpr boolean value.

Template Parameters
ToThe type to check convertibility to.
OpThe operation
ArgsThe arguments to the operation.

Definition at line 156 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 156 of file TypeTraits.hpp

template<bool... Bs>
constexpr bool Acts::Concepts::disallow = not require<Bs...>

Alias for the negation of a require. This is essentially a NOT ANY test.

Template Parameters
BsThe booleans.

Definition at line 143 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 143 of file TypeTraits.hpp

template<bool... Bs>
constexpr bool Acts::Concepts::either = std::disjunction<std::bool_constant<Bs>...>::value

Helper which forms the logical OR of its arguments. Converts to std::bool_constant.

Template Parameters
BsThe booleans to combine.

Definition at line 138 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 138 of file TypeTraits.hpp

template<typename parameters_t >
constexpr bool Acts::Concepts::FreeTrackParametersConcept
Initial value:

Definition at line 171 of file TrackParametersConcept.hpp.

View newest version in sPHENIX GitHub at line 171 of file TrackParametersConcept.hpp

template<typename T , template< class...> class M, typename V >
constexpr bool Acts::Concepts::has_member = identical_to<V, M, T>

Helper to assert if a member of a given type exists. Basically only calls into identical_to but is nicer to read.

Template Parameters
TThe type to check existence of member on.
MThe member type trait
VThe type that the member is supposed to have.

Definition at line 182 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 182 of file TypeTraits.hpp

template<typename T , typename R , template< class...> class M, typename... Arguments>
constexpr bool Acts::Concepts::has_method = M<T, R, Arguments...>::template tv<T>::value

Helper which evaluates whether the type T has a method with a given signature.

Template Parameters
TThe type to check on. This can contain a const qualifier if you want to check on that.
RThe return type
MThe method trait, as generated by METHOD_TRAIT
ArgumentsThe argument types that make up the signature.

Definition at line 174 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 174 of file TypeTraits.hpp

Referenced by Acts::Propagator< stepper_t, navigator_t >::propagate().

template<class Exact , template< class...> class Op, class... Args>
constexpr bool Acts::Concepts::identical_to = is_detected_exact<Exact, Op, Args...>::value

Unpacks the constexpr boolean value from is_detected_exact

Template Parameters
ExactThe type to check identity against
OpThe operation
ArgsThe arguments to the operation.

Definition at line 163 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 163 of file TypeTraits.hpp

template<bool... Bs>
constexpr bool Acts::Concepts::require = std::conjunction<std::bool_constant<Bs>...>::value

Define some sort of "Domain Specific Language" to declare concepts a little more naturally. These are taken from https://izzys.casa/2016/09/implementing-concepts-in-cxx/ Helper which combines a set of predicates (constexpr bools) with a logical AND. Converts to std::bool_constant.

Template Parameters
BsThe booleans to combine

Definition at line 132 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 132 of file TypeTraits.hpp

Referenced by SColdQcdCorrelatorAnalysis::SCorrelatorJetTree::SetRequireSiSeeds().