Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

TGraphAsymmErrorsFix.cpp

Go to the documentation of this file.
00001 #include "TGraphAsymmErrorsFix.h"
00002 
00003 #include <iostream>
00004 
00005 using namespace std;
00006 
00007 void TGraphAsymmErrorsFix::Set(Int_t n) throw() {
00008     if (n < 0) n = 0;
00009     if (n == fNpoints) return;
00010         
00011     TGraph::Set(n);
00012     
00013     Double_t *exh=0, *exl=0, *eyh=0, *eyl=0;
00014     if (n > 0) {
00015         exh = new Double_t[n];
00016         exl = new Double_t[n];
00017         eyh = new Double_t[n];
00018         eyl = new Double_t[n];
00019     }
00020     Int_t i;
00021     for (i=0; i<fNpoints && i<n;i++) {
00022         if (fEXlow) exl[i] = fEXlow[i];
00023         if (fEXhigh) exh[i] = fEXhigh[i];
00024         if (fEYlow) eyl[i] = fEYlow[i];
00025         if (fEYhigh) eyh [i] = fEYhigh[i];
00026     }
00027     for (i=fNpoints; i<n;i++) {
00028         exh[i] = 0;
00029         exl[i] = 0;
00030         eyh[i] = 0;
00031         eyl[i] = 0;
00032     }
00033     delete [] fEXlow;
00034     delete [] fEXhigh;
00035     delete [] fEYlow;
00036     delete [] fEYhigh;
00037     
00038     fEXhigh = exh;
00039     fEXlow = exl;
00040     fEYhigh = eyh;
00041     fEYlow = eyl;
00042     cout << "Rene -arrgghh" << endl;
00043 }

Generated on Mon Dec 15 19:36:20 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3