#include <iostream>
#include "UALClasses.h"
using namespace IdsNs;
int main(int argc, char *argv[])
{
IDS::core_profiles ids; // <= IDS object
const char* treename = "ids";
const char* database = "test";
int shot = 13;
int run = 22;
char* userName;
char* imasVersion;
// Gets user name and data version
userName = getenv("USER");
imasVersion = getenv("IMAS_VERSION");
//Open database
IdsNs::IDS imas(shot, run, -1, -1);
imas.openEnv(userName, database, imasVersion);
ids = imas._core_profiles;
//Get the slice corresponding to the passed time
ids.getSlice(2.0, 2);
cout << "Time: " << ids.time << endl;
cout << "Value: " << ids.global_quantities.ip << endl;
// Close the pulse file
imas.close();
} |