![]() |
ATLAS Offline Software
|
a handle to a python tool for use via nanobind More...
#include <PythonToolHandle.h>
Public Member Functions | |
PythonToolHandle () | |
standard constructor More... | |
void | setTypeAndName (const std::string &typeAndName) |
set the type and name for the tool More... | |
template<typename T > | |
void | setProperty (const std::string &key, T &&value) |
set a property on the tool More... | |
const asg::AsgToolConfig & | getConfig () const |
get the AsgToolConfig More... | |
void | preinitialize () |
preinitialize the tool More... | |
void | renameContainers (const std::vector< std::pair< std::string, std::string >> &renames) |
rename the columns the tool uses More... | |
void | initialize () |
initialize the tool More... | |
void | applySystematicVariation (const std::string &sysName) |
set the tool to apply the given systematic variation More... | |
template<typename CT > | |
void | setColumn (const std::string &key, std::size_t size, CT *dataPtr) |
set a column pointer (raw pointer version) More... | |
void | setColumnVoid (const std::string &name, std::size_t size, const void *dataPtr, const std::type_info &type, bool isConst) |
set a column pointer More... | |
void | call () |
call the tool and reset the columns More... | |
std::vector< ColumnInfo > | getColumnInfo () const |
get the expected column info More... | |
std::vector< std::string > | getColumnNames () const |
get the expected column names More... | |
std::vector< std::string > | getRecommendedSystematics () const |
get the recommended systematics More... | |
void | setLevel (MSG::Level lvl) |
Change the current logging level. More... | |
Private Member Functions | |
void | initMessaging () const |
Initialize our message level and MessageSvc. More... | |
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. More... | |
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
MsgStream instance (a std::cout like with print-out levels) More... | |
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
MessageSvc pointer. More... | |
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
Current logging level. More... | |
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
Messaging initialized (initMessaging) More... | |
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 |
|
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.
|
inline |
|
inline |
|
inline |
get the AsgToolConfig
Definition at line 63 of file PythonToolHandle.h.
|
inline |
|
inline |
|
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 |
|
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 |
|
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 |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
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.