1 #ifndef __JDB_JDBREADER__
2 #define __JDB_JDBREADER__
7 #include "dbclient/KM3NeTDBClient.h"
18 #include "JDB/JDBDictionary.hh"
24 namespace JDATABASE {}
25 namespace JPP {
using namespace JDATABASE; }
30 using KM3NeT::DB::ResultSet;
31 using KM3NeT::DB::Selector;
63 for (string::size_type pos; (pos = parameter.find(*
i)) != string::npos; ) {
72 JRedirectString redirect(reader,
i->Value);
141 if (columns.empty()) {
145 for (
size_t i = 0;
i != rs.FieldCount(); ++
i) {
147 string parameter = rs.FieldName(
i);
150 for (string::size_type pos; (pos = parameter.find(*
i)) != string::npos; ) {
151 parameter.erase(pos);
155 columns.push_back(cls.
find(parameter.c_str()));
159 for (
unsigned int i = 0;
i != rs.FieldCount(); ++
i) {
163 JRedirectString redirect(*
this, rs.GetString(
i));
210 template<
class JElement_t,
class JAllocator_t>
213 for (JElement_t
object; rs >> object; ) {
214 buffer.push_back(
object);
TObject * getObject(const JRootObjectID &id)
Get first TObject with given identifier.
ROOT class for reading object.
static void reset()
Reset internal lookup table and default value.
bool is_valid(const json &js)
Check validity of JSon data.
const T & operator()(ResultSet &rs)
Read object with ROOT dictionary from result set.
Implementation for ASCII input of objects with ROOT dictionary.
ASCII I/O of objects with ROOT dictionary.
T & getInstance(const T &object)
Get static instance from temporary object.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
std::vector< JROOT::JRootReadableClass > columns
field count -> data member
std::string to_upper(const std::string &value)
Convert all character to upper case.
JRootReader & getObject(T &object)
Read object.
static const std::string SPECIAL_CHARACTERS
Special characters.
static void set(const std::vector< Selector > &selection)
Set default value corresponding to given selection.
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
bool is_valid() const
Check validity of this addressable class.
static data_type & getInstance()
Get unique instance of template class.
JRootAddressableClass find(const char *const name) const
Find addressable base class or data member with given name within current class.
JDBReader()
Default constructor.
Auxiliary class to read object with ROOT dictionary from database.
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null