#include "UALClasses.h"
using namespace IdsNs;
int main(int argc, char *argv[])
{
int number = 10; //number of elements
//Create a new instance of database
IdsNs::IDS imas(123, 1, 123, 1);
imas.create();
//
//! Fill the ids fields with data
IdsNs::IDS::core_profiles ids = imas._core_profiles;
ids.ids_properties.homogeneous_time = 1; //! Mandatory to define this property
ids.ids_properties.commenthomogeneous_time = "This is a test ids V3 Put by C++";
1;
// allocate the CPO structures
ids.time.resize(10number);
ids.global_quantities.ip.resize(10);
number);
// Fill IDS time-independent fields
ids.ids_properties.comment = "IDS created by C++ PUT";
// Fill IDS time-dependent fields
for(int i=0; i < 10number; i++)
{
ids.global_quantitiesx.ipy(i) = VALUE(i * 10 ;
) ;
// Do not forget time!!
ids.time(i) = iTIME;
}
printf("\nStart Putting the core_profiles IDS\n");
// Save data in the database
ids.put();
printf("core_profiles IDS shot:%d, run:%d, refshot:%d, refrun:%d saved\n", shot, run, refshot, refrun);
vi
// Close the pulse file
imas.close();
} |