diff --git a/HROOT.cabal b/HROOT.cabal
--- a/HROOT.cabal
+++ b/HROOT.cabal
@@ -1,5 +1,5 @@
 Name:		HROOT
-Version:	0.6.0.0
+Version:	0.6.1
 Synopsis:	Wrapper for ROOT
 Description: 	Haskell FFI binding for ROOT  
 Homepage:       http://ianwookim.org/HROOT
diff --git a/csrc/HROOT.cpp b/csrc/HROOT.cpp
--- a/csrc/HROOT.cpp
+++ b/csrc/HROOT.cpp
@@ -11,6 +11,8 @@
 #include "THStack.h"
 
 #include "TNamed.h"
+#include "TDictionary.h"
+#include "TClass.h"
 
 #include "TAtt3D.h"
 #include "TAttAxis.h"
@@ -172,6 +174,10 @@
 int  Type ## _Write ( Type ## _p p, const char * name, int  option, int  bufsize )\
 {\
 return to_nonconst<Type,Type ## _t>(p)->Write(name, option, bufsize);\
+}\
+TClass_p Type ## _IsA ( Type ## _p p )\
+{\
+return to_nonconst<TClass_t,TClass>((TClass*)to_nonconst<Type,Type ## _t>(p)->IsA());\
 }
 
 #undef ROOT_TNAMED_DEFINITIONVIRT
@@ -181,6 +187,14 @@
 to_nonconst<Type,Type ## _t>(p)->SetTitle(name);\
 }
 
+#undef ROOT_TDICTIONARY_DEFINITIONVIRT
+#define ROOT_TDICTIONARY_DEFINITIONVIRT(Type)\
+
+
+#undef ROOT_TCLASS_DEFINITIONVIRT
+#define ROOT_TCLASS_DEFINITIONVIRT(Type)\
+
+
 #undef ROOT_TFORMULA_DEFINITIONVIRT
 #define ROOT_TFORMULA_DEFINITIONVIRT(Type)\
 double Type ## _GetParameter ( Type ## _p p, int  idx )\
@@ -464,6 +478,10 @@
 void Type ## _Close ( Type ## _p p, const char * option )\
 {\
 to_nonconst<Type,Type ## _t>(p)->Close(option);\
+}\
+TObject_p Type ## _Get ( Type ## _p p, const char * namecycle )\
+{\
+return to_nonconst<TObject_t,TObject>((TObject*)to_nonconst<Type,Type ## _t>(p)->Get(namecycle));\
 }
 
 #undef ROOT_TDIRECTORYFILE_DEFINITIONVIRT
@@ -881,6 +899,14 @@
 return to_nonconst<Type ## _t, Type >(newp);\
 }
 
+#undef ROOT_TDICTIONARY_DEFINITIONNONVIRT
+#define ROOT_TDICTIONARY_DEFINITIONNONVIRT(Type)\
+
+
+#undef ROOT_TCLASS_DEFINITIONNONVIRT
+#define ROOT_TCLASS_DEFINITIONNONVIRT(Type)\
+
+
 #undef ROOT_TFORMULA_DEFINITIONNONVIRT
 #define ROOT_TFORMULA_DEFINITIONNONVIRT(Type)\
 Type ## _p Type ## _newTFormula ( const char * name, const char * formula )\
@@ -1651,6 +1677,7 @@
 ROOT_DELETABLE_DEFINITIONVIRT(TAttAxis)
 ROOT_DELETABLE_DEFINITIONVIRT(TAtt3D)
 ROOT_DELETABLE_DEFINITIONVIRT(TFormula)
+ROOT_DELETABLE_DEFINITIONVIRT(TClass)
 ROOT_DELETABLE_DEFINITIONVIRT(TNamed)
 ROOT_DELETABLE_DEFINITIONVIRT(TObject)
 ROOT_TAPPLICATION_DEFINITIONVIRT(TRint)
@@ -1940,6 +1967,7 @@
 ROOT_TCANVAS_DEFINITIONVIRT(TDialogCanvas)
 ROOT_TCANVAS_DEFINITIONVIRT(TCanvas)
 ROOT_TCHAIN_DEFINITIONVIRT(TChain)
+ROOT_TCLASS_DEFINITIONVIRT(TClass)
 ROOT_TCROWN_DEFINITIONVIRT(TCrown)
 ROOT_TCURLYARC_DEFINITIONVIRT(TCurlyArc)
 ROOT_TCURLYLINE_DEFINITIONVIRT(TCurlyArc)
@@ -1947,6 +1975,7 @@
 ROOT_TCUTG_DEFINITIONVIRT(TCutG)
 ROOT_TDIALOGCANVAS_DEFINITIONVIRT(TDialogCanvas)
 ROOT_TDIAMOND_DEFINITIONVIRT(TDiamond)
+ROOT_TDICTIONARY_DEFINITIONVIRT(TClass)
 ROOT_TDIRECTORY_DEFINITIONVIRT(TFile)
 ROOT_TDIRECTORY_DEFINITIONVIRT(TDirectoryFile)
 ROOT_TDIRECTORY_DEFINITIONVIRT(TDirectory)
@@ -2082,6 +2111,7 @@
 ROOT_TNAMED_DEFINITIONVIRT(THStack)
 ROOT_TNAMED_DEFINITIONVIRT(TAttParticle)
 ROOT_TNAMED_DEFINITIONVIRT(TFormula)
+ROOT_TNAMED_DEFINITIONVIRT(TClass)
 ROOT_TNAMED_DEFINITIONVIRT(TNamed)
 ROOT_TNTUPLE_DEFINITIONVIRT(TNtuple)
 ROOT_TNTUPLED_DEFINITIONVIRT(TNtupleD)
@@ -2169,6 +2199,7 @@
 ROOT_TOBJECT_DEFINITIONVIRT(THStack)
 ROOT_TOBJECT_DEFINITIONVIRT(TAttParticle)
 ROOT_TOBJECT_DEFINITIONVIRT(TFormula)
+ROOT_TOBJECT_DEFINITIONVIRT(TClass)
 ROOT_TOBJECT_DEFINITIONVIRT(TNamed)
 ROOT_TOBJECT_DEFINITIONVIRT(TObject)
 ROOT_TPCON_DEFINITIONVIRT(TPCON)
@@ -2253,6 +2284,8 @@
 ROOT_DELETABLE_DEFINITIONNONVIRT(Deletable)
 ROOT_TOBJECT_DEFINITIONNONVIRT(TObject)
 ROOT_TNAMED_DEFINITIONNONVIRT(TNamed)
+ROOT_TDICTIONARY_DEFINITIONNONVIRT(TDictionary)
+ROOT_TCLASS_DEFINITIONNONVIRT(TClass)
 ROOT_TFORMULA_DEFINITIONNONVIRT(TFormula)
 ROOT_TATT3D_DEFINITIONNONVIRT(TAtt3D)
 ROOT_TATTAXIS_DEFINITIONNONVIRT(TAttAxis)
diff --git a/csrc/HROOT.h b/csrc/HROOT.h
--- a/csrc/HROOT.h
+++ b/csrc/HROOT.h
@@ -20,12 +20,21 @@
 void Type ## _Draw ( Type ## _p p, const char * option ); \
 TObject_p Type ## _FindObject ( Type ## _p p, const char * name ); \
 void Type ## _SaveAs ( Type ## _p p, const char * filename, const char * option ); \
-int  Type ## _Write ( Type ## _p p, const char * name, int  option, int  bufsize )
+int  Type ## _Write ( Type ## _p p, const char * name, int  option, int  bufsize ); \
+TClass_p Type ## _IsA ( Type ## _p p )
 
 #undef ROOT_TNAMED_DECLARATIONVIRT
 #define ROOT_TNAMED_DECLARATIONVIRT(Type) \
 void Type ## _SetTitle ( Type ## _p p, const char * name )
 
+#undef ROOT_TDICTIONARY_DECLARATIONVIRT
+#define ROOT_TDICTIONARY_DECLARATIONVIRT(Type) \
+
+
+#undef ROOT_TCLASS_DECLARATIONVIRT
+#define ROOT_TCLASS_DECLARATIONVIRT(Type) \
+
+
 #undef ROOT_TFORMULA_DECLARATIONVIRT
 #define ROOT_TFORMULA_DECLARATIONVIRT(Type) \
 double Type ## _GetParameter ( Type ## _p p, int  idx ); \
@@ -264,7 +273,8 @@
 
 #undef ROOT_TDIRECTORY_DECLARATIONVIRT
 #define ROOT_TDIRECTORY_DECLARATIONVIRT(Type) \
-void Type ## _Close ( Type ## _p p, const char * option )
+void Type ## _Close ( Type ## _p p, const char * option ); \
+TObject_p Type ## _Get ( Type ## _p p, const char * namecycle )
 
 #undef ROOT_TDIRECTORYFILE_DECLARATIONVIRT
 #define ROOT_TDIRECTORYFILE_DECLARATIONVIRT(Type) \
@@ -505,6 +515,12 @@
 #undef ROOT_TNAMED_DECLARATIONNONVIRT
 #define ROOT_TNAMED_DECLARATIONNONVIRT(Type) \
 Type ## _p Type ## _newTNamed ( const char * name, const char * title )
+#undef ROOT_TDICTIONARY_DECLARATIONNONVIRT
+#define ROOT_TDICTIONARY_DECLARATIONNONVIRT(Type) \
+
+#undef ROOT_TCLASS_DECLARATIONNONVIRT
+#define ROOT_TCLASS_DECLARATIONNONVIRT(Type) \
+
 #undef ROOT_TFORMULA_DECLARATIONNONVIRT
 #define ROOT_TFORMULA_DECLARATIONNONVIRT(Type) \
 Type ## _p Type ## _newTFormula ( const char * name, const char * formula )
@@ -825,6 +841,8 @@
 ROOT_TYPE_DECLARATION(Deletable);
 ROOT_TYPE_DECLARATION(TObject);
 ROOT_TYPE_DECLARATION(TNamed);
+ROOT_TYPE_DECLARATION(TDictionary);
+ROOT_TYPE_DECLARATION(TClass);
 ROOT_TYPE_DECLARATION(TFormula);
 ROOT_TYPE_DECLARATION(TAtt3D);
 ROOT_TYPE_DECLARATION(TAttAxis);
@@ -1032,6 +1050,7 @@
 ROOT_DELETABLE_DECLARATIONVIRT(TAttAxis);
 ROOT_DELETABLE_DECLARATIONVIRT(TAtt3D);
 ROOT_DELETABLE_DECLARATIONVIRT(TFormula);
+ROOT_DELETABLE_DECLARATIONVIRT(TClass);
 ROOT_DELETABLE_DECLARATIONVIRT(TNamed);
 ROOT_DELETABLE_DECLARATIONVIRT(TObject);
 ROOT_TAPPLICATION_DECLARATIONVIRT(TRint);
@@ -1321,6 +1340,7 @@
 ROOT_TCANVAS_DECLARATIONVIRT(TDialogCanvas);
 ROOT_TCANVAS_DECLARATIONVIRT(TCanvas);
 ROOT_TCHAIN_DECLARATIONVIRT(TChain);
+ROOT_TCLASS_DECLARATIONVIRT(TClass);
 ROOT_TCROWN_DECLARATIONVIRT(TCrown);
 ROOT_TCURLYARC_DECLARATIONVIRT(TCurlyArc);
 ROOT_TCURLYLINE_DECLARATIONVIRT(TCurlyArc);
@@ -1328,6 +1348,7 @@
 ROOT_TCUTG_DECLARATIONVIRT(TCutG);
 ROOT_TDIALOGCANVAS_DECLARATIONVIRT(TDialogCanvas);
 ROOT_TDIAMOND_DECLARATIONVIRT(TDiamond);
+ROOT_TDICTIONARY_DECLARATIONVIRT(TClass);
 ROOT_TDIRECTORY_DECLARATIONVIRT(TFile);
 ROOT_TDIRECTORY_DECLARATIONVIRT(TDirectoryFile);
 ROOT_TDIRECTORY_DECLARATIONVIRT(TDirectory);
@@ -1463,6 +1484,7 @@
 ROOT_TNAMED_DECLARATIONVIRT(THStack);
 ROOT_TNAMED_DECLARATIONVIRT(TAttParticle);
 ROOT_TNAMED_DECLARATIONVIRT(TFormula);
+ROOT_TNAMED_DECLARATIONVIRT(TClass);
 ROOT_TNAMED_DECLARATIONVIRT(TNamed);
 ROOT_TNTUPLE_DECLARATIONVIRT(TNtuple);
 ROOT_TNTUPLED_DECLARATIONVIRT(TNtupleD);
@@ -1550,6 +1572,7 @@
 ROOT_TOBJECT_DECLARATIONVIRT(THStack);
 ROOT_TOBJECT_DECLARATIONVIRT(TAttParticle);
 ROOT_TOBJECT_DECLARATIONVIRT(TFormula);
+ROOT_TOBJECT_DECLARATIONVIRT(TClass);
 ROOT_TOBJECT_DECLARATIONVIRT(TNamed);
 ROOT_TOBJECT_DECLARATIONVIRT(TObject);
 ROOT_TPCON_DECLARATIONVIRT(TPCON);
@@ -1636,6 +1659,10 @@
 ROOT_TOBJECT_DECLARATIONNONVIRT(TObject);
 
 ROOT_TNAMED_DECLARATIONNONVIRT(TNamed);
+
+ROOT_TDICTIONARY_DECLARATIONNONVIRT(TDictionary);
+
+ROOT_TCLASS_DECLARATIONNONVIRT(TClass);
 
 ROOT_TFORMULA_DECLARATIONNONVIRT(TFormula);
 
diff --git a/src/HROOT/AddOn.hs b/src/HROOT/AddOn.hs
--- a/src/HROOT/AddOn.hs
+++ b/src/HROOT/AddOn.hs
@@ -1,2 +1,42 @@
+{-# LANGUAGE TypeFamilies, GADTs, ExistentialQuantification, EmptyDataDecls #-}
+
 module HROOT.AddOn where
+
+--import Foreign.C            
+import Foreign.ForeignPtr
+--import Foreign.Marshal.Array
+
+
+import HROOT.Class.Interface
+import HROOT.Class.Implementation ()
+
+data BottomType
+
+class GADTTypeable a where
+  data GADTType a :: * -> *
+  data EGADTType a :: *
+
+instance GADTTypeable TObject where
+  data GADTType TObject a where 
+    GADTTObjectTObject :: TObject -> GADTType TObject TObject
+    GADTTObjectTH1F    :: TH1F -> GADTType TObject TH1F
+    GADTTObjectBottom  :: GADTType TObject BottomType
+  data EGADTType TObject = forall a. EGADTTObject (GADTType TObject a)
+
+
+castTObject :: Exist TObject -> IO (EGADTType TObject)
+castTObject eobj = do 
+  let obj = TObject (get_fptr eobj)
+  etclass <- isA obj  
+  cname <- case etclass of ETClass tclass -> getName tclass
+  case cname of 
+    "TObject" -> case obj of 
+        TObject fptr -> let obj' = TObject (castForeignPtr fptr :: ForeignPtr RawTObject)
+                        in  return . EGADTTObject . GADTTObjectTObject $ obj'
+    "TH1F"    -> case obj of
+        TObject fptr -> let obj' = TH1F (castForeignPtr fptr :: ForeignPtr RawTH1F)
+                        in  return . EGADTTObject . GADTTObjectTH1F $ obj'
+    _         -> return . EGADTTObject $ GADTTObjectBottom
+
+
 
diff --git a/src/HROOT/Class/FFI.hsc b/src/HROOT/Class/FFI.hsc
--- a/src/HROOT/Class/FFI.hsc
+++ b/src/HROOT/Class/FFI.hsc
@@ -25,6 +25,8 @@
   :: (Ptr RawTObject) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TObject_Write" c_tobject_write 
   :: (Ptr RawTObject) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TObject_IsA" c_tobject_isa 
+  :: (Ptr RawTObject) -> IO (Ptr RawTClass)
 
 foreign import ccall "HROOT.h TNamed_GetName" c_tnamed_getname 
   :: (Ptr RawTNamed) -> IO CString
@@ -36,6 +38,8 @@
   :: (Ptr RawTNamed) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TNamed_Write" c_tnamed_write 
   :: (Ptr RawTNamed) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TNamed_IsA" c_tnamed_isa 
+  :: (Ptr RawTNamed) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TNamed_delete" c_tnamed_delete 
   :: (Ptr RawTNamed) -> IO ()
 foreign import ccall "HROOT.h TNamed_newTNamed" c_tnamed_newtnamed 
@@ -43,6 +47,32 @@
 foreign import ccall "HROOT.h TNamed_SetTitle" c_tnamed_settitle 
   :: (Ptr RawTNamed) -> CString -> IO ()
 
+
+
+
+
+
+
+
+
+
+foreign import ccall "HROOT.h TClass_SetTitle" c_tclass_settitle 
+  :: (Ptr RawTClass) -> CString -> IO ()
+foreign import ccall "HROOT.h TClass_GetName" c_tclass_getname 
+  :: (Ptr RawTClass) -> IO CString
+foreign import ccall "HROOT.h TClass_Draw" c_tclass_draw 
+  :: (Ptr RawTClass) -> CString -> IO ()
+foreign import ccall "HROOT.h TClass_FindObject" c_tclass_findobject 
+  :: (Ptr RawTClass) -> CString -> IO (Ptr RawTObject)
+foreign import ccall "HROOT.h TClass_SaveAs" c_tclass_saveas 
+  :: (Ptr RawTClass) -> CString -> CString -> IO ()
+foreign import ccall "HROOT.h TClass_Write" c_tclass_write 
+  :: (Ptr RawTClass) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TClass_IsA" c_tclass_isa 
+  :: (Ptr RawTClass) -> IO (Ptr RawTClass)
+foreign import ccall "HROOT.h TClass_delete" c_tclass_delete 
+  :: (Ptr RawTClass) -> IO ()
+
 foreign import ccall "HROOT.h TFormula_SetTitle" c_tformula_settitle 
   :: (Ptr RawTFormula) -> CString -> IO ()
 foreign import ccall "HROOT.h TFormula_GetName" c_tformula_getname 
@@ -55,6 +85,8 @@
   :: (Ptr RawTFormula) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TFormula_Write" c_tformula_write 
   :: (Ptr RawTFormula) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TFormula_IsA" c_tformula_isa 
+  :: (Ptr RawTFormula) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TFormula_delete" c_tformula_delete 
   :: (Ptr RawTFormula) -> IO ()
 foreign import ccall "HROOT.h TFormula_newTFormula" c_tformula_newtformula 
@@ -131,6 +163,8 @@
   :: (Ptr RawTAttParticle) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TAttParticle_Write" c_tattparticle_write 
   :: (Ptr RawTAttParticle) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TAttParticle_IsA" c_tattparticle_isa 
+  :: (Ptr RawTAttParticle) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TAttParticle_delete" c_tattparticle_delete 
   :: (Ptr RawTAttParticle) -> IO ()
 
@@ -157,6 +191,8 @@
   :: (Ptr RawTHStack) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h THStack_Write" c_thstack_write 
   :: (Ptr RawTHStack) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h THStack_IsA" c_thstack_isa 
+  :: (Ptr RawTHStack) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h THStack_delete" c_thstack_delete 
   :: (Ptr RawTHStack) -> IO ()
 foreign import ccall "HROOT.h THStack_newTHStack" c_thstack_newthstack 
@@ -184,6 +220,8 @@
   :: (Ptr RawTF1) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TF1_Write" c_tf1_write 
   :: (Ptr RawTF1) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TF1_IsA" c_tf1_isa 
+  :: (Ptr RawTF1) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TF1_delete" c_tf1_delete 
   :: (Ptr RawTF1) -> IO ()
 foreign import ccall "HROOT.h TF1_newTF1" c_tf1_newtf1 
@@ -207,6 +245,8 @@
   :: (Ptr RawTGraph) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TGraph_Write" c_tgraph_write 
   :: (Ptr RawTGraph) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TGraph_IsA" c_tgraph_isa 
+  :: (Ptr RawTGraph) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TGraph_delete" c_tgraph_delete 
   :: (Ptr RawTGraph) -> IO ()
 foreign import ccall "HROOT.h TGraph_newTGraph" c_tgraph_newtgraph 
@@ -230,6 +270,8 @@
   :: (Ptr RawTGraphAsymmErrors) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TGraphAsymmErrors_Write" c_tgraphasymmerrors_write 
   :: (Ptr RawTGraphAsymmErrors) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TGraphAsymmErrors_IsA" c_tgraphasymmerrors_isa 
+  :: (Ptr RawTGraphAsymmErrors) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TGraphAsymmErrors_delete" c_tgraphasymmerrors_delete 
   :: (Ptr RawTGraphAsymmErrors) -> IO ()
 foreign import ccall "HROOT.h TGraphAsymmErrors_newTGraphAsymmErrors" c_tgraphasymmerrors_newtgraphasymmerrors 
@@ -253,6 +295,8 @@
   :: (Ptr RawTCutG) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TCutG_Write" c_tcutg_write 
   :: (Ptr RawTCutG) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TCutG_IsA" c_tcutg_isa 
+  :: (Ptr RawTCutG) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TCutG_delete" c_tcutg_delete 
   :: (Ptr RawTCutG) -> IO ()
 foreign import ccall "HROOT.h TCutG_newTCutG" c_tcutg_newtcutg 
@@ -276,6 +320,8 @@
   :: (Ptr RawTGraphBentErrors) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TGraphBentErrors_Write" c_tgraphbenterrors_write 
   :: (Ptr RawTGraphBentErrors) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TGraphBentErrors_IsA" c_tgraphbenterrors_isa 
+  :: (Ptr RawTGraphBentErrors) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TGraphBentErrors_delete" c_tgraphbenterrors_delete 
   :: (Ptr RawTGraphBentErrors) -> IO ()
 foreign import ccall "HROOT.h TGraphBentErrors_newTGraphBentErrors" c_tgraphbenterrors_newtgraphbenterrors 
@@ -299,6 +345,8 @@
   :: (Ptr RawTGraphErrors) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TGraphErrors_Write" c_tgrapherrors_write 
   :: (Ptr RawTGraphErrors) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TGraphErrors_IsA" c_tgrapherrors_isa 
+  :: (Ptr RawTGraphErrors) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TGraphErrors_delete" c_tgrapherrors_delete 
   :: (Ptr RawTGraphErrors) -> IO ()
 foreign import ccall "HROOT.h TGraphErrors_newTGraphErrors" c_tgrapherrors_newtgrapherrors 
@@ -322,6 +370,8 @@
   :: (Ptr RawTGraphPolar) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TGraphPolar_Write" c_tgraphpolar_write 
   :: (Ptr RawTGraphPolar) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TGraphPolar_IsA" c_tgraphpolar_isa 
+  :: (Ptr RawTGraphPolar) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TGraphPolar_delete" c_tgraphpolar_delete 
   :: (Ptr RawTGraphPolar) -> IO ()
 foreign import ccall "HROOT.h TGraphPolar_newTGraphPolar" c_tgraphpolar_newtgraphpolar 
@@ -345,6 +395,8 @@
   :: (Ptr RawTGraphQQ) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TGraphQQ_Write" c_tgraphqq_write 
   :: (Ptr RawTGraphQQ) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TGraphQQ_IsA" c_tgraphqq_isa 
+  :: (Ptr RawTGraphQQ) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TGraphQQ_delete" c_tgraphqq_delete 
   :: (Ptr RawTGraphQQ) -> IO ()
 foreign import ccall "HROOT.h TGraphQQ_newTGraphQQ" c_tgraphqq_newtgraphqq 
@@ -360,6 +412,8 @@
   :: (Ptr RawTEllipse) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TEllipse_Write" c_tellipse_write 
   :: (Ptr RawTEllipse) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TEllipse_IsA" c_tellipse_isa 
+  :: (Ptr RawTEllipse) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TEllipse_SetLineColor" c_tellipse_setlinecolor 
   :: (Ptr RawTEllipse) -> CInt -> IO ()
 foreign import ccall "HROOT.h TEllipse_SetFillColor" c_tellipse_setfillcolor 
@@ -381,6 +435,8 @@
   :: (Ptr RawTArc) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TArc_Write" c_tarc_write 
   :: (Ptr RawTArc) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TArc_IsA" c_tarc_isa 
+  :: (Ptr RawTArc) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TArc_SetLineColor" c_tarc_setlinecolor 
   :: (Ptr RawTArc) -> CInt -> IO ()
 foreign import ccall "HROOT.h TArc_SetFillColor" c_tarc_setfillcolor 
@@ -402,6 +458,8 @@
   :: (Ptr RawTCrown) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TCrown_Write" c_tcrown_write 
   :: (Ptr RawTCrown) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TCrown_IsA" c_tcrown_isa 
+  :: (Ptr RawTCrown) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TCrown_SetLineColor" c_tcrown_setlinecolor 
   :: (Ptr RawTCrown) -> CInt -> IO ()
 foreign import ccall "HROOT.h TCrown_SetFillColor" c_tcrown_setfillcolor 
@@ -423,6 +481,8 @@
   :: (Ptr RawTLine) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TLine_Write" c_tline_write 
   :: (Ptr RawTLine) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TLine_IsA" c_tline_isa 
+  :: (Ptr RawTLine) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TLine_SetLineColor" c_tline_setlinecolor 
   :: (Ptr RawTLine) -> CInt -> IO ()
 foreign import ccall "HROOT.h TLine_delete" c_tline_delete 
@@ -444,6 +504,8 @@
   :: (Ptr RawTArrow) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TArrow_Write" c_tarrow_write 
   :: (Ptr RawTArrow) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TArrow_IsA" c_tarrow_isa 
+  :: (Ptr RawTArrow) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TArrow_SetLineColor" c_tarrow_setlinecolor 
   :: (Ptr RawTArrow) -> CInt -> IO ()
 foreign import ccall "HROOT.h TArrow_delete" c_tarrow_delete 
@@ -467,6 +529,8 @@
   :: (Ptr RawTGaxis) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TGaxis_Write" c_tgaxis_write 
   :: (Ptr RawTGaxis) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TGaxis_IsA" c_tgaxis_isa 
+  :: (Ptr RawTGaxis) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TGaxis_SetLineColor" c_tgaxis_setlinecolor 
   :: (Ptr RawTGaxis) -> CInt -> IO ()
 foreign import ccall "HROOT.h TGaxis_delete" c_tgaxis_delete 
@@ -492,6 +556,8 @@
   :: (Ptr RawTShape) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TShape_Write" c_tshape_write 
   :: (Ptr RawTShape) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TShape_IsA" c_tshape_isa 
+  :: (Ptr RawTShape) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TShape_delete" c_tshape_delete 
   :: (Ptr RawTShape) -> IO ()
 foreign import ccall "HROOT.h TShape_newTShape" c_tshape_newtshape 
@@ -515,6 +581,8 @@
   :: (Ptr RawTBRIK) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TBRIK_Write" c_tbrik_write 
   :: (Ptr RawTBRIK) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TBRIK_IsA" c_tbrik_isa 
+  :: (Ptr RawTBRIK) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TBRIK_delete" c_tbrik_delete 
   :: (Ptr RawTBRIK) -> IO ()
 foreign import ccall "HROOT.h TBRIK_newTBRIK" c_tbrik_newtbrik 
@@ -538,6 +606,8 @@
   :: (Ptr RawTTUBE) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TTUBE_Write" c_ttube_write 
   :: (Ptr RawTTUBE) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TTUBE_IsA" c_ttube_isa 
+  :: (Ptr RawTTUBE) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TTUBE_delete" c_ttube_delete 
   :: (Ptr RawTTUBE) -> IO ()
 foreign import ccall "HROOT.h TTUBE_newTTUBE" c_ttube_newttube 
@@ -561,6 +631,8 @@
   :: (Ptr RawTPCON) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPCON_Write" c_tpcon_write 
   :: (Ptr RawTPCON) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPCON_IsA" c_tpcon_isa 
+  :: (Ptr RawTPCON) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPCON_delete" c_tpcon_delete 
   :: (Ptr RawTPCON) -> IO ()
 foreign import ccall "HROOT.h TPCON_newTPCON" c_tpcon_newtpcon 
@@ -584,6 +656,8 @@
   :: (Ptr RawTSPHE) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TSPHE_Write" c_tsphe_write 
   :: (Ptr RawTSPHE) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TSPHE_IsA" c_tsphe_isa 
+  :: (Ptr RawTSPHE) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TSPHE_delete" c_tsphe_delete 
   :: (Ptr RawTSPHE) -> IO ()
 foreign import ccall "HROOT.h TSPHE_newTSPHE" c_tsphe_newtsphe 
@@ -607,6 +681,8 @@
   :: (Ptr RawTXTRU) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TXTRU_Write" c_txtru_write 
   :: (Ptr RawTXTRU) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TXTRU_IsA" c_txtru_isa 
+  :: (Ptr RawTXTRU) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TXTRU_delete" c_txtru_delete 
   :: (Ptr RawTXTRU) -> IO ()
 foreign import ccall "HROOT.h TXTRU_newTXTRU" c_txtru_newtxtru 
@@ -622,6 +698,8 @@
   :: (Ptr RawTBox) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TBox_Write" c_tbox_write 
   :: (Ptr RawTBox) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TBox_IsA" c_tbox_isa 
+  :: (Ptr RawTBox) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TBox_SetLineColor" c_tbox_setlinecolor 
   :: (Ptr RawTBox) -> CInt -> IO ()
 foreign import ccall "HROOT.h TBox_SetFillColor" c_tbox_setfillcolor 
@@ -643,6 +721,8 @@
   :: (Ptr RawTPave) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPave_Write" c_tpave_write 
   :: (Ptr RawTPave) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPave_IsA" c_tpave_isa 
+  :: (Ptr RawTPave) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPave_SetLineColor" c_tpave_setlinecolor 
   :: (Ptr RawTPave) -> CInt -> IO ()
 foreign import ccall "HROOT.h TPave_SetFillColor" c_tpave_setfillcolor 
@@ -670,6 +750,8 @@
   :: (Ptr RawTPaveText) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPaveText_Write" c_tpavetext_write 
   :: (Ptr RawTPaveText) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPaveText_IsA" c_tpavetext_isa 
+  :: (Ptr RawTPaveText) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPaveText_SetLineColor" c_tpavetext_setlinecolor 
   :: (Ptr RawTPaveText) -> CInt -> IO ()
 foreign import ccall "HROOT.h TPaveText_SetFillColor" c_tpavetext_setfillcolor 
@@ -697,6 +779,8 @@
   :: (Ptr RawTDiamond) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TDiamond_Write" c_tdiamond_write 
   :: (Ptr RawTDiamond) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TDiamond_IsA" c_tdiamond_isa 
+  :: (Ptr RawTDiamond) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TDiamond_SetLineColor" c_tdiamond_setlinecolor 
   :: (Ptr RawTDiamond) -> CInt -> IO ()
 foreign import ccall "HROOT.h TDiamond_SetFillColor" c_tdiamond_setfillcolor 
@@ -724,6 +808,8 @@
   :: (Ptr RawTPaveStats) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPaveStats_Write" c_tpavestats_write 
   :: (Ptr RawTPaveStats) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPaveStats_IsA" c_tpavestats_isa 
+  :: (Ptr RawTPaveStats) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPaveStats_SetLineColor" c_tpavestats_setlinecolor 
   :: (Ptr RawTPaveStats) -> CInt -> IO ()
 foreign import ccall "HROOT.h TPaveStats_SetFillColor" c_tpavestats_setfillcolor 
@@ -751,6 +837,8 @@
   :: (Ptr RawTPavesText) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPavesText_Write" c_tpavestext_write 
   :: (Ptr RawTPavesText) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPavesText_IsA" c_tpavestext_isa 
+  :: (Ptr RawTPavesText) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPavesText_SetLineColor" c_tpavestext_setlinecolor 
   :: (Ptr RawTPavesText) -> CInt -> IO ()
 foreign import ccall "HROOT.h TPavesText_SetFillColor" c_tpavestext_setfillcolor 
@@ -778,6 +866,8 @@
   :: (Ptr RawTLegend) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TLegend_Write" c_tlegend_write 
   :: (Ptr RawTLegend) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TLegend_IsA" c_tlegend_isa 
+  :: (Ptr RawTLegend) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TLegend_SetLineColor" c_tlegend_setlinecolor 
   :: (Ptr RawTLegend) -> CInt -> IO ()
 foreign import ccall "HROOT.h TLegend_SetFillColor" c_tlegend_setfillcolor 
@@ -805,6 +895,8 @@
   :: (Ptr RawTPaveLabel) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPaveLabel_Write" c_tpavelabel_write 
   :: (Ptr RawTPaveLabel) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPaveLabel_IsA" c_tpavelabel_isa 
+  :: (Ptr RawTPaveLabel) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPaveLabel_SetLineColor" c_tpavelabel_setlinecolor 
   :: (Ptr RawTPaveLabel) -> CInt -> IO ()
 foreign import ccall "HROOT.h TPaveLabel_SetFillColor" c_tpavelabel_setfillcolor 
@@ -832,6 +924,8 @@
   :: (Ptr RawTPaveClass) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPaveClass_Write" c_tpaveclass_write 
   :: (Ptr RawTPaveClass) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPaveClass_IsA" c_tpaveclass_isa 
+  :: (Ptr RawTPaveClass) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPaveClass_SetLineColor" c_tpaveclass_setlinecolor 
   :: (Ptr RawTPaveClass) -> CInt -> IO ()
 foreign import ccall "HROOT.h TPaveClass_SetFillColor" c_tpaveclass_setfillcolor 
@@ -851,6 +945,8 @@
   :: (Ptr RawTWbox) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TWbox_Write" c_twbox_write 
   :: (Ptr RawTWbox) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TWbox_IsA" c_twbox_isa 
+  :: (Ptr RawTWbox) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TWbox_SetLineColor" c_twbox_setlinecolor 
   :: (Ptr RawTWbox) -> CInt -> IO ()
 foreign import ccall "HROOT.h TWbox_SetFillColor" c_twbox_setfillcolor 
@@ -876,6 +972,8 @@
   :: (Ptr RawTFrame) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TFrame_Write" c_tframe_write 
   :: (Ptr RawTFrame) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TFrame_IsA" c_tframe_isa 
+  :: (Ptr RawTFrame) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TFrame_SetLineColor" c_tframe_setlinecolor 
   :: (Ptr RawTFrame) -> CInt -> IO ()
 foreign import ccall "HROOT.h TFrame_SetFillColor" c_tframe_setfillcolor 
@@ -899,6 +997,8 @@
   :: (Ptr RawTSliderBox) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TSliderBox_Write" c_tsliderbox_write 
   :: (Ptr RawTSliderBox) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TSliderBox_IsA" c_tsliderbox_isa 
+  :: (Ptr RawTSliderBox) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TSliderBox_SetLineColor" c_tsliderbox_setlinecolor 
   :: (Ptr RawTSliderBox) -> CInt -> IO ()
 foreign import ccall "HROOT.h TSliderBox_SetFillColor" c_tsliderbox_setfillcolor 
@@ -928,6 +1028,8 @@
   :: (Ptr RawTTree) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TTree_Write" c_ttree_write 
   :: (Ptr RawTTree) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TTree_IsA" c_ttree_isa 
+  :: (Ptr RawTTree) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TTree_delete" c_ttree_delete 
   :: (Ptr RawTTree) -> IO ()
 foreign import ccall "HROOT.h TTree_newTTree" c_ttree_newttree 
@@ -951,6 +1053,8 @@
   :: (Ptr RawTChain) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TChain_Write" c_tchain_write 
   :: (Ptr RawTChain) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TChain_IsA" c_tchain_isa 
+  :: (Ptr RawTChain) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TChain_delete" c_tchain_delete 
   :: (Ptr RawTChain) -> IO ()
 foreign import ccall "HROOT.h TChain_newTChain" c_tchain_newtchain 
@@ -974,6 +1078,8 @@
   :: (Ptr RawTNtuple) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TNtuple_Write" c_tntuple_write 
   :: (Ptr RawTNtuple) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TNtuple_IsA" c_tntuple_isa 
+  :: (Ptr RawTNtuple) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TNtuple_delete" c_tntuple_delete 
   :: (Ptr RawTNtuple) -> IO ()
 foreign import ccall "HROOT.h TNtuple_newTNtuple" c_tntuple_newtntuple 
@@ -997,6 +1103,8 @@
   :: (Ptr RawTNtupleD) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TNtupleD_Write" c_tntupled_write 
   :: (Ptr RawTNtupleD) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TNtupleD_IsA" c_tntupled_isa 
+  :: (Ptr RawTNtupleD) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TNtupleD_delete" c_tntupled_delete 
   :: (Ptr RawTNtupleD) -> IO ()
 foreign import ccall "HROOT.h TNtupleD_newTNtupleD" c_tntupled_newtntupled 
@@ -1020,6 +1128,8 @@
   :: (Ptr RawTTreeSQL) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TTreeSQL_Write" c_ttreesql_write 
   :: (Ptr RawTTreeSQL) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TTreeSQL_IsA" c_ttreesql_isa 
+  :: (Ptr RawTTreeSQL) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TTreeSQL_delete" c_ttreesql_delete 
   :: (Ptr RawTTreeSQL) -> IO ()
 
@@ -1033,6 +1143,8 @@
   :: (Ptr RawTPolyLine) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPolyLine_Write" c_tpolyline_write 
   :: (Ptr RawTPolyLine) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPolyLine_IsA" c_tpolyline_isa 
+  :: (Ptr RawTPolyLine) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPolyLine_SetLineColor" c_tpolyline_setlinecolor 
   :: (Ptr RawTPolyLine) -> CInt -> IO ()
 foreign import ccall "HROOT.h TPolyLine_SetFillColor" c_tpolyline_setfillcolor 
@@ -1054,6 +1166,8 @@
   :: (Ptr RawTCurlyLine) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TCurlyLine_Write" c_tcurlyline_write 
   :: (Ptr RawTCurlyLine) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TCurlyLine_IsA" c_tcurlyline_isa 
+  :: (Ptr RawTCurlyLine) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TCurlyLine_SetLineColor" c_tcurlyline_setlinecolor 
   :: (Ptr RawTCurlyLine) -> CInt -> IO ()
 foreign import ccall "HROOT.h TCurlyLine_SetFillColor" c_tcurlyline_setfillcolor 
@@ -1075,6 +1189,8 @@
   :: (Ptr RawTCurlyArc) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TCurlyArc_Write" c_tcurlyarc_write 
   :: (Ptr RawTCurlyArc) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TCurlyArc_IsA" c_tcurlyarc_isa 
+  :: (Ptr RawTCurlyArc) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TCurlyArc_SetLineColor" c_tcurlyarc_setlinecolor 
   :: (Ptr RawTCurlyArc) -> CInt -> IO ()
 foreign import ccall "HROOT.h TCurlyArc_SetFillColor" c_tcurlyarc_setfillcolor 
@@ -1104,6 +1220,8 @@
   :: (Ptr RawTEfficiency) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TEfficiency_Write" c_tefficiency_write 
   :: (Ptr RawTEfficiency) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TEfficiency_IsA" c_tefficiency_isa 
+  :: (Ptr RawTEfficiency) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TEfficiency_delete" c_tefficiency_delete 
   :: (Ptr RawTEfficiency) -> IO ()
 
@@ -1129,6 +1247,8 @@
   :: (Ptr RawTAxis) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TAxis_Write" c_taxis_write 
   :: (Ptr RawTAxis) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TAxis_IsA" c_taxis_isa 
+  :: (Ptr RawTAxis) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TAxis_delete" c_taxis_delete 
   :: (Ptr RawTAxis) -> IO ()
 foreign import ccall "HROOT.h TAxis_newTAxis" c_taxis_newtaxis 
@@ -1154,6 +1274,8 @@
   :: (Ptr RawTLatex) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TLatex_Write" c_tlatex_write 
   :: (Ptr RawTLatex) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TLatex_IsA" c_tlatex_isa 
+  :: (Ptr RawTLatex) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TLatex_delete" c_tlatex_delete 
   :: (Ptr RawTLatex) -> IO ()
 foreign import ccall "HROOT.h TLatex_newTLatex" c_tlatex_newtlatex 
@@ -1179,6 +1301,8 @@
   :: (Ptr RawTText) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TText_Write" c_ttext_write 
   :: (Ptr RawTText) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TText_IsA" c_ttext_isa 
+  :: (Ptr RawTText) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TText_delete" c_ttext_delete 
   :: (Ptr RawTText) -> IO ()
 
@@ -1194,13 +1318,19 @@
   :: (Ptr RawTDirectory) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TDirectory_Write" c_tdirectory_write 
   :: (Ptr RawTDirectory) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TDirectory_IsA" c_tdirectory_isa 
+  :: (Ptr RawTDirectory) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TDirectory_delete" c_tdirectory_delete 
   :: (Ptr RawTDirectory) -> IO ()
 foreign import ccall "HROOT.h TDirectory_Close" c_tdirectory_close 
   :: (Ptr RawTDirectory) -> CString -> IO ()
+foreign import ccall "HROOT.h TDirectory_Get" c_tdirectory_get 
+  :: (Ptr RawTDirectory) -> CString -> IO (Ptr RawTObject)
 
 foreign import ccall "HROOT.h TDirectoryFile_Close" c_tdirectoryfile_close 
   :: (Ptr RawTDirectoryFile) -> CString -> IO ()
+foreign import ccall "HROOT.h TDirectoryFile_Get" c_tdirectoryfile_get 
+  :: (Ptr RawTDirectoryFile) -> CString -> IO (Ptr RawTObject)
 foreign import ccall "HROOT.h TDirectoryFile_SetTitle" c_tdirectoryfile_settitle 
   :: (Ptr RawTDirectoryFile) -> CString -> IO ()
 foreign import ccall "HROOT.h TDirectoryFile_GetName" c_tdirectoryfile_getname 
@@ -1213,11 +1343,15 @@
   :: (Ptr RawTDirectoryFile) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TDirectoryFile_Write" c_tdirectoryfile_write 
   :: (Ptr RawTDirectoryFile) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TDirectoryFile_IsA" c_tdirectoryfile_isa 
+  :: (Ptr RawTDirectoryFile) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TDirectoryFile_delete" c_tdirectoryfile_delete 
   :: (Ptr RawTDirectoryFile) -> IO ()
 
 foreign import ccall "HROOT.h TFile_Close" c_tfile_close 
   :: (Ptr RawTFile) -> CString -> IO ()
+foreign import ccall "HROOT.h TFile_Get" c_tfile_get 
+  :: (Ptr RawTFile) -> CString -> IO (Ptr RawTObject)
 foreign import ccall "HROOT.h TFile_SetTitle" c_tfile_settitle 
   :: (Ptr RawTFile) -> CString -> IO ()
 foreign import ccall "HROOT.h TFile_GetName" c_tfile_getname 
@@ -1230,6 +1364,8 @@
   :: (Ptr RawTFile) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TFile_Write" c_tfile_write 
   :: (Ptr RawTFile) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TFile_IsA" c_tfile_isa 
+  :: (Ptr RawTFile) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TFile_delete" c_tfile_delete 
   :: (Ptr RawTFile) -> IO ()
 foreign import ccall "HROOT.h TFile_newTFile" c_tfile_newtfile 
@@ -1251,6 +1387,8 @@
   :: (Ptr RawTBranch) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TBranch_Write" c_tbranch_write 
   :: (Ptr RawTBranch) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TBranch_IsA" c_tbranch_isa 
+  :: (Ptr RawTBranch) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TBranch_delete" c_tbranch_delete 
   :: (Ptr RawTBranch) -> IO ()
 
@@ -1264,6 +1402,8 @@
   :: (Ptr RawTVirtualTreePlayer) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TVirtualTreePlayer_Write" c_tvirtualtreeplayer_write 
   :: (Ptr RawTVirtualTreePlayer) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TVirtualTreePlayer_IsA" c_tvirtualtreeplayer_isa 
+  :: (Ptr RawTVirtualTreePlayer) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TVirtualTreePlayer_delete" c_tvirtualtreeplayer_delete 
   :: (Ptr RawTVirtualTreePlayer) -> IO ()
 
@@ -1277,6 +1417,8 @@
   :: (Ptr RawTTreePlayer) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TTreePlayer_Write" c_ttreeplayer_write 
   :: (Ptr RawTTreePlayer) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TTreePlayer_IsA" c_ttreeplayer_isa 
+  :: (Ptr RawTTreePlayer) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TTreePlayer_delete" c_ttreeplayer_delete 
   :: (Ptr RawTTreePlayer) -> IO ()
 
@@ -1322,6 +1464,8 @@
   :: (Ptr RawTH1) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH1_Write" c_th1_write 
   :: (Ptr RawTH1) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH1_IsA" c_th1_isa 
+  :: (Ptr RawTH1) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH1_delete" c_th1_delete 
   :: (Ptr RawTH1) -> IO ()
 foreign import ccall "HROOT.h TH1_Add" c_th1_add 
@@ -1553,6 +1697,8 @@
   :: (Ptr RawTH2) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH2_Write" c_th2_write 
   :: (Ptr RawTH2) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH2_IsA" c_th2_isa 
+  :: (Ptr RawTH2) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH2_delete" c_th2_delete 
   :: (Ptr RawTH2) -> IO ()
 foreign import ccall "HROOT.h TH2_fill2" c_th2_fill2 
@@ -1674,6 +1820,8 @@
   :: (Ptr RawTH3) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH3_Write" c_th3_write 
   :: (Ptr RawTH3) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH3_IsA" c_th3_isa 
+  :: (Ptr RawTH3) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH3_delete" c_th3_delete 
   :: (Ptr RawTH3) -> IO ()
 
@@ -1793,6 +1941,8 @@
   :: (Ptr RawTH1C) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH1C_Write" c_th1c_write 
   :: (Ptr RawTH1C) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH1C_IsA" c_th1c_isa 
+  :: (Ptr RawTH1C) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH1C_delete" c_th1c_delete 
   :: (Ptr RawTH1C) -> IO ()
 
@@ -1912,6 +2062,8 @@
   :: (Ptr RawTH1D) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH1D_Write" c_th1d_write 
   :: (Ptr RawTH1D) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH1D_IsA" c_th1d_isa 
+  :: (Ptr RawTH1D) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH1D_delete" c_th1d_delete 
   :: (Ptr RawTH1D) -> IO ()
 
@@ -2031,6 +2183,8 @@
   :: (Ptr RawTH1F) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH1F_Write" c_th1f_write 
   :: (Ptr RawTH1F) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH1F_IsA" c_th1f_isa 
+  :: (Ptr RawTH1F) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH1F_delete" c_th1f_delete 
   :: (Ptr RawTH1F) -> IO ()
 foreign import ccall "HROOT.h TH1F_newTH1F" c_th1f_newth1f 
@@ -2152,6 +2306,8 @@
   :: (Ptr RawTH1I) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH1I_Write" c_th1i_write 
   :: (Ptr RawTH1I) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH1I_IsA" c_th1i_isa 
+  :: (Ptr RawTH1I) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH1I_delete" c_th1i_delete 
   :: (Ptr RawTH1I) -> IO ()
 
@@ -2271,6 +2427,8 @@
   :: (Ptr RawTH1S) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH1S_Write" c_th1s_write 
   :: (Ptr RawTH1S) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH1S_IsA" c_th1s_isa 
+  :: (Ptr RawTH1S) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH1S_delete" c_th1s_delete 
   :: (Ptr RawTH1S) -> IO ()
 
@@ -2392,6 +2550,8 @@
   :: (Ptr RawTH2C) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH2C_Write" c_th2c_write 
   :: (Ptr RawTH2C) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH2C_IsA" c_th2c_isa 
+  :: (Ptr RawTH2C) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH2C_delete" c_th2c_delete 
   :: (Ptr RawTH2C) -> IO ()
 
@@ -2513,6 +2673,8 @@
   :: (Ptr RawTH2D) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH2D_Write" c_th2d_write 
   :: (Ptr RawTH2D) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH2D_IsA" c_th2d_isa 
+  :: (Ptr RawTH2D) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH2D_delete" c_th2d_delete 
   :: (Ptr RawTH2D) -> IO ()
 
@@ -2634,6 +2796,8 @@
   :: (Ptr RawTH2F) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH2F_Write" c_th2f_write 
   :: (Ptr RawTH2F) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH2F_IsA" c_th2f_isa 
+  :: (Ptr RawTH2F) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH2F_delete" c_th2f_delete 
   :: (Ptr RawTH2F) -> IO ()
 foreign import ccall "HROOT.h TH2F_newTH2F" c_th2f_newth2f 
@@ -2757,6 +2921,8 @@
   :: (Ptr RawTH2I) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH2I_Write" c_th2i_write 
   :: (Ptr RawTH2I) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH2I_IsA" c_th2i_isa 
+  :: (Ptr RawTH2I) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH2I_delete" c_th2i_delete 
   :: (Ptr RawTH2I) -> IO ()
 
@@ -2878,6 +3044,8 @@
   :: (Ptr RawTH2Poly) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH2Poly_Write" c_th2poly_write 
   :: (Ptr RawTH2Poly) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH2Poly_IsA" c_th2poly_isa 
+  :: (Ptr RawTH2Poly) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH2Poly_delete" c_th2poly_delete 
   :: (Ptr RawTH2Poly) -> IO ()
 
@@ -2999,6 +3167,8 @@
   :: (Ptr RawTH2S) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH2S_Write" c_th2s_write 
   :: (Ptr RawTH2S) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH2S_IsA" c_th2s_isa 
+  :: (Ptr RawTH2S) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH2S_delete" c_th2s_delete 
   :: (Ptr RawTH2S) -> IO ()
 
@@ -3118,6 +3288,8 @@
   :: (Ptr RawTH3C) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH3C_Write" c_th3c_write 
   :: (Ptr RawTH3C) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH3C_IsA" c_th3c_isa 
+  :: (Ptr RawTH3C) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH3C_delete" c_th3c_delete 
   :: (Ptr RawTH3C) -> IO ()
 
@@ -3237,6 +3409,8 @@
   :: (Ptr RawTH3D) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH3D_Write" c_th3d_write 
   :: (Ptr RawTH3D) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH3D_IsA" c_th3d_isa 
+  :: (Ptr RawTH3D) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH3D_delete" c_th3d_delete 
   :: (Ptr RawTH3D) -> IO ()
 
@@ -3356,6 +3530,8 @@
   :: (Ptr RawTH3F) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH3F_Write" c_th3f_write 
   :: (Ptr RawTH3F) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH3F_IsA" c_th3f_isa 
+  :: (Ptr RawTH3F) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH3F_delete" c_th3f_delete 
   :: (Ptr RawTH3F) -> IO ()
 
@@ -3475,6 +3651,8 @@
   :: (Ptr RawTH3I) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH3I_Write" c_th3i_write 
   :: (Ptr RawTH3I) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH3I_IsA" c_th3i_isa 
+  :: (Ptr RawTH3I) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH3I_delete" c_th3i_delete 
   :: (Ptr RawTH3I) -> IO ()
 
@@ -3594,6 +3772,8 @@
   :: (Ptr RawTH3S) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TH3S_Write" c_th3s_write 
   :: (Ptr RawTH3S) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TH3S_IsA" c_th3s_isa 
+  :: (Ptr RawTH3S) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TH3S_delete" c_th3s_delete 
   :: (Ptr RawTH3S) -> IO ()
 
@@ -3610,6 +3790,8 @@
   :: (Ptr RawTVirtualPad) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TVirtualPad_Write" c_tvirtualpad_write 
   :: (Ptr RawTVirtualPad) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TVirtualPad_IsA" c_tvirtualpad_isa 
+  :: (Ptr RawTVirtualPad) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TVirtualPad_SetLineColor" c_tvirtualpad_setlinecolor 
   :: (Ptr RawTVirtualPad) -> CInt -> IO ()
 foreign import ccall "HROOT.h TVirtualPad_SetFillColor" c_tvirtualpad_setfillcolor 
@@ -3637,6 +3819,8 @@
   :: (Ptr RawTPad) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TPad_Write" c_tpad_write 
   :: (Ptr RawTPad) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TPad_IsA" c_tpad_isa 
+  :: (Ptr RawTPad) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TPad_SetLineColor" c_tpad_setlinecolor 
   :: (Ptr RawTPad) -> CInt -> IO ()
 foreign import ccall "HROOT.h TPad_SetFillColor" c_tpad_setfillcolor 
@@ -3666,6 +3850,8 @@
   :: (Ptr RawTButton) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TButton_Write" c_tbutton_write 
   :: (Ptr RawTButton) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TButton_IsA" c_tbutton_isa 
+  :: (Ptr RawTButton) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TButton_SetLineColor" c_tbutton_setlinecolor 
   :: (Ptr RawTButton) -> CInt -> IO ()
 foreign import ccall "HROOT.h TButton_SetFillColor" c_tbutton_setfillcolor 
@@ -3695,6 +3881,8 @@
   :: (Ptr RawTGroupButton) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TGroupButton_Write" c_tgroupbutton_write 
   :: (Ptr RawTGroupButton) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TGroupButton_IsA" c_tgroupbutton_isa 
+  :: (Ptr RawTGroupButton) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TGroupButton_SetLineColor" c_tgroupbutton_setlinecolor 
   :: (Ptr RawTGroupButton) -> CInt -> IO ()
 foreign import ccall "HROOT.h TGroupButton_SetFillColor" c_tgroupbutton_setfillcolor 
@@ -3718,6 +3906,8 @@
   :: (Ptr RawTCanvas) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TCanvas_Write" c_tcanvas_write 
   :: (Ptr RawTCanvas) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TCanvas_IsA" c_tcanvas_isa 
+  :: (Ptr RawTCanvas) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TCanvas_SetLineColor" c_tcanvas_setlinecolor 
   :: (Ptr RawTCanvas) -> CInt -> IO ()
 foreign import ccall "HROOT.h TCanvas_SetFillColor" c_tcanvas_setfillcolor 
@@ -3749,6 +3939,8 @@
   :: (Ptr RawTDialogCanvas) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TDialogCanvas_Write" c_tdialogcanvas_write 
   :: (Ptr RawTDialogCanvas) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TDialogCanvas_IsA" c_tdialogcanvas_isa 
+  :: (Ptr RawTDialogCanvas) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TDialogCanvas_SetLineColor" c_tdialogcanvas_setlinecolor 
   :: (Ptr RawTDialogCanvas) -> CInt -> IO ()
 foreign import ccall "HROOT.h TDialogCanvas_SetFillColor" c_tdialogcanvas_setfillcolor 
@@ -3778,6 +3970,8 @@
   :: (Ptr RawTInspectCanvas) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TInspectCanvas_Write" c_tinspectcanvas_write 
   :: (Ptr RawTInspectCanvas) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TInspectCanvas_IsA" c_tinspectcanvas_isa 
+  :: (Ptr RawTInspectCanvas) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TInspectCanvas_SetLineColor" c_tinspectcanvas_setlinecolor 
   :: (Ptr RawTInspectCanvas) -> CInt -> IO ()
 foreign import ccall "HROOT.h TInspectCanvas_SetFillColor" c_tinspectcanvas_setfillcolor 
@@ -3801,6 +3995,8 @@
   :: (Ptr RawTEvePad) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TEvePad_Write" c_tevepad_write 
   :: (Ptr RawTEvePad) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TEvePad_IsA" c_tevepad_isa 
+  :: (Ptr RawTEvePad) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TEvePad_SetLineColor" c_tevepad_setlinecolor 
   :: (Ptr RawTEvePad) -> CInt -> IO ()
 foreign import ccall "HROOT.h TEvePad_SetFillColor" c_tevepad_setfillcolor 
@@ -3824,6 +4020,8 @@
   :: (Ptr RawTSlider) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TSlider_Write" c_tslider_write 
   :: (Ptr RawTSlider) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TSlider_IsA" c_tslider_isa 
+  :: (Ptr RawTSlider) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TSlider_SetLineColor" c_tslider_setlinecolor 
   :: (Ptr RawTSlider) -> CInt -> IO ()
 foreign import ccall "HROOT.h TSlider_SetFillColor" c_tslider_setfillcolor 
@@ -3843,6 +4041,8 @@
   :: (Ptr RawTApplication) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TApplication_Write" c_tapplication_write 
   :: (Ptr RawTApplication) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TApplication_IsA" c_tapplication_isa 
+  :: (Ptr RawTApplication) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TApplication_delete" c_tapplication_delete 
   :: (Ptr RawTApplication) -> IO ()
 foreign import ccall "HROOT.h TApplication_newTApplication" c_tapplication_newtapplication 
@@ -3862,6 +4062,8 @@
   :: (Ptr RawTRint) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TRint_Write" c_trint_write 
   :: (Ptr RawTRint) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TRint_IsA" c_trint_isa 
+  :: (Ptr RawTRint) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TRint_delete" c_trint_delete 
   :: (Ptr RawTRint) -> IO ()
 foreign import ccall "HROOT.h TRint_newTRint" c_trint_newtrint 
@@ -3879,6 +4081,8 @@
   :: (Ptr RawTRandom) -> CString -> CString -> IO ()
 foreign import ccall "HROOT.h TRandom_Write" c_trandom_write 
   :: (Ptr RawTRandom) -> CString -> CInt -> CInt -> IO CInt
+foreign import ccall "HROOT.h TRandom_IsA" c_trandom_isa 
+  :: (Ptr RawTRandom) -> IO (Ptr RawTClass)
 foreign import ccall "HROOT.h TRandom_delete" c_trandom_delete 
   :: (Ptr RawTRandom) -> IO ()
 foreign import ccall "HROOT.h TRandom_newTRandom" c_trandom_newtrandom 
diff --git a/src/HROOT/Class/Implementation.hs b/src/HROOT/Class/Implementation.hs
--- a/src/HROOT/Class/Implementation.hs
+++ b/src/HROOT/Class/Implementation.hs
@@ -24,6 +24,12 @@
   cast = unsafeForeignPtrToPtr . castForeignPtr . get_fptr
   uncast = cast_fptr_to_obj . castForeignPtr . unsafePerformIO . newForeignPtr_ 
 
+
+
+instance (ITClass a, FPtr a) => Castable a (Ptr RawTClass) where
+  cast = unsafeForeignPtrToPtr . castForeignPtr . get_fptr
+  uncast = cast_fptr_to_obj . castForeignPtr . unsafePerformIO . newForeignPtr_ 
+
 instance (ITFormula a, FPtr a) => Castable a (Ptr RawTFormula) where
   cast = unsafeForeignPtrToPtr . castForeignPtr . get_fptr
   uncast = cast_fptr_to_obj . castForeignPtr . unsafePerformIO . newForeignPtr_ 
@@ -454,6 +460,15 @@
   cast = unsafeForeignPtrToPtr . get_fptr
   uncast = cast_fptr_to_obj . unsafePerformIO . newForeignPtr_
 
+instance FPtr (Exist TClass) where
+  type Raw (Exist TClass) = RawTClass
+  get_fptr (ETClass obj) = castForeignPtr (get_fptr obj)
+  cast_fptr_to_obj fptr = ETClass (cast_fptr_to_obj (fptr :: ForeignPtr RawTClass) :: TClass)
+
+instance Castable (Exist TClass) (Ptr RawTClass) where
+  cast = unsafeForeignPtrToPtr . get_fptr
+  uncast = cast_fptr_to_obj . unsafePerformIO . newForeignPtr_
+
 instance FPtr (Exist TFormula) where
   type Raw (Exist TFormula) = RawTFormula
   get_fptr (ETFormula obj) = castForeignPtr (get_fptr obj)
@@ -1389,10 +1404,15 @@
   findObject = xform1 c_tobject_findobject
   saveAs = xform2 c_tobject_saveas
   write = xform3 c_tobject_write
+  isA = xform0 c_tobject_isa
 
 instance ITNamed TNamed where
   setTitle = xform1 c_tnamed_settitle
 
+
+
+instance ITClass TClass where
+
 instance ITFormula TFormula where
   getParameter = xform1 c_tformula_getparameter
   setParameter = xform2 c_tformula_setparameter
@@ -1523,6 +1543,7 @@
 
 instance ITDirectory TDirectory where
   close = xform1 c_tdirectory_close
+  get = xform1 c_tdirectory_get
 
 instance ITDirectoryFile TDirectoryFile where
 
@@ -1978,6 +1999,11 @@
 instance IDeletable TFormula where
   delete = xform0 c_tformula_delete
 
+instance IDeletable TClass where
+  delete = xform0 c_tclass_delete
+
+
+
 instance IDeletable TNamed where
   delete = xform0 c_tnamed_delete
 
@@ -2756,11 +2782,15 @@
 
 instance ITCurlyLine TCurlyArc where
 
+instance ITDictionary TClass where
+
 instance ITDirectory TFile where
   close = xform1 c_tfile_close
+  get = xform1 c_tfile_get
 
 instance ITDirectory TDirectoryFile where
   close = xform1 c_tdirectoryfile_close
+  get = xform1 c_tdirectoryfile_get
 
 instance ITDirectoryFile TFile where
 
@@ -3886,12 +3916,18 @@
 instance ITNamed TFormula where
   setTitle = xform1 c_tformula_settitle
 
+instance ITNamed TClass where
+  setTitle = xform1 c_tclass_settitle
+
+
+
 instance ITObject TRandom where
   getName = xform0 c_trandom_getname
   draw = xform1 c_trandom_draw
   findObject = xform1 c_trandom_findobject
   saveAs = xform2 c_trandom_saveas
   write = xform3 c_trandom_write
+  isA = xform0 c_trandom_isa
 
 instance ITObject TRint where
   getName = xform0 c_trint_getname
@@ -3899,6 +3935,7 @@
   findObject = xform1 c_trint_findobject
   saveAs = xform2 c_trint_saveas
   write = xform3 c_trint_write
+  isA = xform0 c_trint_isa
 
 instance ITObject TApplication where
   getName = xform0 c_tapplication_getname
@@ -3906,6 +3943,7 @@
   findObject = xform1 c_tapplication_findobject
   saveAs = xform2 c_tapplication_saveas
   write = xform3 c_tapplication_write
+  isA = xform0 c_tapplication_isa
 
 instance ITObject TSlider where
   getName = xform0 c_tslider_getname
@@ -3913,6 +3951,7 @@
   findObject = xform1 c_tslider_findobject
   saveAs = xform2 c_tslider_saveas
   write = xform3 c_tslider_write
+  isA = xform0 c_tslider_isa
 
 instance ITObject TEvePad where
   getName = xform0 c_tevepad_getname
@@ -3920,6 +3959,7 @@
   findObject = xform1 c_tevepad_findobject
   saveAs = xform2 c_tevepad_saveas
   write = xform3 c_tevepad_write
+  isA = xform0 c_tevepad_isa
 
 instance ITObject TInspectCanvas where
   getName = xform0 c_tinspectcanvas_getname
@@ -3927,6 +3967,7 @@
   findObject = xform1 c_tinspectcanvas_findobject
   saveAs = xform2 c_tinspectcanvas_saveas
   write = xform3 c_tinspectcanvas_write
+  isA = xform0 c_tinspectcanvas_isa
 
 instance ITObject TDialogCanvas where
   getName = xform0 c_tdialogcanvas_getname
@@ -3934,6 +3975,7 @@
   findObject = xform1 c_tdialogcanvas_findobject
   saveAs = xform2 c_tdialogcanvas_saveas
   write = xform3 c_tdialogcanvas_write
+  isA = xform0 c_tdialogcanvas_isa
 
 instance ITObject TCanvas where
   getName = xform0 c_tcanvas_getname
@@ -3941,6 +3983,7 @@
   findObject = xform1 c_tcanvas_findobject
   saveAs = xform2 c_tcanvas_saveas
   write = xform3 c_tcanvas_write
+  isA = xform0 c_tcanvas_isa
 
 instance ITObject TGroupButton where
   getName = xform0 c_tgroupbutton_getname
@@ -3948,6 +3991,7 @@
   findObject = xform1 c_tgroupbutton_findobject
   saveAs = xform2 c_tgroupbutton_saveas
   write = xform3 c_tgroupbutton_write
+  isA = xform0 c_tgroupbutton_isa
 
 instance ITObject TButton where
   getName = xform0 c_tbutton_getname
@@ -3955,6 +3999,7 @@
   findObject = xform1 c_tbutton_findobject
   saveAs = xform2 c_tbutton_saveas
   write = xform3 c_tbutton_write
+  isA = xform0 c_tbutton_isa
 
 instance ITObject TPad where
   getName = xform0 c_tpad_getname
@@ -3962,6 +4007,7 @@
   findObject = xform1 c_tpad_findobject
   saveAs = xform2 c_tpad_saveas
   write = xform3 c_tpad_write
+  isA = xform0 c_tpad_isa
 
 instance ITObject TVirtualPad where
   getName = xform0 c_tvirtualpad_getname
@@ -3969,6 +4015,7 @@
   findObject = xform1 c_tvirtualpad_findobject
   saveAs = xform2 c_tvirtualpad_saveas
   write = xform3 c_tvirtualpad_write
+  isA = xform0 c_tvirtualpad_isa
 
 instance ITObject TH3S where
   getName = xform0 c_th3s_getname
@@ -3976,6 +4023,7 @@
   findObject = xform1 c_th3s_findobject
   saveAs = xform2 c_th3s_saveas
   write = xform3 c_th3s_write
+  isA = xform0 c_th3s_isa
 
 instance ITObject TH3I where
   getName = xform0 c_th3i_getname
@@ -3983,6 +4031,7 @@
   findObject = xform1 c_th3i_findobject
   saveAs = xform2 c_th3i_saveas
   write = xform3 c_th3i_write
+  isA = xform0 c_th3i_isa
 
 instance ITObject TH3F where
   getName = xform0 c_th3f_getname
@@ -3990,6 +4039,7 @@
   findObject = xform1 c_th3f_findobject
   saveAs = xform2 c_th3f_saveas
   write = xform3 c_th3f_write
+  isA = xform0 c_th3f_isa
 
 instance ITObject TH3D where
   getName = xform0 c_th3d_getname
@@ -3997,6 +4047,7 @@
   findObject = xform1 c_th3d_findobject
   saveAs = xform2 c_th3d_saveas
   write = xform3 c_th3d_write
+  isA = xform0 c_th3d_isa
 
 instance ITObject TH3C where
   getName = xform0 c_th3c_getname
@@ -4004,6 +4055,7 @@
   findObject = xform1 c_th3c_findobject
   saveAs = xform2 c_th3c_saveas
   write = xform3 c_th3c_write
+  isA = xform0 c_th3c_isa
 
 instance ITObject TH2S where
   getName = xform0 c_th2s_getname
@@ -4011,6 +4063,7 @@
   findObject = xform1 c_th2s_findobject
   saveAs = xform2 c_th2s_saveas
   write = xform3 c_th2s_write
+  isA = xform0 c_th2s_isa
 
 instance ITObject TH2Poly where
   getName = xform0 c_th2poly_getname
@@ -4018,6 +4071,7 @@
   findObject = xform1 c_th2poly_findobject
   saveAs = xform2 c_th2poly_saveas
   write = xform3 c_th2poly_write
+  isA = xform0 c_th2poly_isa
 
 instance ITObject TH2I where
   getName = xform0 c_th2i_getname
@@ -4025,6 +4079,7 @@
   findObject = xform1 c_th2i_findobject
   saveAs = xform2 c_th2i_saveas
   write = xform3 c_th2i_write
+  isA = xform0 c_th2i_isa
 
 instance ITObject TH2F where
   getName = xform0 c_th2f_getname
@@ -4032,6 +4087,7 @@
   findObject = xform1 c_th2f_findobject
   saveAs = xform2 c_th2f_saveas
   write = xform3 c_th2f_write
+  isA = xform0 c_th2f_isa
 
 instance ITObject TH2D where
   getName = xform0 c_th2d_getname
@@ -4039,6 +4095,7 @@
   findObject = xform1 c_th2d_findobject
   saveAs = xform2 c_th2d_saveas
   write = xform3 c_th2d_write
+  isA = xform0 c_th2d_isa
 
 instance ITObject TH2C where
   getName = xform0 c_th2c_getname
@@ -4046,6 +4103,7 @@
   findObject = xform1 c_th2c_findobject
   saveAs = xform2 c_th2c_saveas
   write = xform3 c_th2c_write
+  isA = xform0 c_th2c_isa
 
 instance ITObject TH1S where
   getName = xform0 c_th1s_getname
@@ -4053,6 +4111,7 @@
   findObject = xform1 c_th1s_findobject
   saveAs = xform2 c_th1s_saveas
   write = xform3 c_th1s_write
+  isA = xform0 c_th1s_isa
 
 instance ITObject TH1I where
   getName = xform0 c_th1i_getname
@@ -4060,6 +4119,7 @@
   findObject = xform1 c_th1i_findobject
   saveAs = xform2 c_th1i_saveas
   write = xform3 c_th1i_write
+  isA = xform0 c_th1i_isa
 
 instance ITObject TH1F where
   getName = xform0 c_th1f_getname
@@ -4067,6 +4127,7 @@
   findObject = xform1 c_th1f_findobject
   saveAs = xform2 c_th1f_saveas
   write = xform3 c_th1f_write
+  isA = xform0 c_th1f_isa
 
 instance ITObject TH1D where
   getName = xform0 c_th1d_getname
@@ -4074,6 +4135,7 @@
   findObject = xform1 c_th1d_findobject
   saveAs = xform2 c_th1d_saveas
   write = xform3 c_th1d_write
+  isA = xform0 c_th1d_isa
 
 instance ITObject TH1C where
   getName = xform0 c_th1c_getname
@@ -4081,6 +4143,7 @@
   findObject = xform1 c_th1c_findobject
   saveAs = xform2 c_th1c_saveas
   write = xform3 c_th1c_write
+  isA = xform0 c_th1c_isa
 
 instance ITObject TH3 where
   getName = xform0 c_th3_getname
@@ -4088,6 +4151,7 @@
   findObject = xform1 c_th3_findobject
   saveAs = xform2 c_th3_saveas
   write = xform3 c_th3_write
+  isA = xform0 c_th3_isa
 
 instance ITObject TH2 where
   getName = xform0 c_th2_getname
@@ -4095,6 +4159,7 @@
   findObject = xform1 c_th2_findobject
   saveAs = xform2 c_th2_saveas
   write = xform3 c_th2_write
+  isA = xform0 c_th2_isa
 
 instance ITObject TH1 where
   getName = xform0 c_th1_getname
@@ -4102,6 +4167,7 @@
   findObject = xform1 c_th1_findobject
   saveAs = xform2 c_th1_saveas
   write = xform3 c_th1_write
+  isA = xform0 c_th1_isa
 
 instance ITObject TTreePlayer where
   getName = xform0 c_ttreeplayer_getname
@@ -4109,6 +4175,7 @@
   findObject = xform1 c_ttreeplayer_findobject
   saveAs = xform2 c_ttreeplayer_saveas
   write = xform3 c_ttreeplayer_write
+  isA = xform0 c_ttreeplayer_isa
 
 instance ITObject TVirtualTreePlayer where
   getName = xform0 c_tvirtualtreeplayer_getname
@@ -4116,6 +4183,7 @@
   findObject = xform1 c_tvirtualtreeplayer_findobject
   saveAs = xform2 c_tvirtualtreeplayer_saveas
   write = xform3 c_tvirtualtreeplayer_write
+  isA = xform0 c_tvirtualtreeplayer_isa
 
 instance ITObject TBranch where
   getName = xform0 c_tbranch_getname
@@ -4123,6 +4191,7 @@
   findObject = xform1 c_tbranch_findobject
   saveAs = xform2 c_tbranch_saveas
   write = xform3 c_tbranch_write
+  isA = xform0 c_tbranch_isa
 
 instance ITObject TFile where
   getName = xform0 c_tfile_getname
@@ -4130,6 +4199,7 @@
   findObject = xform1 c_tfile_findobject
   saveAs = xform2 c_tfile_saveas
   write = xform3 c_tfile_write
+  isA = xform0 c_tfile_isa
 
 instance ITObject TDirectoryFile where
   getName = xform0 c_tdirectoryfile_getname
@@ -4137,6 +4207,7 @@
   findObject = xform1 c_tdirectoryfile_findobject
   saveAs = xform2 c_tdirectoryfile_saveas
   write = xform3 c_tdirectoryfile_write
+  isA = xform0 c_tdirectoryfile_isa
 
 instance ITObject TDirectory where
   getName = xform0 c_tdirectory_getname
@@ -4144,6 +4215,7 @@
   findObject = xform1 c_tdirectory_findobject
   saveAs = xform2 c_tdirectory_saveas
   write = xform3 c_tdirectory_write
+  isA = xform0 c_tdirectory_isa
 
 instance ITObject TText where
   getName = xform0 c_ttext_getname
@@ -4151,6 +4223,7 @@
   findObject = xform1 c_ttext_findobject
   saveAs = xform2 c_ttext_saveas
   write = xform3 c_ttext_write
+  isA = xform0 c_ttext_isa
 
 instance ITObject TLatex where
   getName = xform0 c_tlatex_getname
@@ -4158,6 +4231,7 @@
   findObject = xform1 c_tlatex_findobject
   saveAs = xform2 c_tlatex_saveas
   write = xform3 c_tlatex_write
+  isA = xform0 c_tlatex_isa
 
 instance ITObject TAxis where
   getName = xform0 c_taxis_getname
@@ -4165,6 +4239,7 @@
   findObject = xform1 c_taxis_findobject
   saveAs = xform2 c_taxis_saveas
   write = xform3 c_taxis_write
+  isA = xform0 c_taxis_isa
 
 instance ITObject TEfficiency where
   getName = xform0 c_tefficiency_getname
@@ -4172,6 +4247,7 @@
   findObject = xform1 c_tefficiency_findobject
   saveAs = xform2 c_tefficiency_saveas
   write = xform3 c_tefficiency_write
+  isA = xform0 c_tefficiency_isa
 
 instance ITObject TCurlyArc where
   getName = xform0 c_tcurlyarc_getname
@@ -4179,6 +4255,7 @@
   findObject = xform1 c_tcurlyarc_findobject
   saveAs = xform2 c_tcurlyarc_saveas
   write = xform3 c_tcurlyarc_write
+  isA = xform0 c_tcurlyarc_isa
 
 instance ITObject TCurlyLine where
   getName = xform0 c_tcurlyline_getname
@@ -4186,6 +4263,7 @@
   findObject = xform1 c_tcurlyline_findobject
   saveAs = xform2 c_tcurlyline_saveas
   write = xform3 c_tcurlyline_write
+  isA = xform0 c_tcurlyline_isa
 
 instance ITObject TPolyLine where
   getName = xform0 c_tpolyline_getname
@@ -4193,6 +4271,7 @@
   findObject = xform1 c_tpolyline_findobject
   saveAs = xform2 c_tpolyline_saveas
   write = xform3 c_tpolyline_write
+  isA = xform0 c_tpolyline_isa
 
 instance ITObject TTreeSQL where
   getName = xform0 c_ttreesql_getname
@@ -4200,6 +4279,7 @@
   findObject = xform1 c_ttreesql_findobject
   saveAs = xform2 c_ttreesql_saveas
   write = xform3 c_ttreesql_write
+  isA = xform0 c_ttreesql_isa
 
 instance ITObject TNtupleD where
   getName = xform0 c_tntupled_getname
@@ -4207,6 +4287,7 @@
   findObject = xform1 c_tntupled_findobject
   saveAs = xform2 c_tntupled_saveas
   write = xform3 c_tntupled_write
+  isA = xform0 c_tntupled_isa
 
 instance ITObject TNtuple where
   getName = xform0 c_tntuple_getname
@@ -4214,6 +4295,7 @@
   findObject = xform1 c_tntuple_findobject
   saveAs = xform2 c_tntuple_saveas
   write = xform3 c_tntuple_write
+  isA = xform0 c_tntuple_isa
 
 instance ITObject TChain where
   getName = xform0 c_tchain_getname
@@ -4221,6 +4303,7 @@
   findObject = xform1 c_tchain_findobject
   saveAs = xform2 c_tchain_saveas
   write = xform3 c_tchain_write
+  isA = xform0 c_tchain_isa
 
 instance ITObject TTree where
   getName = xform0 c_ttree_getname
@@ -4228,6 +4311,7 @@
   findObject = xform1 c_ttree_findobject
   saveAs = xform2 c_ttree_saveas
   write = xform3 c_ttree_write
+  isA = xform0 c_ttree_isa
 
 instance ITObject TSliderBox where
   getName = xform0 c_tsliderbox_getname
@@ -4235,6 +4319,7 @@
   findObject = xform1 c_tsliderbox_findobject
   saveAs = xform2 c_tsliderbox_saveas
   write = xform3 c_tsliderbox_write
+  isA = xform0 c_tsliderbox_isa
 
 instance ITObject TFrame where
   getName = xform0 c_tframe_getname
@@ -4242,6 +4327,7 @@
   findObject = xform1 c_tframe_findobject
   saveAs = xform2 c_tframe_saveas
   write = xform3 c_tframe_write
+  isA = xform0 c_tframe_isa
 
 instance ITObject TWbox where
   getName = xform0 c_twbox_getname
@@ -4249,6 +4335,7 @@
   findObject = xform1 c_twbox_findobject
   saveAs = xform2 c_twbox_saveas
   write = xform3 c_twbox_write
+  isA = xform0 c_twbox_isa
 
 instance ITObject TPaveClass where
   getName = xform0 c_tpaveclass_getname
@@ -4256,6 +4343,7 @@
   findObject = xform1 c_tpaveclass_findobject
   saveAs = xform2 c_tpaveclass_saveas
   write = xform3 c_tpaveclass_write
+  isA = xform0 c_tpaveclass_isa
 
 instance ITObject TPaveLabel where
   getName = xform0 c_tpavelabel_getname
@@ -4263,6 +4351,7 @@
   findObject = xform1 c_tpavelabel_findobject
   saveAs = xform2 c_tpavelabel_saveas
   write = xform3 c_tpavelabel_write
+  isA = xform0 c_tpavelabel_isa
 
 instance ITObject TLegend where
   getName = xform0 c_tlegend_getname
@@ -4270,6 +4359,7 @@
   findObject = xform1 c_tlegend_findobject
   saveAs = xform2 c_tlegend_saveas
   write = xform3 c_tlegend_write
+  isA = xform0 c_tlegend_isa
 
 instance ITObject TPavesText where
   getName = xform0 c_tpavestext_getname
@@ -4277,6 +4367,7 @@
   findObject = xform1 c_tpavestext_findobject
   saveAs = xform2 c_tpavestext_saveas
   write = xform3 c_tpavestext_write
+  isA = xform0 c_tpavestext_isa
 
 instance ITObject TPaveStats where
   getName = xform0 c_tpavestats_getname
@@ -4284,6 +4375,7 @@
   findObject = xform1 c_tpavestats_findobject
   saveAs = xform2 c_tpavestats_saveas
   write = xform3 c_tpavestats_write
+  isA = xform0 c_tpavestats_isa
 
 instance ITObject TDiamond where
   getName = xform0 c_tdiamond_getname
@@ -4291,6 +4383,7 @@
   findObject = xform1 c_tdiamond_findobject
   saveAs = xform2 c_tdiamond_saveas
   write = xform3 c_tdiamond_write
+  isA = xform0 c_tdiamond_isa
 
 instance ITObject TPaveText where
   getName = xform0 c_tpavetext_getname
@@ -4298,6 +4391,7 @@
   findObject = xform1 c_tpavetext_findobject
   saveAs = xform2 c_tpavetext_saveas
   write = xform3 c_tpavetext_write
+  isA = xform0 c_tpavetext_isa
 
 instance ITObject TPave where
   getName = xform0 c_tpave_getname
@@ -4305,6 +4399,7 @@
   findObject = xform1 c_tpave_findobject
   saveAs = xform2 c_tpave_saveas
   write = xform3 c_tpave_write
+  isA = xform0 c_tpave_isa
 
 instance ITObject TBox where
   getName = xform0 c_tbox_getname
@@ -4312,6 +4407,7 @@
   findObject = xform1 c_tbox_findobject
   saveAs = xform2 c_tbox_saveas
   write = xform3 c_tbox_write
+  isA = xform0 c_tbox_isa
 
 instance ITObject TXTRU where
   getName = xform0 c_txtru_getname
@@ -4319,6 +4415,7 @@
   findObject = xform1 c_txtru_findobject
   saveAs = xform2 c_txtru_saveas
   write = xform3 c_txtru_write
+  isA = xform0 c_txtru_isa
 
 instance ITObject TSPHE where
   getName = xform0 c_tsphe_getname
@@ -4326,6 +4423,7 @@
   findObject = xform1 c_tsphe_findobject
   saveAs = xform2 c_tsphe_saveas
   write = xform3 c_tsphe_write
+  isA = xform0 c_tsphe_isa
 
 instance ITObject TPCON where
   getName = xform0 c_tpcon_getname
@@ -4333,6 +4431,7 @@
   findObject = xform1 c_tpcon_findobject
   saveAs = xform2 c_tpcon_saveas
   write = xform3 c_tpcon_write
+  isA = xform0 c_tpcon_isa
 
 instance ITObject TTUBE where
   getName = xform0 c_ttube_getname
@@ -4340,6 +4439,7 @@
   findObject = xform1 c_ttube_findobject
   saveAs = xform2 c_ttube_saveas
   write = xform3 c_ttube_write
+  isA = xform0 c_ttube_isa
 
 instance ITObject TBRIK where
   getName = xform0 c_tbrik_getname
@@ -4347,6 +4447,7 @@
   findObject = xform1 c_tbrik_findobject
   saveAs = xform2 c_tbrik_saveas
   write = xform3 c_tbrik_write
+  isA = xform0 c_tbrik_isa
 
 instance ITObject TShape where
   getName = xform0 c_tshape_getname
@@ -4354,6 +4455,7 @@
   findObject = xform1 c_tshape_findobject
   saveAs = xform2 c_tshape_saveas
   write = xform3 c_tshape_write
+  isA = xform0 c_tshape_isa
 
 instance ITObject TGaxis where
   getName = xform0 c_tgaxis_getname
@@ -4361,6 +4463,7 @@
   findObject = xform1 c_tgaxis_findobject
   saveAs = xform2 c_tgaxis_saveas
   write = xform3 c_tgaxis_write
+  isA = xform0 c_tgaxis_isa
 
 instance ITObject TArrow where
   getName = xform0 c_tarrow_getname
@@ -4368,6 +4471,7 @@
   findObject = xform1 c_tarrow_findobject
   saveAs = xform2 c_tarrow_saveas
   write = xform3 c_tarrow_write
+  isA = xform0 c_tarrow_isa
 
 instance ITObject TLine where
   getName = xform0 c_tline_getname
@@ -4375,6 +4479,7 @@
   findObject = xform1 c_tline_findobject
   saveAs = xform2 c_tline_saveas
   write = xform3 c_tline_write
+  isA = xform0 c_tline_isa
 
 instance ITObject TCrown where
   getName = xform0 c_tcrown_getname
@@ -4382,6 +4487,7 @@
   findObject = xform1 c_tcrown_findobject
   saveAs = xform2 c_tcrown_saveas
   write = xform3 c_tcrown_write
+  isA = xform0 c_tcrown_isa
 
 instance ITObject TArc where
   getName = xform0 c_tarc_getname
@@ -4389,6 +4495,7 @@
   findObject = xform1 c_tarc_findobject
   saveAs = xform2 c_tarc_saveas
   write = xform3 c_tarc_write
+  isA = xform0 c_tarc_isa
 
 instance ITObject TEllipse where
   getName = xform0 c_tellipse_getname
@@ -4396,6 +4503,7 @@
   findObject = xform1 c_tellipse_findobject
   saveAs = xform2 c_tellipse_saveas
   write = xform3 c_tellipse_write
+  isA = xform0 c_tellipse_isa
 
 instance ITObject TGraphQQ where
   getName = xform0 c_tgraphqq_getname
@@ -4403,6 +4511,7 @@
   findObject = xform1 c_tgraphqq_findobject
   saveAs = xform2 c_tgraphqq_saveas
   write = xform3 c_tgraphqq_write
+  isA = xform0 c_tgraphqq_isa
 
 instance ITObject TGraphPolar where
   getName = xform0 c_tgraphpolar_getname
@@ -4410,6 +4519,7 @@
   findObject = xform1 c_tgraphpolar_findobject
   saveAs = xform2 c_tgraphpolar_saveas
   write = xform3 c_tgraphpolar_write
+  isA = xform0 c_tgraphpolar_isa
 
 instance ITObject TGraphErrors where
   getName = xform0 c_tgrapherrors_getname
@@ -4417,6 +4527,7 @@
   findObject = xform1 c_tgrapherrors_findobject
   saveAs = xform2 c_tgrapherrors_saveas
   write = xform3 c_tgrapherrors_write
+  isA = xform0 c_tgrapherrors_isa
 
 instance ITObject TGraphBentErrors where
   getName = xform0 c_tgraphbenterrors_getname
@@ -4424,6 +4535,7 @@
   findObject = xform1 c_tgraphbenterrors_findobject
   saveAs = xform2 c_tgraphbenterrors_saveas
   write = xform3 c_tgraphbenterrors_write
+  isA = xform0 c_tgraphbenterrors_isa
 
 instance ITObject TCutG where
   getName = xform0 c_tcutg_getname
@@ -4431,6 +4543,7 @@
   findObject = xform1 c_tcutg_findobject
   saveAs = xform2 c_tcutg_saveas
   write = xform3 c_tcutg_write
+  isA = xform0 c_tcutg_isa
 
 instance ITObject TGraphAsymmErrors where
   getName = xform0 c_tgraphasymmerrors_getname
@@ -4438,6 +4551,7 @@
   findObject = xform1 c_tgraphasymmerrors_findobject
   saveAs = xform2 c_tgraphasymmerrors_saveas
   write = xform3 c_tgraphasymmerrors_write
+  isA = xform0 c_tgraphasymmerrors_isa
 
 instance ITObject TGraph where
   getName = xform0 c_tgraph_getname
@@ -4445,6 +4559,7 @@
   findObject = xform1 c_tgraph_findobject
   saveAs = xform2 c_tgraph_saveas
   write = xform3 c_tgraph_write
+  isA = xform0 c_tgraph_isa
 
 instance ITObject TF1 where
   getName = xform0 c_tf1_getname
@@ -4452,6 +4567,7 @@
   findObject = xform1 c_tf1_findobject
   saveAs = xform2 c_tf1_saveas
   write = xform3 c_tf1_write
+  isA = xform0 c_tf1_isa
 
 instance ITObject THStack where
   getName = xform0 c_thstack_getname
@@ -4459,6 +4575,7 @@
   findObject = xform1 c_thstack_findobject
   saveAs = xform2 c_thstack_saveas
   write = xform3 c_thstack_write
+  isA = xform0 c_thstack_isa
 
 instance ITObject TAttParticle where
   getName = xform0 c_tattparticle_getname
@@ -4466,6 +4583,7 @@
   findObject = xform1 c_tattparticle_findobject
   saveAs = xform2 c_tattparticle_saveas
   write = xform3 c_tattparticle_write
+  isA = xform0 c_tattparticle_isa
 
 instance ITObject TFormula where
   getName = xform0 c_tformula_getname
@@ -4473,13 +4591,25 @@
   findObject = xform1 c_tformula_findobject
   saveAs = xform2 c_tformula_saveas
   write = xform3 c_tformula_write
+  isA = xform0 c_tformula_isa
 
+instance ITObject TClass where
+  getName = xform0 c_tclass_getname
+  draw = xform1 c_tclass_draw
+  findObject = xform1 c_tclass_findobject
+  saveAs = xform2 c_tclass_saveas
+  write = xform3 c_tclass_write
+  isA = xform0 c_tclass_isa
+
+
+
 instance ITObject TNamed where
   getName = xform0 c_tnamed_getname
   draw = xform1 c_tnamed_draw
   findObject = xform1 c_tnamed_findobject
   saveAs = xform2 c_tnamed_saveas
   write = xform3 c_tnamed_write
+  isA = xform0 c_tnamed_isa
 
 instance ITPad TSlider where
 
diff --git a/src/HROOT/Class/Interface.hs b/src/HROOT/Class/Interface.hs
--- a/src/HROOT/Class/Interface.hs
+++ b/src/HROOT/Class/Interface.hs
@@ -146,6 +146,15 @@
 instance Existable TNamed where
   data Exist TNamed = forall a. (FPtr a, ITNamed a) => ETNamed a
 
+data RawTClass
+newtype TClass = TClass (ForeignPtr RawTClass) deriving (Eq, Ord, Show)
+instance FPtr TClass where
+   type Raw TClass = RawTClass
+   get_fptr (TClass fptr) = fptr
+   cast_fptr_to_obj = TClass
+instance Existable TClass where
+  data Exist TClass = forall a. (FPtr a, ITClass a) => ETClass a
+
 data RawTFormula
 newtype TFormula = TFormula (ForeignPtr RawTFormula) deriving (Eq, Ord, Show)
 instance FPtr TFormula where
@@ -1076,174 +1085,180 @@
 class IDeletable a where
     delete :: a -> IO () 
 
-class ITObject a where
+class (IDeletable a) => ITObject a where
     getName :: a -> IO String 
     draw :: a -> String -> IO () 
     findObject :: a -> String -> IO (Exist TObject) 
     saveAs :: a -> String -> String -> IO () 
     write :: a -> String -> Int -> Int -> IO Int 
+    isA :: a -> IO (Exist TClass) 
 
-class ITNamed a where
+class (ITObject a) => ITNamed a where
     setTitle :: a -> String -> IO () 
 
-class ITFormula a where
+class (ITNamed a) => ITDictionary a where
+
+class (ITDictionary a) => ITClass a where
+
+class (ITNamed a) => ITFormula a where
     getParameter :: a -> Int -> IO Double 
     setParameter :: a -> Int -> Double -> IO () 
 
-class ITAtt3D a where
+class (IDeletable a) => ITAtt3D a where
 
-class ITAttAxis a where
+class (IDeletable a) => ITAttAxis a where
     setLabelColor :: a -> Int -> IO () 
     setLabelSize :: a -> Double -> IO () 
     setTickLength :: a -> Double -> IO () 
     setTitleOffset :: a -> Double -> IO () 
     setNdivisions :: a -> Int -> Int -> IO () 
 
-class ITAttBBox a where
+class (IDeletable a) => ITAttBBox a where
 
-class ITAttCanvas a where
+class (IDeletable a) => ITAttCanvas a where
 
-class ITAttFill a where
+class (IDeletable a) => ITAttFill a where
     setFillColor :: a -> Int -> IO () 
     setFillStyle :: a -> Int -> IO () 
 
-class ITAttImage a where
+class (IDeletable a) => ITAttImage a where
 
-class ITAttLine a where
+class (IDeletable a) => ITAttLine a where
     setLineColor :: a -> Int -> IO () 
 
-class ITAttMarker a where
+class (IDeletable a) => ITAttMarker a where
 
-class ITAttPad a where
+class (IDeletable a) => ITAttPad a where
 
-class ITAttParticle a where
+class (ITNamed a) => ITAttParticle a where
 
-class ITAttText a where
+class (IDeletable a) => ITAttText a where
     setTextColor :: a -> Int -> IO () 
     setTextAlign :: a -> Int -> IO () 
     setTextSize :: a -> Double -> IO () 
 
-class ITHStack a where
+class (ITNamed a) => ITHStack a where
 
-class ITF1 a where
+class (ITFormula a,ITAttLine a,ITAttFill a) => ITF1 a where
 
-class ITGraph a where
+class (ITNamed a,ITAttLine a,ITAttFill a,ITAttMarker a) => ITGraph a where
 
-class ITGraphAsymmErrors a where
+class (ITGraph a) => ITGraphAsymmErrors a where
 
-class ITCutG a where
+class (ITGraph a) => ITCutG a where
 
-class ITGraphBentErrors a where
+class (ITGraph a) => ITGraphBentErrors a where
 
-class ITGraphErrors a where
+class (ITGraph a) => ITGraphErrors a where
 
-class ITGraphPolar a where
+class (ITGraphErrors a) => ITGraphPolar a where
 
-class ITGraphQQ a where
+class (ITGraph a) => ITGraphQQ a where
 
-class ITEllipse a where
+class (ITObject a,ITAttLine a,ITAttFill a) => ITEllipse a where
 
-class ITArc a where
+class (ITEllipse a) => ITArc a where
 
-class ITCrown a where
+class (ITEllipse a) => ITCrown a where
 
-class ITLine a where
+class (ITObject a,ITAttLine a) => ITLine a where
 
-class ITArrow a where
+class (ITLine a,ITAttFill a) => ITArrow a where
 
-class ITGaxis a where
+class (ITLine a,ITAttText a) => ITGaxis a where
 
-class ITShape a where
+class (ITNamed a,ITAttLine a,ITAttFill a,ITAtt3D a) => ITShape a where
 
-class ITBRIK a where
+class (ITShape a) => ITBRIK a where
 
-class ITTUBE a where
+class (ITShape a) => ITTUBE a where
 
-class ITPCON a where
+class (ITShape a) => ITPCON a where
 
-class ITSPHE a where
+class (ITShape a) => ITSPHE a where
 
-class ITXTRU a where
+class (ITShape a) => ITXTRU a where
 
-class ITBox a where
+class (ITObject a,ITAttLine a,ITAttFill a) => ITBox a where
 
-class ITPave a where
+class (ITBox a) => ITPave a where
 
-class ITPaveText a where
+class (ITPave a,ITAttText a) => ITPaveText a where
 
-class ITDiamond a where
+class (ITPaveText a) => ITDiamond a where
 
-class ITPaveStats a where
+class (ITPaveText a) => ITPaveStats a where
 
-class ITPavesText a where
+class (ITPaveText a) => ITPavesText a where
 
-class ITLegend a where
+class (ITPave a,ITAttText a) => ITLegend a where
 
-class ITPaveLabel a where
+class (ITPave a,ITAttText a) => ITPaveLabel a where
 
-class ITPaveClass a where
+class (ITPaveLabel a) => ITPaveClass a where
 
-class ITWbox a where
+class (ITBox a) => ITWbox a where
     setBorderMode :: a -> Int -> IO () 
 
-class ITFrame a where
+class (ITWbox a) => ITFrame a where
 
-class ITSliderBox a where
+class (ITWbox a) => ITSliderBox a where
 
-class ITTree a where
+class (ITNamed a,ITAttLine a,ITAttFill a,ITAttMarker a) => ITTree a where
 
-class ITChain a where
+class (ITTree a) => ITChain a where
 
-class ITNtuple a where
+class (ITTree a) => ITNtuple a where
 
-class ITNtupleD a where
+class (ITTree a) => ITNtupleD a where
 
-class ITTreeSQL a where
+class (ITTree a) => ITTreeSQL a where
 
-class ITPolyLine a where
+class (ITObject a,ITAttLine a,ITAttFill a) => ITPolyLine a where
 
-class ITCurlyLine a where
+class (ITPolyLine a) => ITCurlyLine a where
 
-class ITCurlyArc a where
+class (ITCurlyLine a) => ITCurlyArc a where
 
-class ITEfficiency a where
+class (ITNamed a,ITAttLine a,ITAttFill a,ITAttMarker a) => ITEfficiency a where
 
-class ITAxis a where
+class (ITNamed a,ITAttAxis a) => ITAxis a where
 
-class ITLatex a where
+class (ITText a,ITAttLine a) => ITLatex a where
 
-class ITText a where
+class (ITNamed a,ITAttText a) => ITText a where
 
-class ITDirectory a where
+class (ITNamed a) => ITDirectory a where
     close :: a -> String -> IO () 
+    get :: a -> String -> IO (Exist TObject) 
 
-class ITDirectoryFile a where
+class (ITDirectory a) => ITDirectoryFile a where
 
-class ITFile a where
+class (ITDirectoryFile a) => ITFile a where
 
-class ITBranch a where
+class (ITNamed a,ITAttFill a) => ITBranch a where
 
-class ITVirtualTreePlayer a where
+class (ITObject a) => ITVirtualTreePlayer a where
 
-class ITTreePlayer a where
+class (ITVirtualTreePlayer a) => ITTreePlayer a where
 
-class ITArray a where
+class (IDeletable a) => ITArray a where
 
-class ITArrayC a where
+class (ITArray a) => ITArrayC a where
 
-class ITArrayD a where
+class (ITArray a) => ITArrayD a where
 
-class ITArrayF a where
+class (ITArray a) => ITArrayF a where
 
-class ITArrayI a where
+class (ITArray a) => ITArrayI a where
 
-class ITArrayL a where
+class (ITArray a) => ITArrayL a where
 
-class ITArrayL64 a where
+class (ITArray a) => ITArrayL64 a where
 
-class ITArrayS a where
+class (ITArray a) => ITArrayS a where
 
-class ITH1 a where
+class (ITNamed a,ITAttLine a,ITAttFill a,ITAttMarker a) => ITH1 a where
     add :: (ITH1 c0, FPtr c0) => a -> c0 -> Double -> IO () 
     addBinContent :: a -> Int -> Double -> IO () 
     chi2Test :: (ITH1 c0, FPtr c0) => a -> c0 -> String -> [Double] -> IO Double 
@@ -1294,70 +1309,70 @@
     getCellContent :: a -> Int -> Int -> IO Double 
     getCellError :: a -> Int -> Int -> IO Double 
 
-class ITH2 a where
+class (ITH1 a) => ITH2 a where
     fill2 :: a -> Double -> Double -> IO Int 
 
-class ITH3 a where
+class (ITH1 a,ITAtt3D a) => ITH3 a where
 
-class ITH1C a where
+class (ITH1 a,ITArrayC a) => ITH1C a where
 
-class ITH1D a where
+class (ITH1 a,ITArrayD a) => ITH1D a where
 
-class ITH1F a where
+class (ITH1 a,ITArrayF a) => ITH1F a where
 
-class ITH1I a where
+class (ITH1 a,ITArrayI a) => ITH1I a where
 
-class ITH1S a where
+class (ITH1 a,ITArrayS a) => ITH1S a where
 
-class ITH2C a where
+class (ITH2 a,ITArrayC a) => ITH2C a where
 
-class ITH2D a where
+class (ITH2 a,ITArrayD a) => ITH2D a where
 
-class ITH2F a where
+class (ITH2 a,ITArrayF a) => ITH2F a where
 
-class ITH2I a where
+class (ITH2 a,ITArrayI a) => ITH2I a where
 
-class ITH2Poly a where
+class (ITH2 a) => ITH2Poly a where
 
-class ITH2S a where
+class (ITH2 a,ITArrayS a) => ITH2S a where
 
-class ITH3C a where
+class (ITH3 a,ITArrayC a) => ITH3C a where
 
-class ITH3D a where
+class (ITH3 a,ITArrayD a) => ITH3D a where
 
-class ITH3F a where
+class (ITH3 a,ITArrayF a) => ITH3F a where
 
-class ITH3I a where
+class (ITH3 a,ITArrayI a) => ITH3I a where
 
-class ITH3S a where
+class (ITH3 a,ITArrayS a) => ITH3S a where
 
-class ITQObject a where
+class (IDeletable a) => ITQObject a where
 
-class ITVirtualPad a where
+class (ITObject a,ITAttLine a,ITAttFill a,ITAttPad a,ITQObject a) => ITVirtualPad a where
     getFrame :: a -> IO (Exist TFrame) 
     range :: a -> Double -> Double -> Double -> Double -> IO () 
 
-class ITPad a where
+class (ITVirtualPad a) => ITPad a where
 
-class ITButton a where
+class (ITPad a,ITAttText a) => ITButton a where
 
-class ITGroupButton a where
+class (ITButton a) => ITGroupButton a where
 
-class ITCanvas a where
+class (ITPad a) => ITCanvas a where
 
-class ITDialogCanvas a where
+class (ITCanvas a,ITAttText a) => ITDialogCanvas a where
 
-class ITInspectCanvas a where
+class (ITCanvas a,ITAttText a) => ITInspectCanvas a where
 
-class ITEvePad a where
+class (ITPad a) => ITEvePad a where
 
-class ITSlider a where
+class (ITPad a) => ITSlider a where
 
-class ITApplication a where
+class (ITObject a,ITQObject a) => ITApplication a where
     run :: a -> Int -> IO () 
 
-class ITRint a where
+class (ITApplication a) => ITRint a where
 
-class ITRandom a where
+class (ITNamed a) => ITRandom a where
     gaus :: a -> Double -> Double -> IO Double 
     uniform :: a -> Double -> Double -> IO Double 
