13.2.6. Macro “dataserverLoadASCIIFileIonosphere.C”
13.2.6.1. Objective
The objective of this macro is to load the ASCII data file ionosphere.dat which defines 34 input
variables and one output variable y and applies visualisation on one of these variables. The data
file ionosphere.dat is in the “Salome-table” format of Uranie but is not shown for convenience.
13.2.6.2. Macro Uranie
TDataServer * tds = new TDataServer();
TCanvas *Canvas = new TCanvas("c1", "Graph for the Macro loadASCIIFileIonosphere",5,64,1270,667);
tds->fileDataRead("ionosphere.dat");
tds->getAttribute("x28")->SetTitle("#Delta P_{e}^{F_{iso}}");
// Graph
tds->draw("x28");
The TDataServer is filled with ionosphere.dat with the fileDataRead method
tds->fileDataRead("ionosphere.dat");
A new title is set for the variable x28
tds->getAttribute("x28")->SetTitle("#Delta P_{e}^{F_{iso}}");
This variable is then drawn with its new title
tds->draw("x28");
13.2.6.3. Graph
Figure 13.5 Graph of the macro
"dataserverLoadASCIIFileIonosphere.C"