The Gaudi Framework  v33r0 (d5ea422b)
DODBasicMapper.cpp
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 // Include files
12 
13 #include "GaudiKernel/HashMap.h"
15 // Local implementation of parsers from HashMap
16 namespace Gaudi {
17  namespace Parsers {
20  template <typename K, typename V>
23  StatusCode sc = parse( tmp, input );
24  if ( sc.isSuccess() ) {
25  result.clear();
26  result.insert( tmp.begin(), tmp.end() );
27  }
28  return sc;
29  }
30  } // namespace Parsers
31 } // namespace Gaudi
32 
33 // local
34 #include "DODBasicMapper.h"
35 
36 // ----------------------------------------------------------------------------
37 // Implementation file for class: DODBasicMapper
38 //
39 // 16/01/2012: Marco Clemencic
40 // ----------------------------------------------------------------------------
42 
43 Gaudi::Utils::TypeNameString DODBasicMapper::algorithmForPath( const std::string& path ) {
44  auto alg = m_algMap.find( path );
45  return ( alg != m_algMap.end() ) ? alg->second : "";
46 }
47 
49  auto node = m_nodeMap.find( path );
50  return ( node != m_nodeMap.end() ) ? node->second : "";
51 }
52 
53 // ============================================================================
Default implementation of a DataOnDemand mapper.
STL namespace.
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
MapProp< std::string > m_nodeMap
T end(T... args)
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
std::string nodeTypeForPath(const std::string &path) override
STL class.
#define DECLARE_COMPONENT(type)
std::pair< iterator, bool > insert(ValueType &&val)
Definition: Map.h:178
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
bool isSuccess() const
Definition: StatusCode.h:361
T begin(T... args)
Common class providing an architecture-independent hash map.
Definition: HashMap.h:83
void clear()
Definition: Map.h:195
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1