XSGraph.cxx

Go to the documentation of this file.
00001 #include "XSGraph.h"
00002 
00003 /* ===================== XSGraph ================= */
00004 XSGraph::XSGraph( NdbMTReactionXS *reac )
00005 {
00006         N = reac->Pairs();
00007 
00008         X = new Float_t[N];
00009         Y = new Float_t[N];
00010 
00011         for (int i=0; i<N; i++) {
00012                 X[i] = reac->Energy(i);
00013                 Y[i] = reac->XS(i);
00014         }
00015         
00016         graph = new TGraph(N,X,Y);
00017 } // XSGraph
00018 
00019 /* ---------- ~XSGraph --------- */
00020 XSGraph::~XSGraph()
00021 {
00022         if (N) {
00023                 delete [] X;
00024                 delete [] Y;
00025                 delete graph;
00026         }
00027 } // ~XSGraph

Generated on Tue Jul 5 15:15:05 2011 for ROOT_528-00b_version by  doxygen 1.5.1