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 588 of file JRootClass.hh.
 
template<class T > 
  
  
      
        
          | JROOT::JRootWritableClass::JRootWritableClass  | 
          ( | 
          const T &  | 
          object | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
template<class T > 
  
  
      
        
          | JROOT::JRootWritableClass::operator const T &  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Type conversion operator. 
- Returns
 - value 
 
Definition at line 618 of file JRootClass.hh.
  620       if (static_cast<const JRootClass&>(*
this) == 
JRootClass(JType<T>())) {
 
  623         THROW(JCastException, 
"JRootWritableClass::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
 
 
 
 
Get address. 
- Returns
 - pointer to object 
 
Definition at line 450 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 461 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 472 of file JRootClass.hh.
JRootAddressableClass(T &object)
Constructor. 
 
 
 
 
Get addressable class of given data member. 
- Parameters
 - 
  
  
 
Definition at line 483 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 494 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 505 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 48 of file JRootClass.hh.
   50       return (class_name                                      != NULL  &&
 
   51               strcmp(class_name, TClass ::Class()->GetName()) != 0     &&
 
   52               strcmp(class_name, TObject::Class()->GetName()) != 0     &&
 
   53               strcmp(class_name, 
"_Rb_tree_node_base")        != 0     &&
 
   54               strcmp(class_name, 
"fgIsA")                     != 0     &&
 
   55               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 65 of file JRootClass.hh.
   67       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 77 of file JRootClass.hh.
   79       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 89 of file JRootClass.hh.
   91       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 101 of file JRootClass.hh.
  103       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 113 of file JRootClass.hh.
  115       return (strcmp(data_member.GetFullTypeName(), 
"string")       == 0 ||
 
  116               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 126 of file JRootClass.hh.
  128       return (data_member.Property() & kIsStatic);
 
 
 
 
  
  
      
        
          | TDictionary* JROOT::JRootClass::getDictionary  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get dictionary. 
- Returns
 - pointer to dictionary 
 
Definition at line 161 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 172 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 183 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 194 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 220 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 304 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 344 of file JRootClass.hh.
  352           if (this->
getClass()->GetListOfBases() != NULL) {
 
  354             TIterator* i = this->
getClass()->GetListOfBases()->MakeIterator();
 
  356             for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL; ) {
 
  358                 this->
get(*p).print(out, prefix + 
"::" + p->GetName());
 
  360                 print(out, prefix + 
"::" + p->GetName(), this->
get(*p).getTypename());
 
  364           if (this->
getClass()->GetListOfDataMembers() != NULL) {
 
  366             TIterator* i = this->
getClass()->GetListOfDataMembers()->MakeIterator();
 
  368             for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
 
  370                 this->
get(*p).print(out, prefix + (
is_static(*p) ?  
"::" : 
".") + p->GetName());
 
  372                 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 387 of file JRootClass.hh.
  391       out << 
name << 
"  " << 
'(' << type << 
')' << endl;
 
 
 
 
  
  
      
        
          | TDictionary* JROOT::JRootClass::dictionary | 
         
       
   | 
  
protectedinherited   | 
  
 
 
  
  
      
        
          | int JROOT::JRootClass::offset | 
         
       
   | 
  
protectedinherited   | 
  
 
offset with respect to data structure [B] 
Definition at line 313 of file JRootClass.hh.
 
 
The documentation for this struct was generated from the following file: