Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JGraph2DErrors.hh
Go to the documentation of this file.
1#ifndef __JROOT__JGRAPH2DERRORS__
2#define __JROOT__JGRAPH2DERRORS__
3
4#include <vector>
5
6#include "TGraph2DErrors.h"
7
8/**
9 * \author mdejong
10 */
11
12namespace JROOT {}
13namespace JPP { using namespace JROOT; }
14
15namespace JROOT {
16
17
18 /**
19 * Data structure for graph data.
20 */
22 /**
23 * Put data.
24 *
25 * \param x abscissa value
26 * \param y abscissa value
27 * \param z ordinate value
28 * \param ex abscissa error
29 * \param ey abscissa error
30 * \param ez ordinate error
31 */
32 void put(const Double_t x, const Double_t y, const Double_t z,
33 const Double_t ex, const Double_t ey, const Double_t ez)
34 {
35 X .push_back(x);
36 Y .push_back(y);
37 Z .push_back(z);
38 EX.push_back(ex);
39 EY.push_back(ey);
40 EZ.push_back(ez);
41 }
42
43 std::vector<Double_t> X; //!< abscissa values
44 std::vector<Double_t> Y; //!< abscissa values
45 std::vector<Double_t> Z; //!< ordinate values
46 std::vector<Double_t> EX; //!< abscissa errors
47 std::vector<Double_t> EY; //!< abscissa errors
48 std::vector<Double_t> EZ; //!< ordinate errors
49 };
50
51
52 /**
53 * Auxiliary data structure to build TGraph2DErrors.
54 */
56 public TGraph2DErrors
57 {
58 /**
59 * Constructor.
60 *
61 * \param graph graph data
62 * \param name graph name
63 */
64 JGraph2DErrors(JGraph2DErrors_t& graph, const char* name) :
65 TGraph2DErrors(graph.X .size(),
66 graph.X .data(),
67 graph.Y .data(),
68 graph.Z .data(),
69 graph.EX.data(),
70 graph.EY.data(),
71 graph.EZ.data())
72 {
73 SetName(name);
74 }
75 };
76}
77
78#endif
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for ROOT I/O.
Data structure for graph data.
std::vector< Double_t > EY
abscissa errors
std::vector< Double_t > Z
ordinate values
void put(const Double_t x, const Double_t y, const Double_t z, const Double_t ex, const Double_t ey, const Double_t ez)
Put data.
std::vector< Double_t > EX
abscissa errors
std::vector< Double_t > X
abscissa values
std::vector< Double_t > Y
abscissa values
std::vector< Double_t > EZ
ordinate errors
Auxiliary data structure to build TGraph2DErrors.
JGraph2DErrors(JGraph2DErrors_t &graph, const char *name)
Constructor.