ROOT class for writing object.
More...
#include <JRootClass.hh>
|
static bool | is_class (const char *const name) |
| Check name of class against ROOT classes. 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...
|
|
ROOT class for writing object.
Definition at line 593 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 623 of file JRootClass.hh.
625 if (static_cast<const JRootClass&>(*
this) ==
JRootClass(JType<T>())) {
628 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 451 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 462 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 |
- Returns
- ROOT addressable class
Definition at line 474 of file JRootClass.hh.
then echo Enter input within $TIMEOUT_S seconds echo n User name
JRootAddressableClass(T &object)
Constructor.
JRootClass JROOT::JRootClass::find |
( |
const char *const |
name, |
|
|
const bool |
option = true |
|
) |
| const |
|
inlineinherited |
Find base class or data member with given name within current class.
- Parameters
-
name | name of base class or data member |
option | case sensitivity |
- Returns
- ROOT class
Definition at line 237 of file JRootClass.hh.
239 if (
name != NULL && strlen(
name) != 0) {
249 for (std::unique_ptr<TIterator> i(this->
getClass()->GetListOfDataMembers(kFALSE)->MakeIterator());
const TDataMember* p = (
const TDataMember*) i->Next(); ) {
250 if (( option && strcmp (p->GetName(),
name) == 0) ||
251 (!option && strcasecmp(p->GetName(),
name) == 0)) {
252 return this->
get(*p);
258 for (std::unique_ptr<TIterator> i(this->
getClass()->GetListOfBases()->MakeIterator()); TBaseClass* p = (TBaseClass*) i->Next(); ) {
JRootClass find(const char *const name, const bool option=true) const
Find base class or data member with given name within current class.
static bool is_STLcontainer(const TBaseClass &base_class)
Check if base class is STL container.
const char * getTypename() const
Get type name.
JRootClass()
Default constructor.
then echo Enter input within $TIMEOUT_S seconds echo n User name
bool is_valid() const
Check validity of this class.
TClass * getClass() const
Get class.
Auxiliary class to manage access to base classes and data members of ROOT class.
static bool is_class(const char *const name)
Check name of class against ROOT classes.
Get addressable class of given data member.
- Parameters
-
- Returns
- ROOT addressable class
Definition at line 486 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
-
- Returns
- ROOT addressable class
Definition at line 498 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 |
- Returns
- ROOT addressable class
Definition at line 510 of file JRootClass.hh.
then echo Enter input within $TIMEOUT_S seconds echo n User name
JRootAddressableClass find(const char *const name) const
Find addressable base class or data member with given name within current class.
static bool JROOT::JRootClass::is_class |
( |
const char *const |
name | ) |
|
|
inlinestaticinherited |
Check name of class against ROOT classes.
- Parameters
-
- Returns
- true if name of class corresponds to genuine class; else false
Definition at line 50 of file JRootClass.hh.
52 return (
name != NULL &&
53 strcmp(
name, TClass ::Class()->GetName()) != 0 &&
54 strcmp(
name, TObject::Class()->GetName()) != 0 &&
55 strcmp(
name,
"_Rb_tree_node_base") != 0 &&
56 strcmp(
name,
"fgIsA") != 0 &&
57 strcmp(
name,
"atomic<TClass*>") != 0);
then echo Enter input within $TIMEOUT_S seconds echo n User name
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 67 of file JRootClass.hh.
69 return is_class(base_class.GetName());
static bool is_class(const char *const name)
Check name of class against ROOT classes.
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 79 of file JRootClass.hh.
81 return is_class(data_member.GetTypeName());
static bool is_class(const char *const name)
Check name of class against ROOT classes.
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 91 of file JRootClass.hh.
93 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 103 of file JRootClass.hh.
105 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 115 of file JRootClass.hh.
117 return (strcmp(data_member.GetFullTypeName(),
"string") == 0 ||
118 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 128 of file JRootClass.hh.
130 return (data_member.Property() & kIsStatic);
TDictionary* JROOT::JRootClass::getDictionary |
( |
| ) |
const |
|
inlineinherited |
Get dictionary.
- Returns
- pointer to dictionary
Definition at line 163 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 174 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 185 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 196 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 222 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 309 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 349 of file JRootClass.hh.
357 if (this->
getClass()->GetListOfBases() != NULL) {
359 for (std::unique_ptr<TIterator> i(this->
getClass()->GetListOfBases()->MakeIterator());
const TBaseClass* p = (
const TBaseClass*) i->Next(); ) {
361 this->
get(*p).print(out, prefix +
"::" + p->GetName());
363 print(out, prefix +
"::" + p->GetName(), this->
get(*p).getTypename());
367 if (this->
getClass()->GetListOfDataMembers(kFALSE) != NULL) {
369 for (std::unique_ptr<TIterator> i(this->
getClass()->GetListOfDataMembers(kFALSE)->MakeIterator());
const TDataMember* p = (
const TDataMember*) i->Next(); ) {
371 this->
get(*p).print(out, prefix + (
is_static(*p) ?
"::" :
".") + p->GetName());
373 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 388 of file JRootClass.hh.
392 out <<
name <<
" " <<
'(' << type <<
')' << endl;
then echo Enter input within $TIMEOUT_S seconds echo n User name
TDictionary* JROOT::JRootClass::dictionary |
|
protectedinherited |
int JROOT::JRootClass::offset |
|
protectedinherited |
offset with respect to data structure [B]
Definition at line 318 of file JRootClass.hh.
The documentation for this struct was generated from the following file: