Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content Layer
id1195548671
Content Column
width50.00001%
id1195578110
classrm_pagetree_col mobile-hide
Content Block
id1195578111
 
Content Column
width50.00001%
id1195548673
classhdf-rm-main-column
Content Block
id1195548672

Include Content
render-without-blockstrue
page.rm-navbar
HTML Wrap
classhdf-print-only

Page Title

HTML Wrap
classhdf-rm-summary-block

Hdf rm anchor
AnchorNamesummary

Excerpt

Returns the number of open object identifiers for an open file

HTML Wrap
classhdf-rm-content-block

Hdf rm anchor
AnchorNameprocedure

Procedure:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf_procedure

H5F_GET_OBJ_COUNT (file_id, types)

Hdf rm anchor
AnchorNamesignature

Signature:
HTML Wrap
classhdf-rm-section
HTML Wrap
classhdf-togglebox hdf-c

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-c

HTML
<pre><code class="language-c">ssize_t H5Fget_obj_count( hid_t file_id, unsigned int types )</code></pre>
HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

HTML Add Class
hdf-togglebutton-visible
hdf-togglebutton-visible
selector.hdf-togglebutton.hdf-fortran

HTML
<pre><code class="language-fortran">SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr)

  IMPLICIT NONE 
  INTEGER(HID_T), INTENT(IN)  :: file_id    ! File identifier
  INTEGER, INTENT(IN)         :: obj_type   ! Object types, possible values are:
                                            !     H5F_OBJ_FILE_F
                                            !     H5F_OBJ_GROUP_F
                                            !     H5F_OBJ_DATASET_F
                                            !     H5F_OBJ_DATATYPE_F
                                            !     H5F_OBJ_ALL_F
  INTEGER(SIZE_T), INTENT(OUT) :: obj_count ! Number of opened objects
  INTEGER, INTENT(OUT)         :: hdferr    ! Error code 
                                            ! 0 on success and -1 on failure
END SUBROUTINE h5fget_obj_count_f</code></pre>

Hdf rm anchor
AnchorNameparameters

Parameters:
HTML Wrap
classhdf-rm-section
hid_t file_idIN: Identifier of a currently-open HDF5 file or H5F_OBJ_ALL for all currently-open HDF5 files
unsigned int types    IN: Type of object for which identifiers are to be returned

Hdf rm anchor
AnchorNamedescription

Description:
HTML Wrap
classhdf-rm-section

Given the identifier of an open file, file_id, and the desired object types, types, H5Fget H5F_obj_count returns GET_OBJ_COUNT returns the number of open object identifiers for the file.

To retrieve a count of open identifiers for open objects in all HDF5 application files that are currently open, pass the value (hid_t)H5F_OBJ_ALL (FortranINT(H5F_OBJ_ALL_F,HID_T)) in file_id.

The types of objects to be counted are specified in types as follows:

H5F_OBJ_FILEFiles only
H5F_OBJ_DATASETDatasets only
H5F_OBJ_GROUPGroups only
H5F_OBJ_DATATYPE  Named datatypes only
H5F_OBJ_ATTR  Attributes only
H5F_OBJ_ALLAll of the above 
(That is, H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR)
H5F_OBJ_LOCALRestrict search to objects opened through current file identifier. 
Note: H5F_OBJ_LOCAL does not stand alone; it is effective only when used in combination with one or more of the preceding types. For example, 
    H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_LOCAL 
would count all datasets and groups opened through the current file identifier.

Multiple object types can be combined with the logical OR operator (|). For example, the expression (H5F_OBJ_DATASET|H5F_OBJ_GROUP) would call for datasets and groups.

Hdf rm anchor
AnchorNamereturns

Returns:
HTML Wrap
classhdf-rm-section

Returns the number of open objects if successful; otherwise returns a negative value. 

Hdf rm anchor
AnchorNameexample

Example:
HTML Wrap
classhdf-rm-section

Coming soon!

Comment
HTML Wrap
classhdf-togglebox hdf-c

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathexamples/h5_subset.c
showLineNumberstrue
lineStart32
progLangcpp
lineEnd42
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

HTML Wrap
classhdf-togglebox hdf-fortran hdf-togglebox-hidden

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/1.10/master
projectKeyHDFFV
filepathfortran/examples/compound.f90
showLineNumberstrue
lineStart25
progLangplain
lineEnd35
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Hdf rm anchor
AnchorNamehistory

History:
HTML Wrap
classhdf-rm-section
Release    Change
1.6.5H5F_OBJ_LOCAL has been added as a qualifier on the types of objects to be counted. H5F_OBJ_LOCAL restricts the search to objects opened through current file identifier.
1.6.8 and 1.8.2  C function return type changed to ssize_t.