Jpp  15.0.5
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JGraph.hh
Go to the documentation of this file.
1 #ifndef __JROOT__JGRAPH__
2 #define __JROOT__JGRAPH__
3 
4 #include <vector>
5 
6 #include "TGraph.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 JGraph_t {
22  /**
23  * Put data.
24  *
25  * \param x abscissa value
26  * \param y ordinate value
27  */
28  void put(const Double_t x, const Double_t y)
29  {
30  X.push_back(x);
31  Y.push_back(y);
32  }
33 
34  std::vector<Double_t> X; //!< abscissa values
35  std::vector<Double_t> Y; //!< ordinate values
36  };
37 
38 
39  /**
40  * Auxiliary data structure to build TGraph.
41  */
42  struct JGraph :
43  public TGraph
44  {
45  /**
46  * Constructor.
47  *
48  * \param graph graph data
49  * \param name graph name
50  */
51  JGraph(const JGraph_t& graph, const char* name) :
52  TGraph(graph.X.size(),
53  graph.X.data(),
54  graph.Y.data())
55  {
56  SetName(name);
57  }
58  };
59 }
60 
61 #endif
void put(const Double_t x, const Double_t y)
Put data.
Definition: JGraph.hh:28
std::vector< Double_t > Y
ordinate values
Definition: JGraph.hh:35
JGraph(const JGraph_t &graph, const char *name)
Constructor.
Definition: JGraph.hh:51
Data structure for graph data.
Definition: JGraph.hh:21
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh: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
Auxiliary data structure to build TGraph.
Definition: JGraph.hh:42
then break fi done getCenter read X Y Z let X
std::vector< Double_t > X
abscissa values
Definition: JGraph.hh:34