16 #include "JAAnet/JAAnetDictionary.hh"
55 JRootReadableClass cls(*
this);
57 for (JEquation equation; reader >> equation && equation.getKey() != end_event::Class_Name(); ) {
59 JRedirectString redirect(reader, equation.getValue());
61 const JRootReadableClass abc = cls.find(equation.getKey().c_str());
64 reader.getObject(abc);
67 (*this)[equation.getKey()] = equation.getValue();
87 JRootWritableClass cls(*
this);
89 TIterator* i = cls.getClass()->GetListOfDataMembers()->MakeIterator();
91 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
92 if (!JRootClass::is_static(*p)) {
93 if (this->find(p->GetName()) != this->end() ||
96 writer.put(p->GetName(), cls.get(*p),
true);
120 JRootWritableClass cls(*
this);
122 TIterator* i = cls.getClass()->GetListOfDataMembers()->MakeIterator();
126 for (
const TDataMember* p; (p = (
const TDataMember*) i->Next()) != NULL; ) {
127 if (!JRootClass::is_static(*p)) {
129 writer.put(p->GetName(), cls.get(*p),
true);
131 end_event = make_pair(p->GetName(), cls.get(*p));
135 for (JHead::const_iterator i = this->begin(); i != this->end(); ++i) {
136 if (!cls.find(i->first.c_str()).
is_valid()) {
141 writer.put(end_event.first, end_event.second,
true);
159 JRootReadableClass cls(to);
161 for (Head::const_iterator i = from.begin(); i != from.end(); ++i) {
163 const JRootReadableClass& abc = cls.find(
getTag(i->first).c_str());
165 const string buffer =
trim(i->second);
167 if (abc.is_valid() && buffer !=
"") {
169 JRedirectString redirect(reader, buffer);
171 reader.getObject(abc);
173 if (i->first ==
getTag(i->first)) {
205 for (JHead::const_iterator i = from.begin(); i != from.end(); ++i) {
206 if (to.find(i->first) == to.end()) {
static const std::string GSEAGEN
static const std::string KM3
static const std::string KM3SIM
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
*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).
std::string trim(const std::string &buffer)
Trim string.
JAANET::end_event end_event
ASCII I/O of objects with ROOT dictionary.
T & getInstance(const T &object)
Get static instance from temporary object.
static JLANG::JEquationParameters & getEquationParameters()
Get equation parameters corresponding to Monte Carlo ASCII format, i.e:
static const std::string MUPAGE
std::istream & read(std::istream &in)
Read header from input.
static const std::string GENIE
JAANET::start_run start_run
std::ostream & print(std::ostream &out) const
Print header to output.
static const std::string JSIRENE
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
static JStat getFileStatus
Function object for file status.
void copy(const Head &from, JHead &to)
Copy header from from to to.
static const std::string GENHEN
Generators.
bool is_valid(T JHead::*pd) const
Check validity of given data member in Head.
std::string getTag(const std::string &tag)
Get tag without aanet extension "_<counter>" for identical tags.
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
std::ostream & write(std::ostream &out) const
Write header to output.