| The Gaudi Framework v32r1 (f65d50dc)

DODBasicMapper.cpp
Go to the documentation of this file.
1 // Include files
2
3 #include "GaudiKernel/HashMap.h"
4 #include <Gaudi/Parsers/CommonParsers.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 } // namespace Parsers
21 } // namespace Gaudi
22
23 // local
24 #include "DODBasicMapper.h"
25
26 // ----------------------------------------------------------------------------
27 // Implementation file for class: DODBasicMapper
28 //
29 // 16/01/2012: Marco Clemencic
30 // ----------------------------------------------------------------------------
31 DECLARE_COMPONENT( DODBasicMapper )
32
33 Gaudi::Utils::TypeNameString DODBasicMapper::algorithmForPath( const std::string& path ) {
34 auto alg = m_algMap.find( path );
35 return ( alg != m_algMap.end() ) ? alg->second : "";
36 }
37
38 std::string DODBasicMapper::nodeTypeForPath( const std::string& path ) {
39 auto node = m_nodeMap.find( path );
40 return ( node != m_nodeMap.end() ) ? node->second : "";
41 }
42
43 // ============================================================================
DODBasicMapper
Default implementation of a DataOnDemand mapper.
Definition: DODBasicMapper.h:19
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
std
STL namespace.
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
DODBasicMapper::m_nodeMap
MapProp< std::string > m_nodeMap
Definition: DODBasicMapper.h:34
std::map::end
T end(T... args)
HashMap.h
CommonParsers.h
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
std::map< std::string, std::string >
DODBasicMapper::nodeTypeForPath
std::string nodeTypeForPath(const std::string &path) override
Definition: DODBasicMapper.cpp:38
std::string
STL class.
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
GaudiUtils::Map::insert
std::pair< iterator, bool > insert(ValueType &&val)
Definition: Map.h:168
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
DODBasicMapper.h
std::map::begin
T begin(T... args)
GaudiUtils::HashMap
Common class providing an architecture-independent hash map.
Definition: HashMap.h:73
GaudiUtils::Map::clear
void clear()
Definition: Map.h:185
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1