Jpp 20.0.0-27-g39925593c-D
the software that should make you happy
Loading...
Searching...
No Matches
JRunQuality.cc
Go to the documentation of this file.
1#include <string>
2#include <exception>
3
8
11
12#include "JDB/JDB.hh"
13#include "JDB/JDBToolkit.hh"
14#include "JDB/JRunQuality.hh"
15
16
17namespace JDATABASE {
18
19 /**
20 * Put value at given key.
21 *
22 * \param key key
23 * \param value value
24 */
25 void JRunQuality::put(const std::string& key,
26 const std::string& value)
27 {
28 using namespace std;
29 using namespace JPP;
30
31 const JEquationParameters parameters(":", "\n", "", "");
32
33 JRootReader reader(null, parameters, JRootDictionary::getInstance());
35
36 const string buffer = replace(key, "-", "_");
37
38 for (string::size_type il = 0, ir = 0; ir != string::npos && cls.is_valid(); il = ir + 1) {
39 ir = buffer.substr(il).find(parameters.getDefaultDivision());
40 cls = cls.find(buffer.substr(il, ir - il).c_str());
41 }
42
43 if (cls.is_valid()) {
44
46
47 reader.getObject(cls);
48 }
49 }
50}
TString replace(const TString &target, const TRegexp &regexp, const T &replacement)
Replace regular expression in input by given replacement.
ASCII I/O of objects with ROOT dictionary.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
const char getDefaultDivision() const
Get default division character.
This class can be used to temporarily redirect an input stream to an input string.
Template definition of a multi-dimensional oscillation probability interpolation table.
Implementation for ASCII input of objects with ROOT dictionary.
JRootReader & getObject(T &object)
Read object.
Auxiliary classes and methods for database I/O.
Definition JAHRS.hh:14
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double value
setup identifier (see JRunsetups)
void put(const std::string &key, const std::string &value)
Put value at given key.
static data_type & getInstance()
Get unique instance of template class.
Definition JSingleton.hh:27
ROOT class for reading into object.