The Gaudi Framework
v25r5
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
// ============================================================================
DODBasicMapper::nodeTypeForPath
virtual std::string nodeTypeForPath(const std::string &path)
Definition:
DODBasicMapper.cpp:60
DODBasicMapper
Default implementation of a DataOnDemand mapper.
Definition:
DODBasicMapper.h:19
Parsers.h
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition:
StatusCode.h:62
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition:
DODBasicMapper.cpp:11
extends2
Base class used to extend a class implementing other interfaces.
Definition:
extends.h:75
HashMap.h
merge_files.sc
int sc
Definition:
merge_files.py:153
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition:
PluginService.h:36
GaudiUtils::Map::insert
std::pair< iterator, bool > insert(const value_type &val)
Definition:
Map.h:165
DODBasicMapper::algorithmForPath
virtual Gaudi::Utils::TypeNameString algorithmForPath(const std::string &path)
Definition:
DODBasicMapper.cpp:53
GaudiUtils::Map::end
iterator end()
Definition:
Map.h:131
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition:
TypeNameString.h:9
gaudirun.type
string type
Definition:
gaudirun.py:126
StatusCode
This class is used for returning status codes from appropriate routines.
Definition:
StatusCode.h:30
IInterface
Definition of the basic interface.
Definition:
IInterface.h:160
GaudiUtils::Map::find
iterator find(const key_type &key)
Definition:
Map.h:148
Gaudi::Utils::Histos::path
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
Definition:
HistoTableFormat.cpp:185
DODBasicMapper.h
GaudiUtils::Map< std::string, Gaudi::Utils::TypeNameString, M >::iterator
map_type::iterator iterator
Definition:
Map.h:98
GaudiPython.GaudiAlgs.std
std
Definition:
GaudiAlgs.py:75
GaudiUtils::HashMap
Common class providing an architecture-independent hash map.
Definition:
HashMap.h:108
GaudiUtils::Map::clear
void clear()
Definition:
Map.h:176
DODBasicMapper::m_nodeMap
NodeMap m_nodeMap
Definition:
DODBasicMapper.h:37
DODBasicMapper::~DODBasicMapper
virtual ~DODBasicMapper()
Destructor.
Definition:
DODBasicMapper.cpp:50
DODBasicMapper::m_algMap
AlgMap m_algMap
Definition:
DODBasicMapper.h:36
Gaudi
This is a number of static methods for bootstrapping the Gaudi framework.
Definition:
Bootstrap.h:14
ToolFactory.h
GaudiCoreSvc
src
IncidentSvc
DODBasicMapper.cpp
Generated on Tue Oct 21 2014 11:36:21 for The Gaudi Framework by
1.8.7