Question about how to cast in pyROOT

TRestComplex should not be in the compilation targets, as it is written in out main CMakeLists.txt.

#####  MPFR  #####
if (NOT DEFINED REST_MPFR)
    set(REST_MPFR OFF)
endif ()
if (${REST_MPFR} MATCHES "ON")
    find_path(MPFR_INCLUDE mpfr.h HINTS ${MPFR_PATH} ${MPFR_PATH}/include) # path to include directory
    find_path(MPFR_LIB_PATH libmpfr.so HINTS ${MPFR_PATH} ${MPFR_PATH}/lib)
    find_library(MPFR_LIB mpfr HINTS ${MPFR_PATH} ${MPFR_PATH}/lib) # path to .so file
    if (NOT MPFR_INCLUDE MATCHES "MPFR_INCLUDE-NOTFOUND" AND NOT MPFR_LIB MATCHES "MPFR_LIB-NOTFOUND")
        # MPFR is found
        list(APPEND rest_features "MPFR")
        add_compile_definitions(USE_MPFR)
        set(external_include_dirs ${external_include_dirs} ${MPFR_INCLUDE})
        set(external_libs "${external_libs};${MPFR_LIB}")
        link_directories(${MPFR_LIB})
        message(STATUS "MPFR library : ${MPFR_LIB}")
    else ()
        message(ERROR "MPFR library was not found. Adding the location to the installation path may solve this problem.\n Use -DMPFR_PATH=/path/to/mpfr/")
    endif ()
else ()
    set(REST_MPFR OFF)
    set(excludes ${excludes} TRestComplex)
endif (${REST_MPFR} MATCHES "ON")

It could be related to the version of cmake. I am using cmake version 3.20.0-rc1

Iā€™m using cmake 3.25

Ok, I looked a bit in to the problem and I think I found a quick fix that is now at a pending PR

It will be soon merged to master

I am also investigating the errors you got about the Eve libraries. If I disable REST_EVE I also get into troubles, the point is that we never got into this error because it seems that in our systems Eve libraries in ROOT are always active.

In the code as written, you are trying to pass a class through a pointer. Instead, an instance should be created from the class. E.g. rawEv = ROOT.TRestRawSignalEvent() if the class has a default constructor.

1 Like

Ok, I was trying to create the rawEv instance without parenthesis. I.e. rawEv = ROOT.TRestRawSignalEvent, instead, using rawEv = ROOT.TRestRawSignalEvent() solved the problem!

Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.