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-2019 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
43template <class T>
44inline constexpr bool is_xAODInterfaceObject_v =
45 std::is_base_of_v<SG::AuxVectorBase, T> || std::is_base_of_v<SG::AuxElement, T>;
46template <class T,
47 typename std::enable_if_t<is_xAODInterfaceObject_v<T> >* = nullptr>
48bool constexpr xAODInterfaceSupportingThinning () { return T::supportsThinning; }
49template <class T,
50 typename std::enable_if_t<!is_xAODInterfaceObject_v<T> >* = nullptr>
51bool constexpr xAODInterfaceSupportingThinning () { return false; }
52
53
62template <class T>
63inline constexpr bool is_xAODStoreObject_v =
64 std::is_base_of_v<SG::IAuxStore, T>;
65template <class T,
66 typename std::enable_if_t<is_xAODStoreObject_v<T> >* = nullptr>
67bool constexpr xAODStoreSupportingThinning () { return T::supportsThinning; }
68template <class T,
69 typename std::enable_if_t<!is_xAODStoreObject_v<T> >* = nullptr>
70bool constexpr xAODStoreSupportingThinning () { return false; }
71
72
73} // namespace SG
74
75
76#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()
constexpr bool is_xAODInterfaceObject_v
Test for an xAOD interface class supporting thinning.
bool constexpr xAODStoreSupportingThinning()