Files
musrfit/doc/technical/html/namespacenxs.html
T
2026-07-29 11:05:16 +00:00

214 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>musrfit: nxs Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">musrfit<span id="projectnumber">&#160;1.10.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',false,false,'search.php','Search',true);
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('namespacenxs.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">nxs Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Common utilities for NeXus file handling.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a5c87400a55867e90d3f6f95d2d37b6d8" id="r_a5c87400a55867e90d3f6f95d2d37b6d8"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5c87400a55867e90d3f6f95d2d37b6d8">HDFType</a> { <a class="el" href="#a5c87400a55867e90d3f6f95d2d37b6d8a8aee0c0676a2b00f33deaa1be0be783d">HDF4</a>
, <a class="el" href="#a5c87400a55867e90d3f6f95d2d37b6d8a86459eb6a9c3edb9d09e9d6fe8d5b9fa">HDF5</a>
, <a class="el" href="#a5c87400a55867e90d3f6f95d2d37b6d8a88183b946cc5f0e8c96b2e66e1c74a7e">Unknown</a>
}</td></tr>
<tr class="memdesc:a5c87400a55867e90d3f6f95d2d37b6d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeration of supported HDF file types. <a href="#a5c87400a55867e90d3f6f95d2d37b6d8">More...</a><br /></td></tr>
<tr class="separator:a5c87400a55867e90d3f6f95d2d37b6d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aec53b94446678ee1597e48358b74a82b" id="r_aec53b94446678ee1597e48358b74a82b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#a5c87400a55867e90d3f6f95d2d37b6d8">HDFType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aec53b94446678ee1597e48358b74a82b">checkHDFType</a> (const std::string &amp;filename)</td></tr>
<tr class="memdesc:aec53b94446678ee1597e48358b74a82b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine the HDF format type of a file by reading its header. <br /></td></tr>
<tr class="separator:aec53b94446678ee1597e48358b74a82b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0448f2057fce5a84ee483768d21e2f6" id="r_af0448f2057fce5a84ee483768d21e2f6"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af0448f2057fce5a84ee483768d21e2f6">getIso8601TimestampLocal</a> ()</td></tr>
<tr class="memdesc:af0448f2057fce5a84ee483768d21e2f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the current time and return it as na IOS8601 time stamp. <br /></td></tr>
<tr class="separator:af0448f2057fce5a84ee483768d21e2f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Common utilities for NeXus file handling. </p>
<p>The nxs namespace provides utility functions that are common to both HDF4 and HDF5 implementations. This includes file type detection and shared enumerations.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="namespacenxH4.html" title="HDF4 implementation of the NeXus file reader/writer.">nxH4</a> for HDF4-specific implementation </dd>
<dd>
<a class="el" href="namespacenxH5.html" title="HDF5 implementation of the NeXus file reader/writer.">nxH5</a> for HDF5-specific implementation </dd></dl>
</div><h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a5c87400a55867e90d3f6f95d2d37b6d8" name="a5c87400a55867e90d3f6f95d2d37b6d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c87400a55867e90d3f6f95d2d37b6d8">&#9670;&#160;</a></span>HDFType</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum class <a class="el" href="#a5c87400a55867e90d3f6f95d2d37b6d8">nxs::HDFType</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel strong">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Enumeration of supported HDF file types. </p>
<p>Used to identify whether a file is HDF4, HDF5, or of unknown format. This is determined by reading the file's magic bytes header. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a5c87400a55867e90d3f6f95d2d37b6d8a8aee0c0676a2b00f33deaa1be0be783d" name="a5c87400a55867e90d3f6f95d2d37b6d8a8aee0c0676a2b00f33deaa1be0be783d"></a>HDF4&#160;</td><td class="fielddoc"><p>HDF4 format (magic: 0x0e 0x03 0x13 0x01) </p>
</td></tr>
<tr><td class="fieldname"><a id="a5c87400a55867e90d3f6f95d2d37b6d8a86459eb6a9c3edb9d09e9d6fe8d5b9fa" name="a5c87400a55867e90d3f6f95d2d37b6d8a86459eb6a9c3edb9d09e9d6fe8d5b9fa"></a>HDF5&#160;</td><td class="fielddoc"><p>HDF5 format (magic: 0x89 'H' 'D' 'F' 0x0d 0x0a 0x1a 0x0a) </p>
</td></tr>
<tr><td class="fieldname"><a id="a5c87400a55867e90d3f6f95d2d37b6d8a88183b946cc5f0e8c96b2e66e1c74a7e" name="a5c87400a55867e90d3f6f95d2d37b6d8a88183b946cc5f0e8c96b2e66e1c74a7e"></a>Unknown&#160;</td><td class="fielddoc"><p>Unrecognized file format. </p>
</td></tr>
</table>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="_2workspace_2LMU_2musrfit_2src_2external_2nexus_2PNeXus_8h-example.html#a1">/workspace/LMU/musrfit/src/external/nexus/PNeXus.h</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PNeXus_8h_source.html#l00141">141</a> of file <a class="el" href="PNeXus_8h_source.html">PNeXus.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="aec53b94446678ee1597e48358b74a82b" name="aec53b94446678ee1597e48358b74a82b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec53b94446678ee1597e48358b74a82b">&#9670;&#160;</a></span>checkHDFType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="#a5c87400a55867e90d3f6f95d2d37b6d8">nxs::HDFType</a> nxs::checkHDFType </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>filename</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Determine the HDF format type of a file by reading its header. </p>
<p>Opens the file in binary mode and reads the first 8 bytes to compare against known HDF4 and HDF5 magic byte signatures. This allows automatic format detection before attempting to open the file with the appropriate library.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>Path to the file to check </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="#a5c87400a55867e90d3f6f95d2d37b6d8" title="Enumeration of supported HDF file types.">nxs::HDFType</a> indicating the format (HDF4, HDF5, or Unknown) </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="_2workspace_2LMU_2musrfit_2src_2external_2nexus_2PNeXus_8cpp-example.html#a0">/workspace/LMU/musrfit/src/external/nexus/PNeXus.cpp</a>, and <a class="el" href="_2workspace_2LMU_2musrfit_2src_2external_2nexus_2PNeXus_8h-example.html#a0">/workspace/LMU/musrfit/src/external/nexus/PNeXus.h</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PNeXus_8cpp_source.html#l00100">100</a> of file <a class="el" href="PNeXus_8cpp_source.html">PNeXus.cpp</a>.</p>
<p class="reference">References <a class="el" href="PNeXus_8h_source.html#l00142">HDF4</a>, <a class="el" href="PNeXus_8h_source.html#l00143">HDF5</a>, and <a class="el" href="PNeXus_8h_source.html#l00144">Unknown</a>.</p>
<p class="reference">Referenced by <a class="el" href="dump__header_8cpp_source.html#l00382">dump_header_nexus()</a>, and <a class="el" href="PRunDataHandler_8cpp_source.html#l02017">PRunDataHandler::ReadNexusFile()</a>.</p>
</div>
</div>
<a id="af0448f2057fce5a84ee483768d21e2f6" name="af0448f2057fce5a84ee483768d21e2f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0448f2057fce5a84ee483768d21e2f6">&#9670;&#160;</a></span>getIso8601TimestampLocal()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string nxs::getIso8601TimestampLocal </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>get the current time and return it as na IOS8601 time stamp. </p>
<dl class="section return"><dt>Returns</dt><dd>ISO 8601 time stamp string </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="_2workspace_2LMU_2musrfit_2src_2external_2nexus_2PNeXus_8cpp-example.html#a1">/workspace/LMU/musrfit/src/external/nexus/PNeXus.cpp</a>, and <a class="el" href="_2workspace_2LMU_2musrfit_2src_2external_2nexus_2PNeXus_8h-example.html#a5">/workspace/LMU/musrfit/src/external/nexus/PNeXus.h</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="PNeXus_8cpp_source.html#l00139">139</a> of file <a class="el" href="PNeXus_8cpp_source.html">PNeXus.cpp</a>.</p>
<p class="reference">Referenced by <a class="el" href="PRunDataHandler_8cpp_source.html#l04523">PRunDataHandler::WriteNexusFile()</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacenxs.html">nxs</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
</ul>
</div>
</body>
</html>