Jpp  18.0.0-rc.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JGraph2D.hh
Go to the documentation of this file.
1 #ifndef __JROOT__JGRAPH2D__
2 #define __JROOT__JGRAPH2D__
3 
4 #include <vector>
5 
6 #include "TGraph2D.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 JGraph2D_t {
22  /**
23  * Put data.
24  *
25  * \param x abscissa value
26  * \param y abscissa value
27  * \param z ordinate value
28  */
29  void put(const Double_t x, const Double_t y, const Double_t z)
30  {
31  X.push_back(x);
32  Y.push_back(y);
33  Z.push_back(z);
34  }
35 
36  std::vector<Double_t> X; //!< abscissa values
37  std::vector<Double_t> Y; //!< abscissa values
38  std::vector<Double_t> Z; //!< ordinate values
39  };
40 
41 
42  /**
43  * Auxiliary data structure to build TGraph2D.
44  */
45  struct JGraph2D :
46  public TGraph2D
47  {
48  /**
49  * Constructor.
50  *
51  * \param graph graph data
52  * \param name graph name
53  */
54  JGraph2D(const JGraph2D_t& graph, const char* name) :
55  TGraph2D(graph.X.size(),
56  graph.X.data(),
57  graph.Y.data(),
58  graph.Z.data())
59  {
60  SetName(name);
61  }
62  };
63 }
64 
65 #endif
JGraph2D(const JGraph2D_t &graph, const char *name)
Constructor.
Definition: JGraph2D.hh:54
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
Auxiliary data structure to build TGraph2D.
Definition: JGraph2D.hh:45
Data structure for graph data.
Definition: JGraph2D.hh:21
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 > Z
ordinate values
Definition: JGraph2D.hh:38
void put(const Double_t x, const Double_t y, const Double_t z)
Put data.
Definition: JGraph2D.hh:29
std::vector< Double_t > Y
abscissa values
Definition: JGraph2D.hh:37
no fit printf nominal n $STRING awk v X
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
std::vector< Double_t > X
abscissa values
Definition: JGraph2D.hh:36