4 #ifndef tools_hdf5_store
5 #define tools_hdf5_store
19 store(std::ostream& a_out,hid_t a_group,
const std::string& a_name,
bool a_write,
unsigned int a_compress)
26 tools::mem::increment(s_class().c_str());
30 a_out <<
"tools::hdf5::store::store : string a_name is empty." << std::endl;
36 a_out <<
"tools::hdf5::store::store : can't create " << a_name <<
" group." << std::endl;
41 m_out <<
"tools::hdf5::store::store : write_atb(type) failed." << std::endl;
47 m_out <<
"tools::hdf5::store::store : write_atb(class) failed." << std::endl;
53 if(!write_scalar_atb<int>(
m_group,
"version",v)) {
54 m_out <<
"tools::hdf5::store::store : write_scalar_atb(version) failed." << std::endl;
62 a_out <<
"tools::hdf5::store::store : can't open " << a_name <<
" group." << std::endl;
66 std::vector<std::string> names;
68 m_out <<
"tools::hdf5::store::store : read_array_string(names) failed." << std::endl;
73 std::vector<std::string> TFORMs;
75 m_out <<
"tools::hdf5::store::store : read_array_string(tforms) failed." << std::endl;
80 if(names.size()!=TFORMs.size()) {
81 m_out <<
"tools::hdf5::store::store : names/TFORMs size mismatch." << std::endl;
82 m_out <<
"names :" << std::endl;
84 m_out <<
"TFORMs :" << std::endl;
90 for(
size_t index=0;index<names.size();index++) {
92 m_out <<
"tools::hdf5::store::store : can't create hdf5_column "
106 m_out <<
"tools::hdf5::store::~store : not same entries on all columns. Write 0." << std::endl;
110 if(!write_scalar<tools::uint64>(
m_group,s_entries(),_entries)) {
111 m_out <<
"tools::hdf5::store::~store : write_scalar(entries) failed." << std::endl;
114 m_out <<
"tools::hdf5::store::~store : write_scalar(columns) failed." << std::endl;
116 {std::vector<std::string> names;
121 m_out <<
"tools::hdf5::store::~store : write_array_string(names) failed." << std::endl;
123 {std::vector<std::string> TFORMs;
128 m_out <<
"tools::hdf5::store::~store : write_array_string(tforms) failed." << std::endl;
138 tools::mem::decrement(s_class().c_str());
149 tools::mem::increment(s_class().c_str());
158 if(
m_pagess.empty()) {a_entries = 0;
return true;}
159 a_entries =
m_pagess.front()->entries();
161 if((*it)->entries()!=a_entries) {
162 m_out <<
"tools::hdf5::store::entries : not same entries on all columns."
163 <<
" Front " << a_entries <<
", it " << (*it)->entries() <<
"." << std::endl;
175 m_out <<
"tools::hdf5::store::create_column : can't create pages." << std::endl;