ROOT class for reading object.  
 More...
#include <JRootClass.hh>
 | 
| static bool  | is_class (const char *const class_name) | 
|   | Check class name against ROOT class names.  More...
  | 
|   | 
| static bool  | is_class (const TBaseClass &base_class) | 
|   | Check base class against ROOT class names.  More...
  | 
|   | 
| static bool  | is_class (const TDataMember &data_member) | 
|   | Check data member against ROOT class names.  More...
  | 
|   | 
| static bool  | is_STLcontainer (const TBaseClass &base_class) | 
|   | Check if base class is STL container.  More...
  | 
|   | 
| static bool  | is_STLcontainer (const TDataMember &data_member) | 
|   | Check if data member is STL container.  More...
  | 
|   | 
| static bool  | is_STLstring (const TDataMember &data_member) | 
|   | Check if data member is STL string.  More...
  | 
|   | 
| static bool  | is_static (const TDataMember &data_member) | 
|   | Check if data member is static.  More...
  | 
|   | 
 | 
| void  | print (std::ostream &out, const std::string &prefix) const  | 
|   | Print ROOT class information.  More...
  | 
|   | 
 | 
| static void  | print (std::ostream &out, const std::string &name, const std::string &type) | 
|   | Print ROOT class information.  More...
  | 
|   | 
ROOT class for reading object. 
Definition at line 526 of file JRootClass.hh.
 
