EvalTGraphPoint.C

00001 #include "TROOT.h"
00002 #include "TGraph.h"
00003 
00004 double EvalTGraphPoint(const TGraph gr, const double x_pt) {
00005   const int N = gr.GetN();
00006   double * x_arr = gr.GetX();
00007   double * y_arr = gr.GetY();
00008   for(int i = 0; i < N; ++i)
00009     if(x_pt == x_arr[i]) {
00010       return y_arr[i];
00011     }
00012   return gr.Eval(x_pt);
00013 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1