ATLAS Offline Software
Loading...
Searching...
No Matches
supportsThinning.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4 */
20
21
22#ifndef ATHCONTAINERS_SUPPORTSTHINNING_H
23#define ATHCONTAINERS_SUPPORTSTHINNING_H
24
25
29#include <type_traits>
30
31
32namespace SG {
33
34
41template <class T>
43
44 constexpr bool isxAODInterfaceObject =
45 std::derived_from<T, SG::AuxVectorBase> ||
46 std::derived_from<T, SG::AuxElement>;
47
48 if constexpr (isxAODInterfaceObject)
49 return T::supportsThinning;
50 else
51 return false;
52}
53
54
63template <class T>
64inline constexpr bool is_xAODStoreObject_v =
65 std::is_base_of_v<SG::IAuxStore, T>;
66template <class T,
67 typename std::enable_if_t<is_xAODStoreObject_v<T> >* = nullptr>
68bool constexpr xAODStoreSupportingThinning () { return T::supportsThinning; }
69template <class T,
70 typename std::enable_if_t<!is_xAODStoreObject_v<T> >* = nullptr>
71bool constexpr xAODStoreSupportingThinning () { return false; }
72
73
74} // namespace SG
75
76
77#endif // not ATHCONTAINERS_SUPPORTSTHINNING_H
Base class for elements of a container that can have aux data.
Manage index tracking and synchronization of auxiliary data.
Interface for non-const operations on an auxiliary store.
Forward declaration.
constexpr bool is_xAODStoreObject_v
Test for an xAOD auxiliary store class supporting thinning.
bool constexpr xAODInterfaceSupportingThinning()
Test for an xAOD interface class supporting thinning.
bool constexpr xAODStoreSupportingThinning()