ROOT class for writing 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 writing object. 
Definition at line 568 of file JRootClass.hh.
 
template<class T > 
  
  
      
        
          | JROOT::JRootClassWriter::JRootClassWriter  | 
          ( | 
          const T &  | 
          object | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
Copy constructor. 
- Parameters
 - 
  
    | rcs | ROOT addressable class  | 
  
   
Definition at line 587 of file JRootClass.hh.
 
 
template<class T > 
  
  
      
        
          | JROOT::JRootClassWriter::operator const T &  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - value 
 
Definition at line 598 of file JRootClass.hh.
  600       if (static_cast<const JRootClass&>(*
this) == 
JRootClass(JType<T>())) {
 
  603         THROW(JCastException, 
"JRootClassWriter::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. 
 
 
 
 
Get ROOT class writer with given name within current class. 
- Parameters
 - 
  
    | name | name of base class or data member  | 
  
   
Definition at line 613 of file JRootClass.hh.
JRootClassWriter(const T &object)
Constructor. 
 
JRootAddressableClass find(const char *name) const
Find addressable base class or data member with given name within current class. 
 
 
 
 
Get address. 
- Returns
 - pointer to object 
 
Definition at line 411 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 422 of file JRootClass.hh.
bool is_valid(const T &value)
Check validity of given value. 
 
 
 
 
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 433 of file JRootClass.hh.
JRootAddressableClass(T &object)
Constructor. 
 
 
 
 
Get addressable class of given data member. 
- Parameters
 - 
  
  
 
Definition at line 444 of file JRootClass.hh.
JRootAddressableClass(T &object)
Constructor. 
 
T get(const JHead &head)
Get object from header. 
 
 
 
 
Get addressable class of given base class. 
- Parameters
 - 
  
  
 
Definition at line 455 of file JRootClass.hh.
JRootAddressableClass(T &object)
Constructor. 
 
T get(const JHead &head)
Get object from header. 
 
 
 
 
  
  
      
        
          | 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 45 of file JRootClass.hh.
   47       return (class_name                                      != NULL  &&
 
   48               strcmp(class_name, TClass ::Class()->GetName()) != 0     &&
 
   49               strcmp(class_name, TObject::Class()->GetName()) != 0     &&
 
   50               strcmp(class_name, 
"fgIsA")                     != 0     &&
 
   51               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 61 of file JRootClass.hh.
   63       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 73 of file JRootClass.hh.
   75       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 85 of file JRootClass.hh.
   87       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 97 of file JRootClass.hh.
   99       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 109 of file JRootClass.hh.
  111       return (strcmp(data_member.GetFullTypeName(), 
"string")       == 0 ||
 
  112               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 122 of file JRootClass.hh.
  124       return (data_member.Property() & kIsStatic);
 
 
 
 
  
  
      
        
          | TDictionary* JROOT::JRootClass::getDictionary  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get dictionary. 
- Returns
 - pointer to dictionary 
 
Definition at line 145 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 156 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 167 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 178 of file JRootClass.hh.
TDictionary * dictionary
pointer to ROOT dictionary 
 
 
 
 
  
  
      
        
          | void JROOT::JRootClass::print  | 
          ( | 
          std::ostream &  | 
          out | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Print ROOT class information. 
- Parameters
 - 
  
  
 
Definition at line 290 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 330 of file JRootClass.hh.
  338           if (this->
getClass()->GetListOfBases() != NULL) {
 
  340             TIterator* i = this->
getClass()->GetListOfBases()->MakeIterator();
 
  342             for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL; ) {
 
  344                 this->
get(*p).print(out, prefix + 
"::" + p->GetName());
 
  346                 print(out, prefix + 
"::" + p->GetName(), this->
get(*p).getTypename());
 
  350           if (this->
getClass()->GetListOfDataMembers() != NULL) {
 
  352             TIterator* i = this->
getClass()->GetListOfDataMembers()->MakeIterator();
 
  354             for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
 
  356                 this->
get(*p).print(out, prefix + (
is_static(*p) ?  
"::" : 
".") + p->GetName());
 
  358                 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 373 of file JRootClass.hh.
  377       out << name << 
"  " << 
'(' << type << 
')' << endl;
 
 
 
 
  
  
      
        
          | TDictionary* JROOT::JRootClass::dictionary | 
         
       
   | 
  
protectedinherited   | 
  
 
 
  
  
      
        
          | int JROOT::JRootClass::offset | 
         
       
   | 
  
protectedinherited   | 
  
 
offset with respect to data structure [B] 
Definition at line 299 of file JRootClass.hh.
 
 
The documentation for this struct was generated from the following file: