26#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
27#include <numpy/arrayobject.h>
46 TMVA::gTools().
Log() << kFATAL <<
"Can't find a valid Python version used to build ROOT" <<
Endl;
96 Log() << kFATAL <<
"Can't init local namespace" <<
Endl;
114 Log() << kFATAL <<
"Can't init local namespace" <<
Endl;
170 Log << kFATAL <<
"Can't import __main__" <<
Endl;
177 Log << kFATAL <<
"Can't init global namespace" <<
Endl;
182 #if PY_MAJOR_VERSION < 3
189 Log << kFATAL <<
"Can't import __builtin__" <<
Endl;
198 Log << kFATAL <<
"Can't import builtins" <<
Endl;
220 Log << kFATAL <<
"Can't import pickle" <<
Endl;
329 Log() << kWARNING <<
"Failed to run python code: " << code <<
Endl;
330 Log() << kWARNING <<
"Python error message:" <<
Endl;
350 std::cout<<
"\nPython error message:\n";
352 throw std::runtime_error(
"\nFailed to run python code: "+code);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
R__EXTERN TSystem * gSystem
Class that contains all the data information.
PyGILState_STATE m_GILState
Virtual base Class for all MVA method.
ostringstream derivative to redirect and format output
static std::vector< size_t > GetDataFromTuple(PyObject *tupleObject)
Utility function which retrieves and returns the values of the Tuple object as a vector of size_t.
static int PyIsInitialized()
Check Python interpreter initialization status.
static std::vector< size_t > GetDataFromList(PyObject *listObject)
Utility function which retrieves and returns the values of the List object as a vector of size_t.
static PyObject * fPickleDumps
PyObject * Eval(TString code)
Evaluate Python code.
static void PyInitialize()
Initialize Python interpreter.
static void Serialize(TString file, PyObject *classifier)
Serialize Python object.
static Int_t UnSerialize(TString file, PyObject **obj)
Unserialize Python object.
static const char * PyStringAsString(PyObject *string)
Returns const char* from Python string in PyObject.
static PyObject * fPickleLoads
static PyObject * fGlobalNS
static PyObject * fModulePickle
static PyObject * fModuleBuiltin
PyMethodBase(const TString &jobName, Types::EMVA methodType, const TString &methodTitle, DataSetInfo &dsi, const TString &theOption="")
static PyObject * GetValueFromDict(PyObject *dict, const char *key)
Utility function which checks if a given key is present in a Python dictionary object and returns the...
void PyRunString(TString code, TString errorMessage="Failed to run python code", int start=256)
Execute Python code from string.
const char * Data() const
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.
create variable transformations
TString Python_Executable()
Function to find current Python executable used by ROOT If "Python3" is installed,...
MsgLogger & Endl(MsgLogger &ml)