The Gaudi Framework
master (f31105fd)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
q
r
s
t
v
Enumerator
a
b
c
d
e
f
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Properties
Related Functions
:
a
b
c
d
e
g
h
i
m
o
p
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
b
c
e
f
g
h
i
l
m
n
o
p
r
s
t
u
z
Variables
a
b
c
d
e
g
h
i
m
o
p
q
r
s
t
v
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
c
e
f
p
u
v
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
utilities.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/DataObjectHandle.h
>
14
#include <
GaudiKernel/SerializeSTL.h
>
15
#include <boost/algorithm/string/join.hpp>
16
17
namespace
Gaudi::Functional
{
18
19
namespace
Traits {
20
21
// traits classes used to customize Transformer and FilterPredicate
22
// Define the types to to be used as baseclass, and as in- resp. output hanldes.
23
// In case a type is not specified in the traits struct, a default is used.
24
//
25
// The defaults are:
26
//
27
// using BaseClass = Gaudi::Algorithm
28
// template <typename T> using InputHandle = DataObjectHandle<T>;
29
// template <typename T> using OutputHandle = DataObjectHandle<T>;
30
//
31
32
// the best way to 'compose' traits is by inheriting them one-by-one...
33
template
<
typename
... Base>
34
struct
use_
: Base... {};
35
36
// helper classes one can inherit from to specify a specific trait
37
template
<
typename
Base>
38
struct
BaseClass_t
{
39
using
BaseClass
= Base;
40
};
41
42
template
<
template
<
typename
>
class
Handle>
43
struct
InputHandle_t
{
44
template
<
typename
T>
45
using
InputHandle
= Handle<T>;
46
};
47
48
template
<
template
<
typename
>
class
Handle>
49
struct
OutputHandle_t
{
50
template
<
typename
T>
51
using
OutputHandle
= Handle<T>;
52
};
53
54
template
<
typename
Data,
typename
View>
55
struct
writeViewFor
{
56
template
<std::same_as<Data> T>
57
using
OutputHandle
=
DataObjectWriteHandle<View, Data>
;
58
};
59
60
// add support for objects that should reside in the TES for lifetime management, but should not
61
// be used explicitly and/or directly by downstream code.
62
template
<
typename
Data>
63
struct
WriteOpaqueFor
{
64
struct
OpaqueView
{
65
OpaqueView
() =
default
;
66
template
<
typename
T>
67
OpaqueView
( T
const
& ) {}
68
};
69
70
template
<std::same_as<Data> T>
71
using
OutputHandle
=
DataObjectWriteHandle<OpaqueView, Data>
;
72
};
73
74
// this uses the defaults -- and it itself is the default ;-)
75
using
useDefaults
=
use_<>
;
76
}
// namespace Traits
77
}
// namespace Gaudi::Functional
DataObjectWriteHandle
Definition:
DataObjectHandle.h:470
Gaudi::Functional::Traits::OutputHandle_t::OutputHandle
Handle< T > OutputHandle
Definition:
utilities.h:51
Gaudi::Functional::Traits::WriteOpaqueFor
Definition:
utilities.h:63
Gaudi::Functional::Traits::WriteOpaqueFor::OpaqueView
Definition:
utilities.h:64
Gaudi::Functional::Traits::OutputHandle_t
Definition:
utilities.h:49
Gaudi::Functional::Traits::use_
Definition:
utilities.h:34
Gaudi::Functional
Definition:
Consumer.h:19
Gaudi::Functional::Traits::WriteOpaqueFor::OpaqueView::OpaqueView
OpaqueView(T const &)
Definition:
utilities.h:67
Gaudi::Functional::Traits::InputHandle_t::InputHandle
Handle< T > InputHandle
Definition:
utilities.h:45
Gaudi::Functional::Traits::BaseClass_t
Definition:
utilities.h:38
Gaudi::Functional::Traits::writeViewFor
Definition:
utilities.h:55
SerializeSTL.h
Gaudi::Functional::Traits::BaseClass_t::BaseClass
Base BaseClass
Definition:
utilities.h:39
DataObjectHandle.h
Gaudi::Functional::Traits::InputHandle_t
Definition:
utilities.h:43
Gaudi::Functional::Traits::WriteOpaqueFor::OpaqueView::OpaqueView
OpaqueView()=default
GaudiFunctional
include
Gaudi
Functional
utilities.h
Generated on Mon Apr 7 2025 16:26:21 for The Gaudi Framework by
1.8.18