aboutsummaryrefslogtreecommitdiff
path: root/CarpetDev/CarpetIOF5/src/file.hh
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-01-15 19:22:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2008-01-15 19:22:00 +0000
commit8d4e2e1413bfa77ce220f42b442eefbfc2f2776f (patch)
tree3b53606f7d99a79fe702409c3ef7bae12b9b86a2 /CarpetDev/CarpetIOF5/src/file.hh
parent0efeb005c489d947a55d2318c172cb3066dc7c85 (diff)
CarpetIOF5: Write a meta-file containing an inventory
In addition to one data file per processor, also write out one meta-data file containing an inventory and external links to the other files. Compiles. Untested. darcs-hash:20080115192202-dae7b-e709063fdbe7d545389cdcb40846a10451e9f4c1.gz
Diffstat (limited to 'CarpetDev/CarpetIOF5/src/file.hh')
-rw-r--r--CarpetDev/CarpetIOF5/src/file.hh43
1 files changed, 42 insertions, 1 deletions
diff --git a/CarpetDev/CarpetIOF5/src/file.hh b/CarpetDev/CarpetIOF5/src/file.hh
index b5ac2d696..66d9f0334 100644
--- a/CarpetDev/CarpetIOF5/src/file.hh
+++ b/CarpetDev/CarpetIOF5/src/file.hh
@@ -2,6 +2,7 @@
#define FILE_HH
#include <string>
+#include <vector>
#include <hdf5.h>
@@ -14,6 +15,7 @@
namespace CarpetIOF5 {
using std::string;
+ using std::vector;
@@ -23,18 +25,40 @@ namespace CarpetIOF5 {
cGH const * const m_cctkGH;
- string const m_filename;
+ bool const m_have_metafile;
+ string const m_basename;
+ string const m_extension;
+
+ string m_metafilename;
+ string m_filename;
+
+ mutable vector <string> m_filenames;
+
+ hid_t m_hdf5_metafile;
hid_t m_hdf5_file;
file_t ();
file_t (file_t const &);
file_t operator= (file_t const &);
+ static int
+ base_10_digits (int number);
+
+ string
+ make_metafilename ()
+ const;
+
+ string
+ make_filename (int proc)
+ const;
+
public:
file_t (cGH const * cctkGH,
string filename,
+ string extension,
+ bool want_metafile,
bool do_truncate);
virtual
@@ -44,10 +68,27 @@ namespace CarpetIOF5 {
get_cctkGH ()
const;
+ bool
+ get_have_metafile ()
+ const;
+
+ string
+ get_filename (int proc)
+ const;
+
+ hid_t
+ get_hdf5_metafile ()
+ const;
+
hid_t
get_hdf5_file ()
const;
+ void
+ get_link_destination (string & filename,
+ string & objectname)
+ const;
+
virtual bool
invariant ()
const;