35 unique_ptr<TIterator> i(cls.
getClass()->GetListOfDataMembers()->MakeIterator());
37 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
38 if (!JRoot::is_static(*p)) {
39 if (this->count(p->GetName()) == 0) {
40 (*this)[p->GetName()] =
"";
63 for (
JEquation equation; reader >> equation && equation.getKey() != end_event::Class_Name(); ) {
73 (*this)[equation.getKey()] = equation.getValue();
95 unique_ptr<TIterator> i(cls.
getClass()->GetListOfDataMembers()->MakeIterator());
97 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
98 if (!JRoot::is_static(*p)) {
99 if (this->find(p->GetName()) != this->end() ||
102 writer.
put(p->GetName(), cls.
get(*p),
true);
126 unique_ptr<TIterator> i(cls.
getClass()->GetListOfDataMembers()->MakeIterator());
130 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
131 if (!JRoot::is_static(*p)) {
133 writer.
put(p->GetName(), cls.
get(*p),
true);
139 for (JHead::const_iterator i = this->begin(); i != this->end(); ++i) {
141 writer.
put(i->first, i->second);
166 for (Head::const_iterator i = from.begin(); i != from.end(); ++i) {
170 const string buffer = trim(i->second);
172 if (abc.
is_valid() && buffer !=
"") {
178 if (i->first ==
getTag(i->first)) {
207 unique_ptr<TIterator> i(cls.
getClass()->GetListOfDataMembers()->MakeIterator());
209 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
210 if (!JRoot::is_static(*p)) {
211 if (from.find(p->GetName()) != from.end() ||
214 writer.
put(p->GetName(), cls.
get(*p),
true);
221 for (JHead::const_iterator i = from.begin(); i != from.end(); ++i) {
222 if (to.find(i->first) == to.end()) {
ASCII I/O of objects with ROOT dictionary.
static JRootDictionary & getInstance()
Get reference to unique instance of this class object.
std::istream & read(std::istream &in)
Read header from input.
JAANET::start_run start_run
std::ostream & write(std::ostream &out) const
Write header to output.
void push()
Push all data members to Head.
std::ostream & print(std::ostream &out) const
Print header to output.
JAANET::end_event end_event
static JLANG::JEquationParameters & getEquationParameters()
Get equation parameters corresponding to Monte Carlo ASCII format, i.e:
General purpose equation class.
This class can be used to temporarily redirect an input stream to an input string.
Wrapper class around STL stringstream class to facilitate optional loading of data from file.
const char * c_str() const
C-string.
Implementation for ASCII input of objects with ROOT dictionary.
JRootReader & getObject(T &object)
Read object.
Implementation for ASCII output of objects with ROOT dictionary.
JRootWriter & put(const T &object)
Write object according equation format.
Extensions to Evt data format.
void copy(const Head &from, JHead &to)
Copy header from from to to.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Implementation for Head output of JHead objects with ROOT dictionary.
virtual JRootWriter & put(const JEquation &equation) override
Write equation.
bool is_valid() const
Check validity of this addressable class.
JRootAddressableClass find(const char *const name) const
Find addressable base class or data member with given name within current class.
JRootAddressableClass get(const TDataMember &object) const
Get addressable class of given data member.
Auxiliary class to manage access to base classes and data members of ROOT class.
TClass * getClass() const
Get class.
ROOT class for reading into object.
ROOT class for writing from object.