Jpp  18.3.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
12 namespace JROOT {}
13 namespace JPP { using namespace JROOT; }
14 
15 namespace JROOT {
16 
17 
18  /**
19  * Data structure for graph data.
20  */
21  struct JGraphErrors_t {
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
std::vector< Double_t > X
abscissa values
Definition: JGraphErrors.hh:39
std::vector< Double_t > Y
ordinate values
Definition: JGraphErrors.hh:40
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
Data structure for graph data.
Definition: JGraphErrors.hh:21
std::vector< Double_t > DY
ordinate errors
Definition: JGraphErrors.hh:42
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
std::vector< Double_t > DX
abscissa errors
Definition: JGraphErrors.hh:41
Auxiliary data structure to build TGraphErrors.
Definition: JGraphErrors.hh:49
JGraphErrors(const JGraphErrors_t &graph, const char *name)
Constructor.
Definition: JGraphErrors.hh:58
no fit printf nominal n $STRING awk v X
void put(const Double_t x, const Double_t y, const Double_t ex, const Double_t ey)
Put data.
Definition: JGraphErrors.hh:30