template<class T > 
  
  
      
        
          | JROOT::JRootReadableClass::JRootReadableClass  | 
          ( | 
          T &  | 
          object | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
template<class T > 
  
  
      
        
          | JROOT::JRootReadableClass::operator const T &  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - value 
 
Definition at line 556 of file JRootClass.hh.
  558       if (static_cast<const JRootClass&>(*
this) == 
JRootClass(JType<T>())) {
 
  561         THROW(JCastException, 
"JRootReadableClass::operator const T&");
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
JRootClass()
Default constructor. 
 
pointer_type getAddress() const
Get address. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
 
 
 
template<class T > 
  
  
      
        
          | JROOT::JRootReadableClass::operator T &  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - value 
 
Definition at line 572 of file JRootClass.hh.
  574       if (static_cast<const JRootClass&>(*
this) == 
JRootClass(JType<T>())) {
 
  577         THROW(JCastException, 
"JRootReadableClass::operator T&");
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
JRootClass()
Default constructor. 
 
pointer_type getAddress() const
Get address. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
 
 
 
Get address. 
- Returns
 - pointer to object 
 
Definition at line 448 of file JRootClass.hh.
int getOffset() const 
Get offset of this class with respect to parent class. 
 
 
 
 
Check validity of this addressable class. 
- Returns
 - true if valid addressable class; else false 
 
Definition at line 459 of file JRootClass.hh.
bool is_valid(const json &js)
Check validity of JSon data. 
 
 
 
 
Find addressable base class or data member with given name within current class. 
- Parameters
 - 
  
    | name | name of base class or data member  | 
  
   
Definition at line 470 of file JRootClass.hh.
JRootAddressableClass(T &object)
Constructor. 
 
 
 
 
Get addressable class of given data member. 
- Parameters
 - 
  
  
 
Definition at line 481 of file JRootClass.hh.
T get(const JHead &header)
Get object from header. 
 
JRootAddressableClass(T &object)
Constructor. 
 
 
 
 
Get addressable class of given base class. 
- Parameters
 - 
  
  
 
Definition at line 492 of file JRootClass.hh.
T get(const JHead &header)
Get object from header. 
 
JRootAddressableClass(T &object)
Constructor. 
 
 
 
 
Find addressable base class or data member with given name within current class. 
- Parameters
 - 
  
    | name | name of base class or data member  | 
  
   
Definition at line 503 of file JRootClass.hh.
JRootAddressableClass find(const char *name) const
Find addressable base class or data member with given name within current class. 
 
 
 
 
  
  
      
        
          | static bool JROOT::JRootClass::is_class  | 
          ( | 
          const char *const  | 
          class_name | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Check class name against ROOT class names. 
- Parameters
 - 
  
  
 
- Returns
 - true if valid class name; else false 
 
Definition at line 47 of file JRootClass.hh.
   49       return (class_name                                      != NULL  &&
 
   50               strcmp(class_name, TClass ::Class()->GetName()) != 0     &&
 
   51               strcmp(class_name, TObject::Class()->GetName()) != 0     &&
 
   52               strcmp(class_name, 
"fgIsA")                     != 0     &&
 
   53               strcmp(class_name, 
"atomic<TClass*>")           != 0);
 
 
 
 
  
  
      
        
          | static bool JROOT::JRootClass::is_class  | 
          ( | 
          const TBaseClass &  | 
          base_class | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Check base class against ROOT class names. 
- Parameters
 - 
  
  
 
- Returns
 - true if valid class name; else false 
 
Definition at line 63 of file JRootClass.hh.
   65       return is_class(base_class.GetName());
 
static bool is_class(const char *const class_name)
Check class name against ROOT class names. 
 
 
 
 
  
  
      
        
          | static bool JROOT::JRootClass::is_class  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Check data member against ROOT class names. 
- Parameters
 - 
  
  
 
- Returns
 - true if valid class name; else false 
 
Definition at line 75 of file JRootClass.hh.
   77       return is_class(data_member.GetTypeName());
 
static bool is_class(const char *const class_name)
Check class name against ROOT class names. 
 
 
 
 
  
  
      
        
          | static bool JROOT::JRootClass::is_STLcontainer  | 
          ( | 
          const TBaseClass &  | 
          base_class | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Check if base class is STL container. 
- Parameters
 - 
  
  
 
- Returns
 - true if STL congtainer; else false 
 
Definition at line 87 of file JRootClass.hh.
   89       return (const_cast<TBaseClass&>(base_class).IsSTLContainer() != ROOT::kNotSTL);
 
 
 
 
  
  
      
        
          | static bool JROOT::JRootClass::is_STLcontainer  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Check if data member is STL container. 
- Parameters
 - 
  
  
 
- Returns
 - true if STL congtainer; else false 
 
Definition at line 99 of file JRootClass.hh.
  101       return (const_cast<TDataMember&>(data_member).IsSTLContainer() != ROOT::kNotSTL);
 
 
 
 
  
  
      
        
          | static bool JROOT::JRootClass::is_STLstring  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Check if data member is STL string. 
- Parameters
 - 
  
  
 
- Returns
 - true if STL string; else false 
 
Definition at line 111 of file JRootClass.hh.
  113       return (strcmp(data_member.GetFullTypeName(), 
"string")       == 0 ||
 
  114               strcmp(data_member.GetFullTypeName(), 
"const string") == 0);
 
 
 
 
  
  
      
        
          | static bool JROOT::JRootClass::is_static  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Check if data member is static. 
- Parameters
 - 
  
  
 
- Returns
 - true if static; else false 
 
Definition at line 124 of file JRootClass.hh.
  126       return (data_member.Property() & kIsStatic);
 
 
 
 
  
  
      
        
          | TDictionary* JROOT::JRootClass::getDictionary  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get dictionary. 
- Returns
 - pointer to dictionary 
 
Definition at line 159 of file JRootClass.hh.
TDictionary * dictionary
pointer to ROOT dictionary 
 
 
 
 
  
  
      
        
          | int JROOT::JRootClass::getOffset  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get offset of this class with respect to parent class. 
- Returns
 - offset 
 
Definition at line 170 of file JRootClass.hh.
int offset
offset with respect to data structure [B] 
 
 
 
 
  
  
      
        
          | TClass* JROOT::JRootClass::getClass  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get class. 
- Returns
 - pointer to class 
 
Definition at line 181 of file JRootClass.hh.
TDictionary * dictionary
pointer to ROOT dictionary 
 
 
 
 
  
  
      
        
          | const char* JROOT::JRootClass::getTypename  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get type name. 
- Returns
 - type name 
 
Definition at line 192 of file JRootClass.hh.
TDictionary * dictionary
pointer to ROOT dictionary 
 
 
 
 
  
  
      
        
          | bool JROOT::JRootClass::equals  | 
          ( | 
          const JRootClass &  | 
          object | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Test equality of ROOT classes. 
- Parameters
 - 
  
  
 
- Returns
 - true if both ROOT classes are same type; else false 
 
Definition at line 218 of file JRootClass.hh.
const char * getTypename() const 
Get type name. 
 
 
 
 
  
  
      
        
          | void JROOT::JRootClass::print  | 
          ( | 
          std::ostream &  | 
          out | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Print ROOT class information. 
- Parameters
 - 
  
  
 
Definition at line 302 of file JRootClass.hh.
void print(std::ostream &out) const 
Print ROOT class information. 
 
const char * getTypename() const 
Get type name. 
 
 
 
 
  
  
      
        
          | void JROOT::JRootClass::print  | 
          ( | 
          std::ostream &  | 
          out,  | 
         
        
           | 
           | 
          const std::string &  | 
          prefix  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineprotectedinherited   | 
  
 
Print ROOT class information. 
- Parameters
 - 
  
    | out | output stream  | 
    | prefix | prefix  | 
  
   
Definition at line 342 of file JRootClass.hh.
  350           if (this->
getClass()->GetListOfBases() != NULL) {
 
  352             TIterator* i = this->
getClass()->GetListOfBases()->MakeIterator();
 
  354             for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL; ) {
 
  356                 this->
get(*p).print(out, prefix + 
"::" + p->GetName());
 
  358                 print(out, prefix + 
"::" + p->GetName(), this->
get(*p).getTypename());
 
  362           if (this->
getClass()->GetListOfDataMembers() != NULL) {
 
  364             TIterator* i = this->
getClass()->GetListOfDataMembers()->MakeIterator();
 
  366             for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
 
  368                 this->
get(*p).print(out, prefix + (
is_static(*p) ?  
"::" : 
".") + p->GetName());
 
  370                 print(out, prefix + (
is_static(*p) ?  
"::" : 
".") + p->GetName(), this->
get(*p).getTypename());
 
static bool is_STLcontainer(const TBaseClass &base_class)
Check if base class is STL container. 
 
void print(std::ostream &out) const 
Print ROOT class information. 
 
const char * getTypename() const 
Get type name. 
 
static bool is_STLstring(const TDataMember &data_member)
Check if data member is STL string. 
 
bool is_valid() const 
Check validity of this class. 
 
TClass * getClass() const 
Get class. 
 
static bool is_static(const TDataMember &data_member)
Check if data member is static. 
 
 
 
 
  
  
      
        
          | static void JROOT::JRootClass::print  | 
          ( | 
          std::ostream &  | 
          out,  | 
         
        
           | 
           | 
          const std::string &  | 
          name,  | 
         
        
           | 
           | 
          const std::string &  | 
          type  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestaticprotectedinherited   | 
  
 
Print ROOT class information. 
- Parameters
 - 
  
    | out | output stream  | 
    | name | name  | 
    | type | type  | 
  
   
Definition at line 385 of file JRootClass.hh.
  389       out << 
name << 
"  " << 
'(' << type << 
')' << endl;
 
 
 
 
  
  
      
        
          | TDictionary* JROOT::JRootClass::dictionary | 
         
       
   | 
  
protectedinherited   | 
  
 
 
  
  
      
        
          | int JROOT::JRootClass::offset | 
         
       
   | 
  
protectedinherited   | 
  
 
offset with respect to data structure [B] 
Definition at line 311 of file JRootClass.hh.
 
 
The documentation for this struct was generated from the following file: