Jpp 20.0.0-rc.9-29-gccc23c492-D
the software that should make you happy
Loading...
Searching...
No Matches
JTriggerParameters.cc
Go to the documentation of this file.
1#include "JSystem/JStat.hh"
2#include "JROOT/JRootStreamer.hh"
3#include "JROOT/JRootDictionary.hh"
4#include "JLang/JStringStream.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::JTriggerParameters& 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::JTriggerParameters& 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::ostream & operator<<(std::ostream &out, const JACOUSTICS::JTriggerParameters &parameters)
Write parameters to output stream.
std::istream & operator>>(std::istream &in, JACOUSTICS::JTriggerParameters &parameters)
Read parameters from input stream.
Acoustic trigger parameters.