Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework
v36r7 (7f57a304)
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
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
g
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
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
r
s
t
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
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
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
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
HiveDataBroker.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2019 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
#include "
GaudiKernel/IDataBroker.h
"
13
#include "
GaudiKernel/Service.h
"
14
#include <
Gaudi/Algorithm.h
>
15
#include <stdexcept>
16
17
class
HiveDataBrokerSvc
final :
public
extends
<Service, IDataBroker> {
18
public
:
19
using
extends::extends;
20
21
std::vector<Gaudi::Algorithm*>
algorithmsRequiredFor
(
const
DataObjIDColl
& requested,
22
const
std::vector<std::string>
& stoppers = {} )
const
override
;
23
std::vector<Gaudi::Algorithm*>
algorithmsRequiredFor
(
const
Gaudi::Utils::TypeNameString
&
alg
,
24
const
std::vector<std::string>
& stoppers = {} )
const
override
;
25
26
StatusCode
initialize
()
override
;
27
StatusCode
start
()
override
;
28
StatusCode
stop
()
override
;
29
StatusCode
finalize
()
override
;
30
31
private
:
32
Gaudi::Property<std::string>
m_dataLoader
{
this
,
"DataLoader"
,
""
,
33
"Attribute any unmet input dependencies to this Algorithm"
};
34
Gaudi::Property<std::vector<std::string>
>
m_producers
{
35
this
,
"DataProducers"
, {},
"List of algorithms to be used to resolve data dependencies"
};
36
37
struct
AlgEntry
{
38
SmartIF<IAlgorithm>
ialg
;
39
Gaudi::Algorithm
*
alg
;
40
std::set<AlgEntry*>
dependsOn
;
41
int
requestCount
= 0;
42
43
AlgEntry
(
SmartIF<IAlgorithm>
&& p ) :
ialg
{
std::move
( p ) },
alg
{
dynamic_cast<
Gaudi::Algorithm
*
>
(
ialg
.
get
() ) } {
44
if
( !
alg
)
throw
std::runtime_error
(
"algorithm pointer == nullptr???"
);
45
}
46
};
47
48
std::vector<AlgEntry>
49
instantiateAndInitializeAlgorithms
(
const
std::vector<std::string>
& names )
const
;
// algorithms must be fully
50
// initialized first, as
51
// doing so may create
52
// additional data
53
// dependencies...
54
55
std::vector<AlgEntry>
m_algorithms
;
56
57
mutable
std::vector<AlgEntry>
m_cfnodes
;
58
59
std::map<DataObjID, AlgEntry*>
mapProducers
(
std::vector<AlgEntry>
&
algorithms
)
const
;
60
61
std::map<DataObjID, AlgEntry*>
m_dependencies
;
62
};
HiveDataBrokerSvc::initialize
StatusCode initialize() override
Definition:
HiveDataBroker.cpp:72
HiveDataBrokerSvc::m_producers
Gaudi::Property< std::vector< std::string > > m_producers
Definition:
HiveDataBroker.h:34
std::move
T move(T... args)
std::unordered_set< DataObjID, DataObjID_Hasher >
std::vector< Gaudi::Algorithm * >
HiveDataBrokerSvc::AlgEntry::AlgEntry
AlgEntry(SmartIF< IAlgorithm > &&p)
Definition:
HiveDataBroker.h:43
HiveDataBrokerSvc::m_algorithms
std::vector< AlgEntry > m_algorithms
Definition:
HiveDataBroker.h:55
HiveDataBrokerSvc::m_dependencies
std::map< DataObjID, AlgEntry * > m_dependencies
Definition:
HiveDataBroker.h:61
HiveDataBrokerSvc::stop
StatusCode stop() override
Definition:
HiveDataBroker.cpp:122
basic.alg
alg
Definition:
basic.py:15
HiveDataBrokerSvc::m_dataLoader
Gaudi::Property< std::string > m_dataLoader
Definition:
HiveDataBroker.h:32
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition:
TypeNameString.h:20
StatusCode
Definition:
StatusCode.h:65
HiveDataBrokerSvc::instantiateAndInitializeAlgorithms
std::vector< AlgEntry > instantiateAndInitializeAlgorithms(const std::vector< std::string > &names) const
Definition:
HiveDataBroker.cpp:155
Histograms_with_global.algorithms
list algorithms
Definition:
Histograms_with_global.py:19
HiveDataBrokerSvc::start
StatusCode start() override
Definition:
HiveDataBroker.cpp:98
HiveDataBrokerSvc::algorithmsRequiredFor
std::vector< Gaudi::Algorithm * > algorithmsRequiredFor(const DataObjIDColl &requested, const std::vector< std::string > &stoppers={}) const override
Definition:
HiveDataBroker.cpp:270
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition:
Algorithm.h:90
Algorithm.h
std::runtime_error
STL class.
SmartIF< IAlgorithm >
std::map
STL class.
extends
Base class used to extend a class implementing other interfaces.
Definition:
extends.h:20
HiveDataBrokerSvc::mapProducers
std::map< DataObjID, AlgEntry * > mapProducers(std::vector< AlgEntry > &algorithms) const
Definition:
HiveDataBroker.cpp:193
IDataBroker.h
Service.h
HiveDataBrokerSvc::AlgEntry::requestCount
int requestCount
Definition:
HiveDataBroker.h:41
HiveDataBrokerSvc
Definition:
HiveDataBroker.h:17
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition:
SmartIF.h:86
HiveDataBrokerSvc::AlgEntry::ialg
SmartIF< IAlgorithm > ialg
Definition:
HiveDataBroker.h:38
HiveDataBrokerSvc::m_cfnodes
std::vector< AlgEntry > m_cfnodes
Definition:
HiveDataBroker.h:57
HiveDataBrokerSvc::AlgEntry
Definition:
HiveDataBroker.h:37
HiveDataBrokerSvc::AlgEntry::alg
Gaudi::Algorithm * alg
Definition:
HiveDataBroker.h:39
HiveDataBrokerSvc::finalize
StatusCode finalize() override
Definition:
HiveDataBroker.cpp:145
std::set
STL class.
Gaudi::Property< std::string >
HiveDataBrokerSvc::AlgEntry::dependsOn
std::set< AlgEntry * > dependsOn
Definition:
HiveDataBroker.h:40
GaudiHive
src
HiveDataBroker.h
Generated on Fri Jul 29 2022 20:50:41 for The Gaudi Framework by
1.8.18