ATLAS Offline Software
AuxStore_traits.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 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
33 #ifndef ATHCONTAINERSINTERFACES_AUXSTORE_TRAITS_H
34 #define ATHCONTAINERSINTERFACES_AUXSTORE_TRAITS_H
35 
36 
40 
41 
42 # include <type_traits>
43 #include <string>
44 
45 
46 
47 namespace SG {
48 
49 
53 class NoAuxStore {};
54 
55 
58 {
59  typedef std::true_type flag;
60 
61  typedef IAuxStore type;
62  static const std::string& typeName()
63  {
64  static const std::string name ("SG::IAuxStore");
65  return name;
66  }
67 
69  static const std::string& const_typeName()
70  {
71  static const std::string name ("SG::IConstAuxStore");
72  return name;
73  }
74 };
75 
76 
79 {
80  typedef std::false_type flag;
81 
82  typedef NoAuxStore type;
83  static const std::string& typeName()
84  {
85  static const std::string name ("SG::NoAuxStore");
86  return name;
87  }
88 
90  static const std::string& const_typeName()
91  {
92  static const std::string name ("SG::NoAuxStore");
93  return name;
94  }
95 };
96 
97 
100 template <class DOBJ, class FLAG_>
102 {
103  typedef typename std::conditional<
108 };
109 
110 
119 template <class DOBJ>
120 struct AuxStore_traits1<DOBJ,
121  typename std::is_base_of<
122  IAuxElement, typename DOBJ::base_value_type>::type>
123 {
125 };
126 
127 
135 template <class DOBJ>
137  : public AuxStore_traits1<DOBJ, std::true_type>::type
138 {
145 };
146 
147 
153 template <class DOBJ>
154 struct AuxStore_traits<DOBJ*> : public AuxStore_traits<DOBJ> {};
155 
156 
157 
158 } // namespace SG
159 
160 
161 #endif // not ATHCONTAINERSINTERFACES_AUXSTORE_TRAITS_H
SG::AuxStore_traits_AuxDefault::const_type
IConstAuxStore const_type
Definition: AuxStore_traits.h:68
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
IAuxElement.h
Flag that a class may have auxiliary data associated with it.
SG::AuxStore_traits_AuxDefault::typeName
static const std::string & typeName()
Definition: AuxStore_traits.h:62
SG::AuxStore_traits
Associate AuxStore classes with EDM container classes (default implementation).
Definition: AuxStore_traits.h:138
SG::AuxStore_traits_NoAuxDefault
Default traits values for no-aux data case.
Definition: AuxStore_traits.h:79
SG::AuxStore_traits_NoAuxDefault::typeName
static const std::string & typeName()
Definition: AuxStore_traits.h:83
athena.value
value
Definition: athena.py:122
SG::AuxStore_traits_NoAuxDefault::const_type
NoAuxStore const_type
Definition: AuxStore_traits.h:89
SG::AuxStore_traits1
Helper for the case where DOBJ::base_value_type does not derive from SG::IAuxElement.
Definition: AuxStore_traits.h:102
SG::AuxStore_traits_AuxDefault::type
IAuxStore type
Definition: AuxStore_traits.h:61
SG::NoAuxStore
Mark that there's no associated AuxStore class.
Definition: AuxStore_traits.h:53
SG::AuxStore_traits_NoAuxDefault::flag
std::false_type flag
Definition: AuxStore_traits.h:80
SG::AuxStore_traits_AuxDefault::flag
std::true_type flag
Definition: AuxStore_traits.h:59
SG::AuxStore_traits1< DOBJ, typename std::is_base_of< IAuxElement, typename DOBJ::base_value_type >::type >::type
AuxStore_traits_AuxDefault type
Definition: AuxStore_traits.h:124
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
python.Dumpers.typename
def typename(t)
Definition: Dumpers.py:194
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
SG::AuxStore_traits_NoAuxDefault::type
NoAuxStore type
Definition: AuxStore_traits.h:82
SG::AuxStore_traits_AuxDefault
Default traits values for aux data case.
Definition: AuxStore_traits.h:58
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IAuxStore.h
Interface for non-const operations on an auxiliary store.
SG::AuxStore_traits_AuxDefault::const_typeName
static const std::string & const_typeName()
Definition: AuxStore_traits.h:69
IConstAuxStore.h
Interface for const operations on an auxiliary store.
SG::IConstAuxStore
Interface for const operations on an auxiliary store.
Definition: IConstAuxStore.h:64
SG::AuxStore_traits1::type
std::conditional< std::is_base_of< IAuxElement, DOBJ >::value, AuxStore_traits_AuxDefault, AuxStore_traits_NoAuxDefault >::type type
Definition: AuxStore_traits.h:107
SG::AuxStore_traits_NoAuxDefault::const_typeName
static const std::string & const_typeName()
Definition: AuxStore_traits.h:90