1 #ifndef __JROOT__JROOTSTREAMER__ 
    2 #define __JROOT__JROOTSTREAMER__ 
   27 namespace JPP { 
using namespace JROOT; }
 
   99       std::istream(in.rdbuf()),
 
  101       dictionary(dictionary)
 
  170       using namespace JLANG;
 
  172       if (cls.is_valid()) {
 
  174         const JEquationFacet& facet = use_facet<JEquationFacet>(this->getloc());
 
  176         for (
JEquation equation; *
this >> equation; ) {
 
  186             if      (facet.
isDivision (equation.getSeparator()))
 
  188             else if (facet.
isSeparator(equation.getSeparator())) 
 
  193             okay &= (!this->
fail() || this->eof());
 
  197             throw JException(
"Error parsing: " + equation.toString());
 
  220           i->second->getObject(*
this, cls.
getAddress());
 
  222         } 
else if (cls.
getClass() != NULL) {
 
  224           if (cls.
getClass()->GetListOfBases() != NULL) {
 
  226             TIterator* i = cls.
getClass()->GetListOfBases()->MakeIterator();
 
  228             for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL && (
bool) (*this); ) {
 
  233           if (cls.
getClass()->GetListOfDataMembers() != NULL) {
 
  235             TIterator* i = cls.
getClass()->GetListOfDataMembers()->MakeIterator();
 
  237             for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL && (
bool) (*this); ) {
 
  256       return getObject(const_cast<const JRootReadableClass&>(cls));
 
  298     template<
class JElement_t, 
class JAllocator_t>
 
  305       for (JElement_t element; n != 0 && this->
getObject(element); --
n) {
 
  306         object.push_back(element);
 
  367         return writer.
put(key, value);
 
  393       std::ostream(out.rdbuf()),
 
  395       dictionary(dictionary)
 
  401       precision(out.precision());
 
  469       return this->put(
"", cls, 
false);
 
  481       return this->put(const_cast<const JRootWritableClass&>(cls));
 
  509       using namespace JLANG;
 
  513         const JEquationFacet& facet = use_facet<JEquationFacet>(this->getloc());
 
  519           i->second->put(*
this, prefix, cls.
getAddress());
 
  530         } 
else if (cls.
getClass() != NULL) {
 
  532           if (cls.
getClass()->GetListOfBases() != NULL) {
 
  534             TIterator* i = cls.
getClass()->GetListOfBases()->MakeIterator();
 
  536             for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL; ) {        
 
  537               this->put(prefix, cls.
get(*p), 
false);
 
  541           if (cls.
getClass()->GetListOfDataMembers() != NULL) {
 
  543             TIterator* i = cls.
getClass()->GetListOfDataMembers()->MakeIterator();
 
  545             for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
 
  547                 this->put(facet.
getPrefix(prefix,p->GetName()), cls.
get(*p), 
false);
 
  574           i->second->putObject(*
this, cls.
getAddress());
 
  576         } 
else if (cls.
getClass() != NULL) {
 
  578           if (cls.
getClass()->GetListOfBases() != NULL) {
 
  580             TIterator* i = cls.
getClass()->GetListOfBases()->MakeIterator();
 
  582             for (
const TBaseClass* p; (p = (
const TBaseClass*) i->Next()) != NULL; ) {
 
  587           if (cls.
getClass()->GetListOfDataMembers() != NULL) {
 
  589             TIterator* i = cls.
getClass()->GetListOfDataMembers()->MakeIterator();
 
  591             for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
 
  629       using namespace JLANG;
 
  652       using namespace JLANG;
 
  673     template<
class JElement_t, 
class JAllocator_t>
 
  694       using namespace JLANG;
 
  724     template<
class JElement_t, 
class JAllocator_t>
 
const JRootDictionary_t & getDictionary() const 
Get dictictionary. 
 
JRootWriter & put(const std::string &key, const T &value)
Write given key and value according equation format. 
 
JRootWriter & putObject(const T &object, const JBool< true > &option)
Write object. 
 
ROOT class for reading object. 
 
JRootAddressableClass find(const char *name) const 
Find addressable base class or data member with given name within current class. 
 
JRootReader & getObject(T &object, const JBool< false > &option)
Read object. 
 
Facet class to specify parsing of equations in currect locale (see class JLANG::JEquation). 
 
Implementation for ASCII output of objects with ROOT dictionary. 
 
Helper class for user formatting. 
 
const char * getTypename() const 
Get type name. 
 
const std::string getPrefix(const std::string &prefix, const std::string &name) const 
Get combined prefix for output. 
 
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
 
Default helper class for formatting. 
 
This class can be used to temporarily exchange the states between streams. 
 
std::ostream & white_space(std::ostream &out)
Print white space. 
 
static JRootWriter & putObject(JRootWriter &writer, const T &object)
Write object. 
 
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
 
Simple data structure to support I/O of equations (see class JLANG::JEquation). 
 
virtual JRootReader & getObject(JRootReader &in, void *address) const 
Stream input. 
 
Forward declaration of writer object. 
 
virtual JRootWriter & putObject(JRootWriter &out, const void *address) const 
Stream output. 
 
static JRootReader & getObject(JRootReader &reader, T &object)
Read object. 
 
JRootWriter & putObject(const T &object)
Write object. 
 
Test availability of stream operators. 
 
JRootWriter & put(const std::string &key, const T &value, const JBool< false > option)
Write given key and value according equation format. 
 
General purpose equation class. 
 
virtual JRootWriter & put(JRootWriter &out, const std::string &prefix, const void *address) const 
Stream output. 
 
static JRootWriter & put(JRootWriter &writer, const std::string &key, const T &value)
Write given key and value according equation format. 
 
Implementation for ASCII input of objects with ROOT dictionary. 
 
Auxiliary template class for type bool. 
 
const JRootDictionary_t & dictionary
 
std::ostream & separator(std::ostream &out)
Print separator. 
 
static JRootWriter & put(JRootWriter &writer, const std::string &key, const T &value)
Write given key and value according equation format. 
 
pointer_type getAddress() const 
Get address. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
JRootReader & getObject(const JRootReadableClass &cls)
Read ROOT class. 
 
JRootWriter(std::ostream &out, const JEquationParameters ¶meters, const JRootDictionary_t &dictionary)
Constructor. 
 
JRootReader(std::istream &in, const JEquationParameters ¶meters, const JRootDictionary_t &dictionary)
Constructor. 
 
JRootWriter & put(const std::string &key, const std::vector< JElement_t, JAllocator_t > &value, const JBool< false > option)
Write given key and value according equation format. 
 
JRootReader & getObject(T &object)
Read object. 
 
Default helper class for formatting. 
 
JRootReader & getObject(JRootReadableClass &cls)
Read ROOT class according equation format. 
 
JRootWriter & put(const std::string &prefix, const JRootWritableClass &cls, bool eol)
ROOT class output. 
 
JRootWriter & put(JRootWritableClass &cls)
Write object according equation format. 
 
JRootReader & getObject(std::vector< JElement_t, JAllocator_t > &object, const JBool< false > &option)
Read object. 
 
JRootAddressableClass get(const TDataMember &data_member) const 
Get addressable class of given data member. 
 
bool fail(std::istream &in)
Check for stream state. 
 
This file contains the basic interface for ASCII I/O of ROOT objects. 
 
JRootWriter & putObject(const T &object, const JBool< false > &option)
Write object. 
 
Type definition of ROOT based dictionary for ASCII O. 
 
bool is_valid() const 
Check validity of this addressable class. 
 
TClass * getClass() const 
Get class. 
 
static JRootReader & getObject(JRootReader &reader, T &object)
Read object. 
 
alias put_queue eval echo n
 
bool isSeparator(const char c) const 
Test for separator character. 
 
static const JLANG::JEndOfLine end_of_line
Print end of line. 
 
bool isDivision(const char c) const 
Test for division character. 
 
static JRootWriter & putObject(JRootWriter &writer, const T &object)
Write object. 
 
JRootReader & getObject(T &object, const JBool< true > &option)
Read object. 
 
const JRootDictionary_t & dictionary
 
Helper class for user formatting. 
 
JRootWriter & put(const T &object)
Write object according equation format. 
 
JRootWriter & put(const std::string &key, const T &value, const JBool< true > option)
Write given key and value according equation format. 
 
This class can be used to temporarily redirect an input stream to an input string. 
 
const JRootDictionary_t & getDictionary() const 
Get dictionary. 
 
JRootWriter & put(const JRootWritableClass &cls)
Write object according equation format. 
 
JRootWriter & putObject(const JRootWritableClass &cls)
ROOT class output. 
 
static bool is_static(const TDataMember &data_member)
Check if data member is static. 
 
ROOT class for writing object. 
 
bool putObject(TDirectory *dir, const T &object)
Write object to ROOT directory. 
 
JRootWriter & putObject(const std::vector< JElement_t, JAllocator_t > &object, const JBool< false > option)
Write object.