Implementation for Head output of JHead objects with ROOT dictionary.
More...
#include <JHeadWriter.hh>
Implementation for Head output of JHead objects with ROOT dictionary.
Definition at line 28 of file JHeadWriter.hh.
◆ JHeadWriter()
Constructor.
- Parameters
-
header | header output |
parameters | equation parameters |
dictionary | dictionary |
Definition at line 40 of file JHeadWriter.hh.
JRootWriter(std::ostream &out, const JEquationParameters ¶meters, const JRootDictionary_t &dictionary)
Constructor.
const JRootDictionary_t & dictionary
static JNullStream null
Null I/O stream.
◆ put() [1/12]
Write equation.
- Parameters
-
- Returns
- this ROOT writer
Reimplemented from JROOT::JRootWriter.
Definition at line 54 of file JHeadWriter.hh.
58 string key = equation.getKey();
61 key =
getTag(equation.getKey(), i);
64 header[key] = equation.getValue();
std::string getTag(const std::string &tag)
Get tag without aanet extension "_<counter>" for identical tags.
◆ put() [2/12]
Write object according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 337 of file JRootStreamer.hh.
JRootWriter & put(const JRootWritableClass &cls)
Write ROOT class according equation format.
ROOT class for writing object.
◆ put() [3/12]
Write given key and value according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 351 of file JRootStreamer.hh.
General purpose equation class.
This class can be used to temporarily redirect one output (input) stream to another output (input) st...
JRootWriter & putObject(const T &object)
Write object.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
◆ put() [4/12]
Write ROOT class according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 374 of file JRootStreamer.hh.
376 return this->
put(
"", cls,
false);
◆ put() [5/12]
Write ROOT class according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 386 of file JRootStreamer.hh.
◆ put() [6/12]
Write ROOT class according equation format.
- Parameters
-
prefix | prefix |
cls | ROOT class |
eol | end-of-line |
- Returns
- object output
Definition at line 400 of file JRootStreamer.hh.
405 if (cls.is_valid()) {
407 const JEquationFacet& facet = use_facet<JEquationFacet>(this->getloc());
409 JRootDictionary_t::const_iterator i = this->
getDictionary().find(cls.getTypename());
413 i->second->put(*
this, prefix, cls.getAddress());
427 }
else if (cls.getClass() != NULL) {
429 if (cls.getClass()->GetListOfBases() != NULL) {
431 std::unique_ptr<TIterator> i(cls.getClass()->GetListOfBases()->MakeIterator());
433 for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL; ) {
434 this->
put(prefix, cls.get(*p),
false);
438 if (cls.getClass()->GetListOfDataMembers() != NULL) {
440 std::unique_ptr<TIterator> i(cls.getClass()->GetListOfDataMembers()->MakeIterator());
442 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
443 if (!JRootClass::is_static(*p)) {
444 this->
put(facet.
getPrefix(prefix,p->GetName()), cls.get(*p),
false);
Facet class to specify parsing of equations in currect locale (see class JLANG::JEquation).
const std::string getPrefix(const std::string &prefix, const std::string &name) const
Get combined prefix for output.
const JRootDictionary_t & getDictionary() const
Get dictictionary.
◆ put() [7/12]
Write equation.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 461 of file JRootStreamer.hh.
◆ getDictionary()
◆ put() [8/12]
template<class T >
JRootWriter& JROOT::JRootWriter::put |
( |
const T & |
object | ) |
|
|
inlineinherited |
Write object according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 337 of file JRootStreamer.hh.
JRootWriter & put(const T &object)
Write object according equation format.
◆ put() [9/12]
template<class T >
JRootWriter& JROOT::JRootWriter::put |
( |
const std::string & |
key, |
|
|
const T & |
value |
|
) |
| |
|
inlineinherited |
Write given key and value according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 351 of file JRootStreamer.hh.
◆ put() [10/12]
Write ROOT class according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 374 of file JRootStreamer.hh.
376 return this->
put(
"", cls,
false);
◆ put() [11/12]
Write ROOT class according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 386 of file JRootStreamer.hh.
◆ put() [12/12]
Write ROOT class according equation format.
- Parameters
-
prefix | prefix |
cls | ROOT class |
eol | end-of-line |
- Returns
- object output
Definition at line 400 of file JRootStreamer.hh.
407 const JEquationFacet& facet = use_facet<JEquationFacet>(this->getloc());
413 i->second->put(*
this, prefix, cls.
getAddress());
427 }
else if (cls.
getClass() != NULL) {
429 if (cls.
getClass()->GetListOfBases() != NULL) {
431 std::unique_ptr<TIterator> i(cls.
getClass()->GetListOfBases()->MakeIterator());
433 for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL; ) {
434 this->
put(prefix, cls.
get(*p),
false);
438 if (cls.
getClass()->GetListOfDataMembers() != NULL) {
440 std::unique_ptr<TIterator> i(cls.
getClass()->GetListOfDataMembers()->MakeIterator());
442 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
bool is_valid() const
Check validity of this addressable class.
pointer_type getAddress() const
Get address.
JRootAddressableClass get(const TDataMember &data_member) const
Get addressable class of given data member.
static bool is_static(const TDataMember &data_member)
Check if data member is static.
TClass * getClass() const
Get class.
const char * getTypename() const
Get type name.
◆ putObject() [1/5]
template<class T >
JRootWriter& JROOT::JRootWriter::putObject |
( |
const T & |
object | ) |
|
|
inlineinherited |
Write object.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 476 of file JRootStreamer.hh.
Test availability of stream operators.
Auxiliary template class for type bool.
◆ putObject() [2/5]
Write ROOT class.
- Parameters
-
- Returns
- object output
Definition at line 488 of file JRootStreamer.hh.
498 i->second->putObject(*
this, cls.
getAddress());
500 }
else if (cls.
getClass() != NULL) {
502 if (cls.
getClass()->GetListOfBases() != NULL) {
504 std::unique_ptr<TIterator> i(cls.
getClass()->GetListOfBases()->MakeIterator());
506 for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL; ) {
511 if (cls.
getClass()->GetListOfDataMembers() != NULL) {
513 std::unique_ptr<TIterator> i(cls.
getClass()->GetListOfDataMembers()->MakeIterator());
515 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
◆ putObject() [3/5]
template<class T >
JRootWriter& JROOT::JRootWriter::putObject |
( |
const T & |
object, |
|
|
const JBool< true > & |
option |
|
) |
| |
|
inlineprivateinherited |
Write object.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 536 of file JRootStreamer.hh.
std::ostream & white_space(std::ostream &out)
Print white space.
◆ putObject() [4/5]
template<class T >
JRootWriter& JROOT::JRootWriter::putObject |
( |
const T & |
object, |
|
|
const JBool< false > & |
option |
|
) |
| |
|
inlineprivateinherited |
Write object.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 555 of file JRootStreamer.hh.
◆ putObject() [5/5]
template<class JElement_t , class JAllocator_t >
Write object.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 569 of file JRootStreamer.hh.
◆ header
Head& JAANET::JHeadWriter::header |
|
private |
◆ dictionary
◆ __from
std::ios& JLANG::JStreamState::__from |
|
privateinherited |
◆ __to
std::ios& JLANG::JStreamState::__to |
|
privateinherited |
The documentation for this struct was generated from the following file: