Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
JClassDef.hh
Go to the documentation of this file.
1 #ifndef __JROOT__JCLASSDEF__
2 #define __JROOT__JCLASSDEF__
3 
4 #include "TObject.h"
5 
6 /**
7  * \author mdejong
8  */
9 
10 namespace JROOT {}
11 namespace JPP { using namespace JROOT; }
12 
13 namespace JROOT {
14 
15  /**
16  * Test ROOT ClassDef.
17  */
18  template <class T>
19  class JClassDef
20  {
21  typedef char JSmall;
22  typedef long JBig;
23 
24  template<class C, C> struct check_type;
25 
26  template<class C> static JSmall JTest(check_type<const char* (C::*)(), &C::Class_Name>*);
27  template<class C> static JBig JTest(...);
28 
29  public:
30  enum { value = sizeof(JTest<T>(0)) == sizeof(JSmall) }; //!< true if ROOT compatible class; else false
31  };
32 }
33 
34 #endif
Test ROOT ClassDef.
Definition: JClassDef.hh:20
static JSmall JTest(check_type< const char *(C::*)(), &C::Class_Name > *)
static JBig JTest(...)
static const double C
Physics constants.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for ROOT I/O.
Auxiliary base class for compile time evaluation of test.
Definition: JTest.hh:21