ATLAS Offline Software
Loading...
Searching...
No Matches
PropertyMgr.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ASGTOOLS_PROPERTYMGR_H
6#define ASGTOOLS_PROPERTYMGR_H
7
8// Local include(s):
9
10#ifndef XAOD_STANDALONE
11# include "GaudiKernel/PropertyMgr.h"
12#else // not XAOD_STANDALONE
13
14// System include(s):
15#include <string>
16#include <map>
17
18// Local include(s):
20#include "AsgTools/Property.h"
22
34class PropertyMgr {
35
36public:
38 typedef Property::Type Type;
39
41 typedef std::map< std::string, Property* > PropMap_t;
42
44 PropertyMgr();
46 ~PropertyMgr();
47
50
52 template< typename T >
53 Property* declareProperty( const std::string& name, T& loc );
54
56 StatusCode setProperty( const std::string& name, const char* value );
58 template< typename T >
59 StatusCode setProperty( const std::string& name, const T& val );
60
62 template< typename T >
63 StatusCode getProperty( const std::string& name, T& val ) const;
64
66 const Property* getProperty( const std::string& name ) const;
67
69 const PropMap_t& getProperties() const;
70
72
75
77 MsgStream& msg() const;
78
80 MsgStream& msg( MSG::Level level ) const;
81
83
84private:
86 PropMap_t m_props;
88 mutable MsgStream m_msg;
89
90}; // class PropertyMgr
91
92// Include the template implementations:
94
95#endif // not XAOD_STANDALONE
96#endif // ASGTOOLS_PROPERTYMGR_H
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
RootType Type
Type
Property type enumeration.
Definition Property.h:27
::StatusCode StatusCode
StatusCode definition for legacy code.
T getProperty(const asg::IAsgTool *interface_tool, const std::string &prop_name)
MsgStream & msg
Definition testRead.cxx:32