The Gaudi Framework
v26r1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
DODBasicMapper.cpp
Go to the documentation of this file.
1
// Include files
2
3
#include "GaudiKernel/HashMap.h"
4
#include "GaudiKernel/Parsers.h"
5
// Local implementation of parsers from HashMap
6
namespace
Gaudi
{
7
namespace
Parsers {
10
template
<
typename
K,
typename
V>
11
StatusCode
parse
(
GaudiUtils::HashMap<K, V>
&result,
const
std::string &input) {
12
std::map<std::string, std::string> tmp;
13
StatusCode
sc
=
parse
(tmp, input);
14
if
(sc.
isSuccess
()) {
15
result.
clear
();
16
result.
insert
(tmp.begin(), tmp.end());
17
}
18
return
sc
;
19
}
20
}
21
}
22
23
// From Gaudi
24
#include "GaudiKernel/ToolFactory.h"
25
// local
26
#include "
DODBasicMapper.h
"
27
28
// ----------------------------------------------------------------------------
29
// Implementation file for class: DODBasicMapper
30
//
31
// 16/01/2012: Marco Clemencic
32
// ----------------------------------------------------------------------------
33
DECLARE_COMPONENT
(
DODBasicMapper
)
34
35
// ============================================================================
36
// Standard constructor, initializes variables
37
// ============================================================================
38
DODBasicMapper
::
DODBasicMapper
(const
std
::
string
&
type
, const
std
::
string
& name, const
IInterface
* parent)
39
:
base_class
(type, name, parent)
40
{
41
declareProperty(
"Nodes"
, m_nodeMap,
42
"Map of the type of nodes to be associated to paths (path -> data_type)."
);
43
declareProperty(
"Algorithms"
, m_algMap,
44
"Map of algorithms to be used to produce entries (path -> alg_name)."
);
45
}
46
47
// ============================================================================
48
// Destructor
49
// ============================================================================
50
DODBasicMapper::~DODBasicMapper
() {}
51
52
53
Gaudi::Utils::TypeNameString
DODBasicMapper::algorithmForPath
(
const
std::string &
path
)
54
{
55
AlgMap::iterator
alg =
m_algMap
.
find
(path);
56
return
(alg !=
m_algMap
.
end
()) ? alg->second :
""
;
57
}
58
59
60
std::string
DODBasicMapper::nodeTypeForPath
(
const
std::string &
path
)
61
{
62
NodeMap::iterator
node =
m_nodeMap
.
find
(path);
63
return
(node !=
m_nodeMap
.
end
()) ? node->second :
""
;
64
}
65
66
67
68
// ============================================================================
GaudiCoreSvc
src
IncidentSvc
DODBasicMapper.cpp
Generated on Mon Feb 16 2015 11:56:53 for The Gaudi Framework by
1.8.2