Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JFitParameters.cc
Go to the documentation of this file.
1#include "JSystem/JStat.hh"
6
7
8/**
9 * Read parameters from input stream.
10 *
11 * \param in input stream
12 * \param parameters parameters
13 * \return input stream
14 */
15std::istream& operator>>(std::istream& in, JACOUSTICS::JFitParameters& parameters)
16{
17 using namespace JPP;
18
19 JStringStream is(in);
20
21 if (getFileStatus(is.str().c_str())) {
22 is.load();
23 }
24
25 JRootReader(is, JEquationParameters(), JRootDictionary::getInstance()).get(parameters);
26
27 return in;
28}
29
30
31/**
32 * Write parameters to output stream.
33 *
34 * \param out output stream
35 * \param parameters parameters
36 * \return output stream
37 */
38std::ostream& operator<<(std::ostream& out, const JACOUSTICS::JFitParameters& parameters)
39{
40 using namespace JPP;
41
42 const size_t n = out.precision(6);
43
44 JRootWriter(out, JEquationParameters(), JRootDictionary::getInstance()).put(parameters);
45
46 out.precision(n);
47
48 return out;
49}
std::istream & operator>>(std::istream &in, JACOUSTICS::JFitParameters &parameters)
Read parameters from input stream.
std::ostream & operator<<(std::ostream &out, const JACOUSTICS::JFitParameters &parameters)
Write parameters to output stream.
Acoustic fit parameters.
ASCII I/O of objects with ROOT dictionary.
File status.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Wrapper class around STL stringstream class to facilitate optional loading of data from file.
void load()
Load data from file with name corresponding to current contents.
Implementation for ASCII input of objects with ROOT dictionary.
JRootReader & get(T &object)
Read object according equation format.
Implementation for ASCII output of objects with ROOT dictionary.
JRootWriter & put(const T &object)
Write object according equation format.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).