Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JGraphErrors.hh
Go to the documentation of this file.
1#ifndef __JROOT__JGRAPHERRORS__
2#define __JROOT__JGRAPHERRORS__
3
4#include <vector>
5
6#include "TGraphErrors.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 ordinate value
27 * \param ex abscissa error
28 * \param ey ordinate error
29 */
30 void put(const Double_t x, const Double_t y,
31 const Double_t ex, const Double_t ey)
32 {
33 X .push_back(x);
34 Y .push_back(y);
35 DX.push_back(ex);
36 DY.push_back(ey);
37 }
38
39 std::vector<Double_t> X; //!< abscissa values
40 std::vector<Double_t> Y; //!< ordinate values
41 std::vector<Double_t> DX; //!< abscissa errors
42 std::vector<Double_t> DY; //!< ordinate errors
43 };
44
45
46 /**
47 * Auxiliary data structure to build TGraphErrors.
48 */
49 struct JGraphErrors :
50 public TGraphErrors
51 {
52 /**
53 * Constructor.
54 *
55 * \param graph graph data
56 * \param name graph name
57 */
58 JGraphErrors(const JGraphErrors_t& graph, const char* name) :
59 TGraphErrors(graph.X .size(),
60 graph.X .data(),
61 graph.Y .data(),
62 graph.DX.data(),
63 graph.DY.data())
64 {
65 SetName(name);
66 }
67 };
68}
69
70#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 > DX
abscissa errors
std::vector< Double_t > Y
ordinate values
std::vector< Double_t > DY
ordinate errors
std::vector< Double_t > X
abscissa values
void put(const Double_t x, const Double_t y, const Double_t ex, const Double_t ey)
Put data.
Auxiliary data structure to build TGraphErrors.
JGraphErrors(const JGraphErrors_t &graph, const char *name)
Constructor.