Auxiliary class to manage access to base classes and data members of ROOT class.  
 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...
  | 
|   | 
 | 
| static void  | print (std::ostream &out, const std::string &name, const std::string &type) | 
|   | Print ROOT class information.  More...
  | 
|   | 
Auxiliary class to manage access to base classes and data members of ROOT class. 
Definition at line 38 of file JRootClass.hh.
 
◆ JRootClass() [1/4]
template<class JType_t > 
  
  
      
        
          | JROOT::JRootClass::JRootClass  | 
          ( | 
          const JType< JType_t > &  | 
          type | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 136 of file JRootClass.hh.
  137       dictionary(TDictionary::GetDictionary(
typeid(JType_t))),
 
 
 
 
◆ JRootClass() [2/4]
template<class JType_t , class JClass_t > 
  
  
      
        
          | JROOT::JRootClass::JRootClass  | 
          ( | 
          JType_t JClass_t::*  | 
          pd | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | pd | pointer to C++ data member  | 
  
   
Definition at line 148 of file JRootClass.hh.
  149       dictionary(TDictionary::GetDictionary(
typeid(JType_t))),
 
  150       offset((
char*) &(((JClass_t*) NULL)->*pd) - (
char*) NULL)
 
 
 
 
◆ JRootClass() [3/4]
  
  
      
        
          | JROOT::JRootClass::JRootClass  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineprotected   | 
  
 
 
◆ JRootClass() [4/4]
  
  
      
        
          | JROOT::JRootClass::JRootClass  | 
          ( | 
          TDictionary *  | 
          dictionary,  | 
         
        
           | 
           | 
          int  | 
          offset  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineprotected   | 
  
 
Constructor. 
- Parameters
 - 
  
    | dictionary | pointer to dictionary  | 
    | offset | offset  | 
  
   
Definition at line 329 of file JRootClass.hh.
 
 
◆ is_class() [1/3]
  
  
      
        
          | static bool JROOT::JRootClass::is_class  | 
          ( | 
          const char *const  | 
          class_name | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
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);
 
 
 
 
◆ is_class() [2/3]
  
  
      
        
          | static bool JROOT::JRootClass::is_class  | 
          ( | 
          const TBaseClass &  | 
          base_class | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
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());
 
 
 
 
◆ is_class() [3/3]
  
  
      
        
          | static bool JROOT::JRootClass::is_class  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
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());
 
 
 
 
◆ is_STLcontainer() [1/2]
  
  
      
        
          | static bool JROOT::JRootClass::is_STLcontainer  | 
          ( | 
          const TBaseClass &  | 
          base_class | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
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);
 
 
 
 
◆ is_STLcontainer() [2/2]
  
  
      
        
          | static bool JROOT::JRootClass::is_STLcontainer  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
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);
 
 
 
 
◆ is_STLstring()
  
  
      
        
          | static bool JROOT::JRootClass::is_STLstring  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
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);
 
 
 
 
◆ is_static()
  
  
      
        
          | static bool JROOT::JRootClass::is_static  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
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);
 
 
 
 
◆ getDictionary()
  
  
      
        
          | TDictionary* JROOT::JRootClass::getDictionary  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dictionary. 
- Returns
 - pointer to dictionary 
 
Definition at line 159 of file JRootClass.hh.
 
 
◆ getOffset()
  
  
      
        
          | int JROOT::JRootClass::getOffset  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get offset of this class with respect to parent class. 
- Returns
 - offset 
 
Definition at line 170 of file JRootClass.hh.
 
 
◆ getClass()
  
  
      
        
          | TClass* JROOT::JRootClass::getClass  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get class. 
- Returns
 - pointer to class 
 
Definition at line 181 of file JRootClass.hh.
 
 
◆ getTypename()
  
  
      
        
          | const char* JROOT::JRootClass::getTypename  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ is_valid()
  
  
      
        
          | bool JROOT::JRootClass::is_valid  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Check validity of this class. 
- Returns
 - true if valid class; else false 
 
Definition at line 206 of file JRootClass.hh.
 
 
◆ equals()
  
  
      
        
          | bool JROOT::JRootClass::equals  | 
          ( | 
          const JRootClass &  | 
          object | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
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.
 
 
◆ find()
  
  
      
        
          | JRootClass JROOT::JRootClass::find  | 
          ( | 
          const char *  | 
          name | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Find base class or data member with given name within current class. 
- Parameters
 - 
  
    | name | name of base class or data member  | 
  
   
Definition at line 231 of file JRootClass.hh.
  233       if (name != NULL && strlen(name) != 0) {
 
  243           const TDataMember* p = this->
getClass()->GetDataMember(name);
 
  246             return this->
get(*p);
 
  251           TIterator* i = this->
getClass()->GetListOfBases()->MakeIterator();
 
  253           for (TBaseClass* p; (p = (TBaseClass*) i->Next()) != NULL; ) {
 
  259               rcs = rcs.
find(name);
 
 
 
 
◆ get() [1/2]
  
  
      
        
          | JRootClass JROOT::JRootClass::get  | 
          ( | 
          const TDataMember &  | 
          data_member | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get ROOT class of given data member. 
- Parameters
 - 
  
  
 
Definition at line 278 of file JRootClass.hh.
  280       return JRootClass(TDictionary::GetDictionary(data_member.GetTypeName()), 
 
  281                         this->
getOffset() + data_member.GetOffset());
 
 
 
 
◆ get() [2/2]
  
  
      
        
          | JRootClass JROOT::JRootClass::get  | 
          ( | 
          const TBaseClass &  | 
          base_class | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get ROOT class of given base class. 
- Parameters
 - 
  
  
 
Definition at line 290 of file JRootClass.hh.
  292       return JRootClass(TDictionary::GetDictionary(base_class.GetName()),
 
  293                         this->
getOffset() + const_cast<TBaseClass&>(base_class).GetDelta());
 
 
 
 
◆ print() [1/3]
  
  
      
        
          | void JROOT::JRootClass::print  | 
          ( | 
          std::ostream &  | 
          out | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Print ROOT class information. 
- Parameters
 - 
  
  
 
Definition at line 302 of file JRootClass.hh.
 
 
◆ print() [2/3]
  
  
      
        
          | void JROOT::JRootClass::print  | 
          ( | 
          std::ostream &  | 
          out,  | 
         
        
           | 
           | 
          const std::string &  | 
          prefix  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineprotected   | 
  
 
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());
 
  362           if (this->
getClass()->GetListOfDataMembers() != NULL) {
 
  364             TIterator* i = this->
getClass()->GetListOfDataMembers()->MakeIterator();
 
  366             for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
 
 
 
 
◆ print() [3/3]
  
  
      
        
          | static void JROOT::JRootClass::print  | 
          ( | 
          std::ostream &  | 
          out,  | 
         
        
           | 
           | 
          const std::string &  | 
          name,  | 
         
        
           | 
           | 
          const std::string &  | 
          type  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestaticprotected   | 
  
 
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;
 
 
 
 
◆ dictionary
  
  
      
        
          | TDictionary* JROOT::JRootClass::dictionary | 
         
       
   | 
  
protected   | 
  
 
 
◆ offset
  
  
      
        
          | int JROOT::JRootClass::offset | 
         
       
   | 
  
protected   | 
  
 
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: