![]() |
ATLAS Offline Software
|
a handle to a python tool for use via nanobind More...
#include <PythonToolHandle.h>
Public Member Functions | |
| PythonToolHandle () | |
| standard constructor | |
| void | setTypeAndName (const std::string &typeAndName) |
| set the type and name for the tool | |
| template<typename T> | |
| void | setProperty (const std::string &key, T &&value) |
| set a property on the tool | |
| const asg::AsgToolConfig & | getConfig () const |
| get the AsgToolConfig | |
| void | preinitialize () |
| preinitialize the tool | |
| void | renameContainers (const std::vector< std::pair< std::string, std::string > > &renames) |
| rename the columns the tool uses | |
| void | initialize () |
| initialize the tool | |
| void | applySystematicVariation (const std::string &sysName) |
| set the tool to apply the given systematic variation | |
| template<typename CT> | |
| void | setColumn (const std::string &key, std::size_t size, CT *dataPtr) |
| set a column pointer (raw pointer version) | |
| void | setColumnVoid (const std::string &name, std::size_t size, const void *dataPtr, const std::type_info &type, bool isConst) |
| set a column pointer | |
| void | call () |
| call the tool and reset the columns | |
| std::vector< ColumnInfo > | getColumnInfo () const |
| get the expected column info | |
| std::vector< std::string > | getColumnNames () const |
| get the expected column names | |
| std::vector< std::string > | getRecommendedSystematics () const |
| get the recommended systematics | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Functions providing the same interface as AthMessaging | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level of the object. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
Private Member Functions | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| asg::AsgToolConfig | m_config |
| ToolHandle< asg::AsgTool > | m_toolHandle |
| std::shared_ptr< void > | m_cleanup |
| IColumnarTool * | m_tool = nullptr |
| CP::ISystematicsTool * | m_systTool = nullptr |
| std::shared_ptr< const ColumnVectorHeader > | m_columnHeader |
| std::shared_ptr< const ToolColumnVectorMap > | m_toolWrapper |
| std::unique_ptr< ColumnVectorData > | m_columns |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) | |
a handle to a python tool for use via nanobind
This is meant to be used together with a nanobind python binding, to provide a higher level and stable interface to the tool wrappers. For other uses people should use the underlying interfaces directly or write a new higher level interface (depending on what's appropriate).
For now this is not thread-safe. The underlying code is thread-safe, as long as there is a separate ColumnarToolWrapperData object for each thread. Also, the way the tools handle setting systematics is currently not thread-safe.
Definition at line 38 of file PythonToolHandle.h.
|
inline |
standard constructor
Definition at line 46 of file PythonToolHandle.h.
|
inline |
set the tool to apply the given systematic variation
Definition at line 126 of file PythonToolHandle.h.
|
inline |
call the tool and reset the columns
Definition at line 153 of file PythonToolHandle.h.
|
inlinenodiscard |
get the expected column info
Definition at line 163 of file PythonToolHandle.h.
|
inline |
get the expected column names
Definition at line 171 of file PythonToolHandle.h.
|
inlinenodiscard |
|
inline |
get the recommended systematics
Definition at line 179 of file PythonToolHandle.h.
|
inline |
initialize the tool
Definition at line 114 of file PythonToolHandle.h.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inherited |
The standard message stream.
Definition at line 49 of file AsgMessaging.cxx.
|
inherited |
The standard message stream.
| lvl | The message level to set the stream to |
Definition at line 57 of file AsgMessaging.cxx.
|
inherited |
Test the output level of the object.
| lvl | The message level to test against |
true If messages at level "lvl" will be printed Definition at line 41 of file AsgMessaging.cxx.
|
inline |
preinitialize the tool
Definition at line 69 of file PythonToolHandle.h.
|
inline |
rename the columns the tool uses
Definition at line 86 of file PythonToolHandle.h.
|
inline |
set a column pointer (raw pointer version)
Definition at line 138 of file PythonToolHandle.h.
|
inline |
set a column pointer
Definition at line 146 of file PythonToolHandle.h.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
inline |
set a property on the tool
Definition at line 56 of file PythonToolHandle.h.
|
inline |
set the type and name for the tool
Definition at line 49 of file PythonToolHandle.h.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
Definition at line 198 of file PythonToolHandle.h.
|
private |
Definition at line 203 of file PythonToolHandle.h.
|
private |
Definition at line 205 of file PythonToolHandle.h.
|
private |
Definition at line 196 of file PythonToolHandle.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 201 of file PythonToolHandle.h.
|
private |
Definition at line 200 of file PythonToolHandle.h.
|
private |
Definition at line 197 of file PythonToolHandle.h.
|
private |
Definition at line 204 of file PythonToolHandle.h.