Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JShowerFitParameters_t.cc
Go to the documentation of this file.
1#include <istream>
2#include <ostream>
3
4#include "JSystem/JStat.hh"
9
10/**
11 * Read fit parameters from input.
12 *
13 * \param in input stream
14 * \param parameters fit parameters
15 * \return input stream
16 */
17std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JShowerFitParameters_t& parameters)
18{
19 using namespace std;
20 using namespace JPP;
21
22 JStringStream is(in);
23
24 if (getFileStatus(is.str().c_str())) {
25 is.load();
26 }
27
28 JRootReader(is, JEquationParameters(), JRootDictionary::getInstance()).get(parameters);
29
30 return in;
31}
32
33
34/**
35 * Write fit parameters to output.
36 *
37 * \param out output stream
38 * \param parameters fit parameters
39 * \return output stream
40 */
41std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JShowerFitParameters_t& parameters)
42{
43 using namespace JPP;
44
45 JRootWriter(out, JEquationParameters(), JRootDictionary::getInstance()).put(parameters);
46
47 return out;
48}
ASCII I/O of objects with ROOT dictionary.
std::istream & operator>>(std::istream &in, JRECONSTRUCTION::JShowerFitParameters_t &parameters)
Read fit parameters from input.
std::ostream & operator<<(std::ostream &out, const JRECONSTRUCTION::JShowerFitParameters_t &parameters)
Write fit parameters to output.
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).
Data structure for fit parameters.