mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-30 23:52:22 +02:00
Add possibility of having an empty root
This commit is contained in:
+5
-1
@@ -280,7 +280,11 @@ void H5FormatUtils::write_attribute(H5::H5Object& target, const h5_attr& attribu
|
||||
|
||||
void H5FormatUtils::write_format_data(H5::Group& file_node, const h5_parent& format_node, const std::map<std::string, h5_value>& values)
|
||||
{
|
||||
auto node_group = H5FormatUtils::create_group(file_node, format_node.name);
|
||||
H5::Group node_group = file_node;
|
||||
|
||||
if (format_node.node_type == GROUP) {
|
||||
node_group = H5FormatUtils::create_group(file_node, format_node.name);
|
||||
}
|
||||
|
||||
for (const auto item_ptr : format_node.items) {
|
||||
const h5_base& item = *item_ptr;
|
||||
|
||||
+2
-1
@@ -13,6 +13,7 @@ typedef boost::any h5_value;
|
||||
|
||||
enum NODE_TYPE
|
||||
{
|
||||
EMPTY_ROOT,
|
||||
ATTRIBUTE,
|
||||
DATASET,
|
||||
GROUP
|
||||
@@ -63,7 +64,7 @@ struct h5_parent: public h5_base
|
||||
|
||||
struct h5_group : public h5_parent
|
||||
{
|
||||
h5_group(const std::string& name, const std::list<std::shared_ptr<h5_base>>& items) :
|
||||
h5_group(const std::string& name, const std::list<std::shared_ptr<h5_base>>& items={}) :
|
||||
h5_parent(name, GROUP, items) {};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user