# Author: Enric Tejedor CERN  02/2019

################################################################################
# Copyright (C) 1995-2019, Rene Brun and Fons Rademakers.                      #
# All rights reserved.                                                         #
#                                                                              #
# For the licensing terms see $ROOTSYS/LICENSE.                                #
# For the list of contributors see $ROOTSYS/README/CREDITS.                    #
################################################################################

from ROOT.libROOTPythonizations import AddTClassDynamicCastPyz


def pythonize_tclass():
    import ROOT

    klass = ROOT.TClass

    # DynamicCast
    klass._TClass__DynamicCast = klass.DynamicCast
    AddTClassDynamicCastPyz(klass)


# Instant pythonization (executed at `import ROOT` time), no need of a
# decorator. This is a core class that is instantiated before cppyy's
# pythonization machinery is in place.
pythonize_tclass()
