10 HDFgroup *geom1, *geom2, *mesh1, *mesh2;
12 char name[HDF_NAME_MAX_LEN+1];
16 // the groups 'GEOM' and 'MESH' become mounted points for
17 // the files 'geom.hdf' and 'mesh.hdf' in the 'study.hdf' file
19 study = new HDFfile("study.hdf");
20 MESSAGE( ">> The HDFfile object for 'study.hdf' is created" );
22 study->OpenOnDisk(HDF_RDONLY);
23 MESSAGE( "--> The file is opened" );
25 geom = new HDFgroup("GEOM",study);
26 MESSAGE( ">> The HDFgroup object for 'GEOM' is created" );
28 geom->FileMount("geom.hdf",HDF_RDONLY);
29 MESSAGE( ">> 'GEOM' becomes a mounted point for the file 'geom.hdf'" );
32 MESSAGE( "--> The group is opened" );
34 m = geom->nInternalObjects();
35 MESSAGE( "--> There are " << m << " objects in the group" );
39 geom->InternalObjectIndentify(i,name);
40 MESSAGE( "--> First Level Internal Object Name : " << name );
43 geom1 = new HDFgroup("GEOM_1",geom);
44 MESSAGE( ">> The HDF group object is created for 'GEOM_1' with 'GEOM' as father" );
45 MESSAGE( "--> This group is in fact in the file 'geom.hdf'");
48 MESSAGE( "-> The group 'GEOM_1' is opened" );
51 MESSAGE( "-> The group 'GEOM_1' is closed" );
53 geom2 = new HDFgroup("GEOM_2",geom);
54 MESSAGE( ">> The HDF group object is created for 'GEOM_2' with 'GEOM' as father" );
55 MESSAGE( "--> This group is in fact in the file 'geom.hdf'");
58 MESSAGE( "-> The group 'GEOM_2' is opened" );
61 MESSAGE( "-> The group 'GEOM_2' is closed" );
64 MESSAGE( "-> The group 'GEOM' is closed" );
67 MESSAGE( ">> The file 'geom.hdf' is unmounted from 'GEOM' " );
69 mesh = new HDFgroup("MESH",study);
71 mesh->FileMount("mesh.hdf",HDF_RDONLY);
75 mesh1 = new HDFgroup("MESH_1",mesh);
81 mesh2 = new HDFgroup("MESH_2",mesh);
91 MESSAGE( ">> The same operations have been done for the file 'mesh.hdf'" )
92 MESSAGE( " and the groups MESH_1 and MESH_2" )
93 MESSAGE( "--> This file has been mounted on the group 'MESH' of the file 'study.hdf' ")
96 MESSAGE( ">> The study.hdf file is closed" );
98 MESSAGE( ">> Memory clean" );
109 MESSAGE( "!!! HDFexception !!! ")