ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthContainersInterfaces
AthContainersInterfaces
ToTransient.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
*/
11
12
13
#ifndef ATHCONTAINERSINTERFACES_TOTRANSIENT_H
14
#define ATHCONTAINERSINTERFACES_TOTRANSIENT_H
15
16
17
class
EventContext;
18
19
20
namespace
SG
{
21
22
38
template
<
class
T>
39
class
ToTransient
40
{
41
public
:
44
using
noToTransient
= int;
45
46
47
/*
48
* @brief Do post-read processing for object @c o.
49
* @param o The object that was just read.
50
*
51
* The default implementation is a no-op.
52
*/
53
static
void
toTransient
(T&
/*o*/
)
54
{
55
}
56
57
58
/*
59
* @brief Do post-read processing for object @c o.
60
* @param o The object that was just read.
61
* @param ctx The current event context.
62
*
63
* The default implementation is a no-op.
64
*/
65
static
void
toTransient
(T&
/*o*/
,
const
EventContext&
/*ctx*/
)
66
{
67
}
68
};
69
70
71
template
<
class
T,
class
U>
72
constexpr
73
bool
noToTransient1
(U) {
return
false
; }
74
template
<
class
T>
75
constexpr
76
bool
noToTransient1
(
int
,
typename
T::noToTransient =
typename
T::noToTransient()) {
return
true
; }
77
78
82
template
<
class
T>
83
constexpr
84
bool
noToTransient
() {
return
noToTransient1<ToTransient<T>
> (123); }
85
86
87
}
// namespace SG
88
89
90
#endif
// not ATHCONTAINERSINTERFACES_TOTRANSIENT_H
SG::ToTransient
Define a hook for running code after an object has been read.
Definition
ToTransient.h:40
SG::ToTransient::toTransient
static void toTransient(T &, const EventContext &)
Definition
ToTransient.h:65
SG::ToTransient::noToTransient
int noToTransient
This definition flags that we can skip actually calling toTransient for this type.
Definition
ToTransient.h:44
SG::ToTransient::toTransient
static void toTransient(T &)
Definition
ToTransient.h:53
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::noToTransient
constexpr bool noToTransient()
Helper to test if T::noToTransient exists as a typedef.
Definition
ToTransient.h:84
SG::noToTransient1
constexpr bool noToTransient1(U)
Definition
ToTransient.h:73
Generated on
for ATLAS Offline Software by
1.17.0