ATLAS Offline Software
Control
AthenaBaseComps
AthenaBaseComps
HandleClassifier.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-2017 CERN for the benefit of the ATLAS collaboration.
4
*/
5
// $Id$
14
#ifndef ATHENABASECOMPS_HANDLECLASSIFIER_H
15
#define ATHENABASECOMPS_HANDLECLASSIFIER_H
16
17
18
#include "
StoreGate/VarHandleBase.h
"
19
#include "
StoreGate/VarHandleKey.h
"
20
#include "
StoreGate/VarHandleKeyArray.h
"
21
#include <type_traits>
22
23
24
namespace
SG
{
25
26
27
// Tags to describe the type of a handle property.
28
class
VarHandleType
{};
29
class
VarHandleKeyType
{};
30
class
VarHandleKeyArrayType
{};
31
class
NotHandleType
{};
32
33
40
template
<
class
T>
41
struct
HandleClassifier
42
{
43
typedef
typename
std::conditional<std::is_base_of<SG::VarHandleBase, T>::value
,
44
VarHandleType
,
45
NotHandleType
>
::type
type1
;
46
47
typedef
typename
std::conditional<std::is_base_of<SG::VarHandleKey, T>::value
,
48
VarHandleKeyType
,
49
type1
>
::type
type2
;
50
51
52
typedef
typename
std::conditional<std::is_base_of<SG::VarHandleKeyArray, T>::value
,
53
VarHandleKeyArrayType
,
54
type2
>
::type
type
;
55
};
56
57
58
}
// namespace SG
59
60
61
#endif // not ATHENABASECOMPS_HANDLECLASSIFIER_H
VarHandleBase.h
Base class for VarHandle classes.
VarHandleKey.h
A property holding a SG store/key/clid from which a VarHandle is made.
SG
Forward declaration.
Definition:
CaloCellPacker_400_500.h:32
SG::VarHandleType
Definition:
HandleClassifier.h:28
VarHandleKeyArray.h
Base class for VarHandleKeyArray for reading from StoreGate.
athena.value
value
Definition:
athena.py:124
SG::HandleClassifier::type1
std::conditional< std::is_base_of< SG::VarHandleBase, T >::value, VarHandleType, NotHandleType >::type type1
Definition:
HandleClassifier.h:45
SG::HandleClassifier::type2
std::conditional< std::is_base_of< SG::VarHandleKey, T >::value, VarHandleKeyType, type1 >::type type2
Definition:
HandleClassifier.h:49
SG::NotHandleType
Definition:
HandleClassifier.h:31
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition:
HandleClassifier.h:54
SG::VarHandleKeyType
Definition:
HandleClassifier.h:29
SG::HandleClassifier
Helper to classify the type of a handle property.
Definition:
HandleClassifier.h:42
SG::VarHandleKeyArrayType
Definition:
HandleClassifier.h:30
Generated on Thu Nov 7 2024 21:16:03 for ATLAS Offline Software by
1.8.18