Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
12 namespace JROOT {}
13 namespace JPP { using namespace JROOT; }
14 
15 namespace 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  */
55  struct JGraph2DErrors :
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
Data structure for graph data.
std::vector< Double_t > Z
ordinate values
Auxiliary data structure to build TGraph2DErrors.
std::vector< Double_t > X
abscissa values
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 > Y
abscissa values
JGraph2DErrors(JGraph2DErrors_t &graph, const char *name)
Constructor.
then fatal The output file must have the wildcard in the name
Definition: JCanberra.sh:31
std::vector< Double_t > EX
abscissa errors
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
Definition: JDrawPDF.sh:45
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
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 > EY
abscissa errors
std::vector< Double_t > EZ
ordinate errors