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.
42 :
45 {}
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/10]
Write equation.
- Parameters
-
- Returns
- this ROOT writer
Reimplemented from JROOT::JRootWriter.
Definition at line 54 of file JHeadWriter.hh.
55 {
57
58 string key = equation.getKey();
59
62 }
63
65
66 return *this;
67 }
◆ put() [2/10]
Write object according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 338 of file JRootStreamer.hh.
339 {
340 return this->
put(JRootWritableClass(
object));
341 }
virtual JRootWriter & put(const JEquation &equation) override
Write equation.
◆ put() [3/10]
Write given key and value according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 352 of file JRootStreamer.hh.
353 {
356
357 ostringstream os;
358
359 {
361
363 }
364
366 }
General purpose equation class.
This class can be used to temporarily redirect one output (input) stream to another output (input) st...
Template definition of a multi-dimensional oscillation probability interpolation table.
JRootWriter & putObject(const T &object)
Write object.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
◆ put() [4/10]
Write ROOT class according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 375 of file JRootStreamer.hh.
376 {
377 return this->
put(
"", cls,
false);
378 }
◆ put() [5/10]
| JRootWriter & JROOT::JRootWriter::put |
( |
JRootWritableClass & | cls | ) |
|
|
inline |
Write ROOT class according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 387 of file JRootStreamer.hh.
388 {
389 return this->
put(
const_cast<const JRootWritableClass&
>(cls));
390 }
◆ put() [6/10]
Write ROOT class according equation format.
- Parameters
-
| prefix | prefix |
| cls | ROOT class |
| eol | end-of-line |
- Returns
- object output
Definition at line 401 of file JRootStreamer.hh.
402 {
405
406 if (
cls.is_valid()) {
407
409
410 JRootDictionary_t::const_iterator i = this->
getDictionary().find(
cls.getTypename());
411
413
414 i->second->put(*
this, prefix,
cls.getAddress());
415
416 } else if (eol) {
417
418 ostringstream os;
419
420 {
422
424 }
425
427
428 }
else if (
cls.getClass() !=
NULL) {
429
430 if (
cls.getClass()->GetListOfBases() !=
NULL) {
431
432 std::unique_ptr<TIterator> i(
cls.getClass()->GetListOfBases()->MakeIterator());
433
435 this->
put(prefix,
cls.get(*p),
false);
436 }
437 }
438
439 if (
cls.getClass()->GetListOfDataMembers() !=
NULL) {
440
441 std::unique_ptr<TIterator> i(
cls.getClass()->GetListOfDataMembers()->MakeIterator());
442
444 if (!JRoot::is_static(*p)) {
446 }
447 }
448 }
449 }
450 }
451
452 return *this;
453 }
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/10]
◆ getDictionary()
◆ put() [8/10]
Write ROOT class according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 375 of file JRootStreamer.hh.
376 {
377 return this->
put(
"", cls,
false);
378 }
JRootWriter & put(const T &object)
Write object according equation format.
◆ put() [9/10]
Write ROOT class according equation format.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 387 of file JRootStreamer.hh.
388 {
389 return this->
put(
const_cast<const JRootWritableClass&
>(cls));
390 }
◆ put() [10/10]
Write ROOT class according equation format.
- Parameters
-
| prefix | prefix |
| cls | ROOT class |
| eol | end-of-line |
- Returns
- object output
Definition at line 401 of file JRootStreamer.hh.
402 {
405
406 if (
cls.is_valid()) {
407
409
410 JRootDictionary_t::const_iterator i = this->
getDictionary().find(
cls.getTypename());
411
413
414 i->second->put(*
this, prefix,
cls.getAddress());
415
416 } else if (eol) {
417
418 ostringstream os;
419
420 {
422
424 }
425
427
428 }
else if (
cls.getClass() !=
NULL) {
429
430 if (
cls.getClass()->GetListOfBases() !=
NULL) {
431
432 std::unique_ptr<TIterator> i(
cls.getClass()->GetListOfBases()->MakeIterator());
433
435 this->
put(prefix,
cls.get(*p),
false);
436 }
437 }
438
439 if (
cls.getClass()->GetListOfDataMembers() !=
NULL) {
440
441 std::unique_ptr<TIterator> i(
cls.getClass()->GetListOfDataMembers()->MakeIterator());
442
446 }
447 }
448 }
449 }
450 }
451
452 return *this;
453 }
static bool is_static(const TDataMember &object)
Check if data member is static.
◆ putObject() [1/5]
| JRootWriter & JROOT::JRootWriter::putObject |
( |
const T & | object | ) |
|
|
inlineinherited |
Write object.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 477 of file JRootStreamer.hh.
478 {
480 }
Test availability of stream operators.
◆ putObject() [2/5]
Write ROOT class.
- Parameters
-
- Returns
- object output
Definition at line 489 of file JRootStreamer.hh.
490 {
492
493 if (cls.is_valid()) {
494
495 JRootDictionary_t::const_iterator i = this->
getDictionary().find(cls.getTypename());
496
498
499 i->second->putObject(*this, cls.getAddress());
500
501 } else if (cls.getClass() != NULL) {
502
503 if (cls.getClass()->GetListOfBases() != NULL) {
504
505 std::unique_ptr<TIterator> i(cls.getClass()->GetListOfBases()->MakeIterator());
506
507 for (const TBaseClass* p; (p = (const TBaseClass*) i->Next()) != NULL; ) {
509 }
510 }
511
512 if (cls.getClass()->GetListOfDataMembers() != NULL) {
513
514 std::unique_ptr<TIterator> i(cls.getClass()->GetListOfDataMembers()->MakeIterator());
515
516 for (const TDataMember* p; (p = (const TDataMember*) i->Next()) != NULL; ) {
519 }
520 }
521 }
522 }
523 }
524
525 return *this;
526 }
◆ putObject() [3/5]
| JRootWriter & JROOT::JRootWriter::putObject |
( |
const T & | object, |
|
|
const JBool< true > & | option ) |
|
inlineprivateinherited |
Write object.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 537 of file JRootStreamer.hh.
538 {
540
542 *this << object;
543
544 return *this;
545 }
std::ostream & white_space(std::ostream &out)
Print white space.
◆ putObject() [4/5]
| JRootWriter & JROOT::JRootWriter::putObject |
( |
const T & | object, |
|
|
const JBool< false > & | option ) |
|
inlineprivateinherited |
Write object.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 556 of file JRootStreamer.hh.
557 {
558 return this->
putObject(JRootWritableClass(
object));
559 }
◆ putObject() [5/5]
Write object.
- Parameters
-
- Returns
- this ROOT writer
Definition at line 570 of file JRootStreamer.hh.
571 {
573
576 }
577
578 return *this;
579 }
◆ 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: