From 28d2c7f60d9e65a3b7455f631d47534514053c58 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:24:10 -0700 Subject: [PATCH] add nested hdf5 and schema namespaces --- CMakeLists.txt | 16 +++++----- src/NWBFile.cpp | 29 ++++++++++--------- src/NWBFile.hpp | 4 +-- src/Types.hpp | 4 +-- src/Utils.hpp | 4 +-- src/io/BaseIO.cpp | 2 +- src/io/BaseIO.hpp | 10 +++---- src/io/HDF5IO.cpp | 12 ++++---- src/io/HDF5IO.hpp | 4 +-- src/{ => schema}/hdmf/base/Container.cpp | 4 +-- src/{ => schema}/hdmf/base/Container.hpp | 4 +-- src/{ => schema}/hdmf/base/Data.hpp | 4 +-- src/{ => schema}/hdmf/table/DynamicTable.cpp | 4 +-- src/{ => schema}/hdmf/table/DynamicTable.hpp | 10 +++---- .../hdmf/table/ElementIdentifiers.hpp | 6 ++-- src/{ => schema}/hdmf/table/VectorData.cpp | 4 +-- src/{ => schema}/hdmf/table/VectorData.hpp | 6 ++-- src/{ => schema/nwb}/device/Device.cpp | 4 +-- src/{ => schema/nwb}/device/Device.hpp | 6 ++-- src/{ => schema/nwb}/file/ElectrodeGroup.cpp | 4 +-- src/{ => schema/nwb}/file/ElectrodeGroup.hpp | 8 ++--- src/{ => schema/nwb}/file/ElectrodeTable.cpp | 4 +-- src/{ => schema/nwb}/file/ElectrodeTable.hpp | 10 +++---- tests/aq-nwb_test.cpp | 28 +++++++++--------- 24 files changed, 96 insertions(+), 95 deletions(-) rename src/{ => schema}/hdmf/base/Container.cpp (82%) rename src/{ => schema}/hdmf/base/Container.hpp (93%) rename src/{ => schema}/hdmf/base/Data.hpp (85%) rename src/{ => schema}/hdmf/table/DynamicTable.cpp (96%) rename src/{ => schema}/hdmf/table/DynamicTable.hpp (93%) rename src/{ => schema}/hdmf/table/ElementIdentifiers.hpp (65%) rename src/{ => schema}/hdmf/table/VectorData.cpp (54%) rename src/{ => schema}/hdmf/table/VectorData.hpp (81%) rename src/{ => schema/nwb}/device/Device.cpp (91%) rename src/{ => schema/nwb}/device/Device.hpp (93%) rename src/{ => schema/nwb}/file/ElectrodeGroup.cpp (93%) rename src/{ => schema/nwb}/file/ElectrodeGroup.hpp (93%) rename src/{ => schema/nwb}/file/ElectrodeTable.cpp (96%) rename src/{ => schema/nwb}/file/ElectrodeTable.hpp (93%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0755a9b..3342f9c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,14 +20,14 @@ add_library( src/Utils.hpp src/io/HDF5IO.cpp src/io/BaseIO.cpp - src/hdmf/base/Data.hpp - src/hdmf/base/Container.cpp - src/hdmf/table/DynamicTable.cpp - src/hdmf/table/ElementIdentifiers.hpp - src/hdmf/table/VectorData.hpp - src/device/Device.cpp - src/file/ElectrodeGroup.cpp - src/file/ElectrodeTable.cpp + src/schema/hdmf/base/Data.hpp + src/schema/hdmf/base/Container.cpp + src/schema/hdmf/table/DynamicTable.cpp + src/schema/hdmf/table/ElementIdentifiers.hpp + src/schema/hdmf/table/VectorData.hpp + src/schema/nwb/device/Device.cpp + src/schema/nwb/file/ElectrodeGroup.cpp + src/schema/nwb/file/ElectrodeTable.cpp ) target_include_directories( diff --git a/src/NWBFile.cpp b/src/NWBFile.cpp index 3f667292..69a5e123 100644 --- a/src/NWBFile.cpp +++ b/src/NWBFile.cpp @@ -9,13 +9,12 @@ #include "NWBFile.hpp" #include "Utils.hpp" -#include "device/Device.hpp" -#include "file/ElectrodeGroup.hpp" -#include "file/ElectrodeTable.hpp" #include "io/BaseIO.hpp" +#include "schema/nwb/device/Device.hpp" +#include "schema/nwb/file/ElectrodeGroup.hpp" +#include "schema/nwb/file/ElectrodeTable.hpp" -using namespace AQNWBIO; -namespace fs = std::filesystem; +using namespace AQNWB; // NWBFile @@ -98,17 +97,19 @@ Status NWBFile::startRecording() std::string devicePath = "general/devices/" + groupName; std::string elecPath = "general/extracellular_ephys/" + groupName; - Device device = Device(devicePath, io, "description", "unknown"); + Schema::Device device = + Schema::Device(devicePath, io, "description", "unknown"); device.initialize(); - ElectrodeGroup elecGroup = - ElectrodeGroup(elecPath, io, "description", "unknown", device); + Schema::ElectrodeGroup elecGroup = + Schema::ElectrodeGroup(elecPath, io, "description", "unknown", device); elecGroup.initialize(); } // Create electrode table std::string electrodePath = "general/extracellular_ephys/electrodes/"; - ElectrodeTable elecTable = ElectrodeTable(electrodePath, io, channels); + Schema::ElectrodeTable elecTable = + Schema::ElectrodeTable(electrodePath, io, channels); elecTable.initialize(); elecTable.electrodeDataset->dataset = createRecordingData( @@ -137,12 +138,14 @@ void NWBFile::cacheSpecifications(const std::string& specPath, io->createGroup("/specifications/" + specPath); io->createGroup("/specifications/" + specPath + versionNumber); - fs::path currentFile = __FILE__; - fs::path schemaDir = currentFile.parent_path().parent_path() + std::filesystem::path currentFile = __FILE__; + std::filesystem::path schemaDir = currentFile.parent_path().parent_path() / "resources/spec" / specPath / versionNumber; - for (auto const& entry : fs::directory_iterator {schemaDir}) - if (fs::is_regular_file(entry) && entry.path().extension() == ".json") { + for (auto const& entry : std::filesystem::directory_iterator {schemaDir}) + if (std::filesystem::is_regular_file(entry) + && entry.path().extension() == ".json") + { std::string specName = entry.path().filename().replace_extension("").string(); if (specName.find("namespace") != std::string::npos) diff --git a/src/NWBFile.hpp b/src/NWBFile.hpp index 978fa0aa..08969090 100644 --- a/src/NWBFile.hpp +++ b/src/NWBFile.hpp @@ -4,7 +4,7 @@ #include "io/BaseIO.hpp" -namespace AQNWBIO +namespace AQNWB { /** * @brief The NWBFile class provides an interface for setting up and managing @@ -168,4 +168,4 @@ class NWBRecordingEngine */ std::vector smpBuffer; }; -} // namespace AQNWBIO +} // namespace AQNWB diff --git a/src/Types.hpp b/src/Types.hpp index 17e699cc..0a346a7d 100644 --- a/src/Types.hpp +++ b/src/Types.hpp @@ -2,7 +2,7 @@ #include -namespace AQNWBIO +namespace AQNWB { /** * @brief Provides definitions for various types used in the project. @@ -29,4 +29,4 @@ class Types */ using SizeArray = std::vector; }; -} // namespace AQNWBIO +} // namespace AQNWB diff --git a/src/Utils.hpp b/src/Utils.hpp index 065ec026..039596c6 100644 --- a/src/Utils.hpp +++ b/src/Utils.hpp @@ -7,7 +7,7 @@ #include #include -namespace AQNWBIO +namespace AQNWB { /** * @brief Generates a UUID (Universally Unique Identifier) as a string. @@ -40,4 +40,4 @@ inline std::string getCurrentTime() return oss.str(); } -} // namespace AQNWBIO +} // namespace AQNWB diff --git a/src/io/BaseIO.cpp b/src/io/BaseIO.cpp index a8e4af10..f8c114b8 100644 --- a/src/io/BaseIO.cpp +++ b/src/io/BaseIO.cpp @@ -2,7 +2,7 @@ #include "Utils.hpp" -using namespace AQNWBIO; +using namespace AQNWB; // BaseDataType diff --git a/src/io/BaseIO.hpp b/src/io/BaseIO.hpp index c85c3673..cf867d18 100644 --- a/src/io/BaseIO.hpp +++ b/src/io/BaseIO.hpp @@ -10,11 +10,11 @@ #define DEFAULT_STR_SIZE 256 #define DEFAULT_ARRAY_SIZE 1 -using Status = AQNWBIO::Types::Status; -using SizeArray = AQNWBIO::Types::SizeArray; -using SizeType = AQNWBIO::Types::SizeType; +using Status = AQNWB::Types::Status; +using SizeArray = AQNWB::Types::SizeArray; +using SizeType = AQNWB::Types::SizeType; -namespace AQNWBIO +namespace AQNWB { class BaseRecordingData; @@ -372,4 +372,4 @@ class BaseRecordingData std::vector rowXPos; }; -} // namespace AQNWBIO +} // namespace AQNWB diff --git a/src/io/HDF5IO.cpp b/src/io/HDF5IO.cpp index 641b831a..3d098a32 100644 --- a/src/io/HDF5IO.cpp +++ b/src/io/HDF5IO.cpp @@ -11,7 +11,7 @@ #include "Utils.hpp" using namespace H5; -using namespace AQNWBIO; +using namespace AQNWB::HDF5; // HDF5IO @@ -342,7 +342,7 @@ Status HDF5IO::createStringDataSet(const std::string& path, return Status::Success; } -BaseRecordingData* HDF5IO::getDataSet(const std::string& path) +AQNWB::BaseRecordingData* HDF5IO::getDataSet(const std::string& path) { std::unique_ptr data; @@ -364,10 +364,10 @@ BaseRecordingData* HDF5IO::getDataSet(const std::string& path) } } -BaseRecordingData* HDF5IO::createDataSet(const BaseDataType& type, - const SizeArray& size, - const SizeArray& chunking, - const std::string& path) +AQNWB::BaseRecordingData* HDF5IO::createDataSet(const BaseDataType& type, + const SizeArray& size, + const SizeArray& chunking, + const std::string& path) { std::unique_ptr data; DSetCreatPropList prop; diff --git a/src/io/HDF5IO.hpp b/src/io/HDF5IO.hpp index cc0c5d8b..8dbe926d 100644 --- a/src/io/HDF5IO.hpp +++ b/src/io/HDF5IO.hpp @@ -14,7 +14,7 @@ class DataType; class Exception; } // namespace H5 -namespace AQNWBIO +namespace AQNWB::HDF5 { class HDF5RecordingData; // declare here because gets used in HDF5IO class @@ -275,4 +275,4 @@ class HDF5RecordingData : public BaseRecordingData */ Status checkStatus(int status); }; -} // namespace AQNWBIO +} // namespace AQNWB::HDF5 diff --git a/src/hdmf/base/Container.cpp b/src/schema/hdmf/base/Container.cpp similarity index 82% rename from src/hdmf/base/Container.cpp rename to src/schema/hdmf/base/Container.cpp index f687122f..9980ee9a 100644 --- a/src/hdmf/base/Container.cpp +++ b/src/schema/hdmf/base/Container.cpp @@ -1,6 +1,6 @@ -#include "Container.hpp" +#include "schema/hdmf/base/Container.hpp" -using namespace AQNWBIO; +using namespace AQNWB::Schema; // Container diff --git a/src/hdmf/base/Container.hpp b/src/schema/hdmf/base/Container.hpp similarity index 93% rename from src/hdmf/base/Container.hpp rename to src/schema/hdmf/base/Container.hpp index 1441a2a9..c6716f8b 100644 --- a/src/hdmf/base/Container.hpp +++ b/src/schema/hdmf/base/Container.hpp @@ -5,7 +5,7 @@ #include "io/BaseIO.hpp" -namespace AQNWBIO +namespace AQNWB::Schema { /** * @brief Abstract data type for a group storing collections of data and @@ -48,4 +48,4 @@ class Container */ std::shared_ptr io; }; -} // namespace AQNWBIO +} // namespace AQNWB::Schema diff --git a/src/hdmf/base/Data.hpp b/src/schema/hdmf/base/Data.hpp similarity index 85% rename from src/hdmf/base/Data.hpp rename to src/schema/hdmf/base/Data.hpp index 3d2a4817..e5ba635d 100644 --- a/src/hdmf/base/Data.hpp +++ b/src/schema/hdmf/base/Data.hpp @@ -4,7 +4,7 @@ #include "io/BaseIO.hpp" -namespace AQNWBIO +namespace AQNWB::Schema { /** * @brief An abstract data type for a dataset. @@ -27,4 +27,4 @@ class Data */ std::unique_ptr dataset; }; -} // namespace AQNWBIO +} // namespace AQNWB::Schema diff --git a/src/hdmf/table/DynamicTable.cpp b/src/schema/hdmf/table/DynamicTable.cpp similarity index 96% rename from src/hdmf/table/DynamicTable.cpp rename to src/schema/hdmf/table/DynamicTable.cpp index 1259510e..4f896c13 100644 --- a/src/hdmf/table/DynamicTable.cpp +++ b/src/schema/hdmf/table/DynamicTable.cpp @@ -1,6 +1,6 @@ -#include "DynamicTable.hpp" +#include "schema/hdmf/table/DynamicTable.hpp" -using namespace AQNWBIO; +using namespace AQNWB::Schema; // DynamicTable diff --git a/src/hdmf/table/DynamicTable.hpp b/src/schema/hdmf/table/DynamicTable.hpp similarity index 93% rename from src/hdmf/table/DynamicTable.hpp rename to src/schema/hdmf/table/DynamicTable.hpp index f8c759f6..bdbde58a 100644 --- a/src/hdmf/table/DynamicTable.hpp +++ b/src/schema/hdmf/table/DynamicTable.hpp @@ -2,12 +2,12 @@ #include -#include "hdmf/base/Container.hpp" -#include "hdmf/table/ElementIdentifiers.hpp" -#include "hdmf/table/VectorData.hpp" #include "io/BaseIO.hpp" +#include "schema/hdmf/base/Container.hpp" +#include "schema/hdmf/table/ElementIdentifiers.hpp" +#include "schema/hdmf/table/VectorData.hpp" -namespace AQNWBIO +namespace AQNWB::Schema { /** * @brief Represents a group containing multiple datasets that are aligned on @@ -94,4 +94,4 @@ class DynamicTable : public Container */ std::vector colNames; }; -} // namespace AQNWBIO +} // namespace AQNWB::Schema diff --git a/src/hdmf/table/ElementIdentifiers.hpp b/src/schema/hdmf/table/ElementIdentifiers.hpp similarity index 65% rename from src/hdmf/table/ElementIdentifiers.hpp rename to src/schema/hdmf/table/ElementIdentifiers.hpp index fbb0998d..f51b8452 100644 --- a/src/hdmf/table/ElementIdentifiers.hpp +++ b/src/schema/hdmf/table/ElementIdentifiers.hpp @@ -1,8 +1,8 @@ #pragma once -#include "hdmf/base/Data.hpp" +#include "schema/hdmf/base/Data.hpp" -namespace AQNWBIO +namespace AQNWB::Schema { /** * @brief A list of unique identifiers for values within a dataset, e.g. rows of @@ -11,4 +11,4 @@ namespace AQNWBIO class ElementIdentifiers : public Data { }; -} // namespace AQNWBIO +} // namespace AQNWB::Schema diff --git a/src/hdmf/table/VectorData.cpp b/src/schema/hdmf/table/VectorData.cpp similarity index 54% rename from src/hdmf/table/VectorData.cpp rename to src/schema/hdmf/table/VectorData.cpp index 1600cdf5..7b91e002 100644 --- a/src/hdmf/table/VectorData.cpp +++ b/src/schema/hdmf/table/VectorData.cpp @@ -1,6 +1,6 @@ -#include "VectorData.hpp" +#include "schema/hdmf/table/VectorData.hpp" -using namespace AQNWBIO; +using namespace AQNWB::Schema; // VectorData std::string VectorData::getDescription() const diff --git a/src/hdmf/table/VectorData.hpp b/src/schema/hdmf/table/VectorData.hpp similarity index 81% rename from src/hdmf/table/VectorData.hpp rename to src/schema/hdmf/table/VectorData.hpp index 45720806..561e3d8e 100644 --- a/src/hdmf/table/VectorData.hpp +++ b/src/schema/hdmf/table/VectorData.hpp @@ -2,9 +2,9 @@ #include -#include "hdmf/base/Data.hpp" +#include "schema/hdmf/base/Data.hpp" -namespace AQNWBIO +namespace AQNWB::Schema { /** * @brief An n-dimensional dataset representing a column of a DynamicTable. @@ -24,4 +24,4 @@ class VectorData : public Data */ std::string description; }; -} // namespace AQNWBIO +} // namespace AQNWB::Schema diff --git a/src/device/Device.cpp b/src/schema/nwb/device/Device.cpp similarity index 91% rename from src/device/Device.cpp rename to src/schema/nwb/device/Device.cpp index 24f5afeb..1436062e 100644 --- a/src/device/Device.cpp +++ b/src/schema/nwb/device/Device.cpp @@ -1,6 +1,6 @@ -#include "Device.hpp" +#include "schema/nwb/device/Device.hpp" -using namespace AQNWBIO; +using namespace AQNWB::Schema; // Device /** Constructor */ diff --git a/src/device/Device.hpp b/src/schema/nwb/device/Device.hpp similarity index 93% rename from src/device/Device.hpp rename to src/schema/nwb/device/Device.hpp index d8b7f190..d6a20be7 100644 --- a/src/device/Device.hpp +++ b/src/schema/nwb/device/Device.hpp @@ -2,10 +2,10 @@ #include -#include "hdmf/base/Container.hpp" #include "io/BaseIO.hpp" +#include "schema/hdmf/base/Container.hpp" -namespace AQNWBIO +namespace AQNWB::Schema { /** * @brief Metadata about a data acquisition device, e.g., recording system, @@ -60,4 +60,4 @@ class Device : public Container */ std::string manufacturer; }; -} // namespace AQNWBIO +} // namespace AQNWB::Schema diff --git a/src/file/ElectrodeGroup.cpp b/src/schema/nwb/file/ElectrodeGroup.cpp similarity index 93% rename from src/file/ElectrodeGroup.cpp rename to src/schema/nwb/file/ElectrodeGroup.cpp index fa1f6fa0..c095e542 100644 --- a/src/file/ElectrodeGroup.cpp +++ b/src/schema/nwb/file/ElectrodeGroup.cpp @@ -1,6 +1,6 @@ -#include "ElectrodeGroup.hpp" +#include "schema/nwb/file/ElectrodeGroup.hpp" -using namespace AQNWBIO; +using namespace AQNWB::Schema; // ElectrodeGroup diff --git a/src/file/ElectrodeGroup.hpp b/src/schema/nwb/file/ElectrodeGroup.hpp similarity index 93% rename from src/file/ElectrodeGroup.hpp rename to src/schema/nwb/file/ElectrodeGroup.hpp index 60441ad9..0a1cf21f 100644 --- a/src/file/ElectrodeGroup.hpp +++ b/src/schema/nwb/file/ElectrodeGroup.hpp @@ -2,11 +2,11 @@ #include -#include "device/Device.hpp" -#include "hdmf/base/Container.hpp" #include "io/BaseIO.hpp" +#include "schema/hdmf/base/Container.hpp" +#include "schema/nwb/device/Device.hpp" -namespace AQNWBIO +namespace AQNWB::Schema { /** * @brief The ElectrodeGroup class represents a physical grouping of electrodes, @@ -78,4 +78,4 @@ class ElectrodeGroup : public Container */ Device device; }; -} // namespace AQNWBIO +} // namespace AQNWB::Schema diff --git a/src/file/ElectrodeTable.cpp b/src/schema/nwb/file/ElectrodeTable.cpp similarity index 96% rename from src/file/ElectrodeTable.cpp rename to src/schema/nwb/file/ElectrodeTable.cpp index 721573df..3723e522 100644 --- a/src/file/ElectrodeTable.cpp +++ b/src/schema/nwb/file/ElectrodeTable.cpp @@ -1,6 +1,6 @@ -#include "ElectrodeTable.hpp" +#include "schema/nwb/file/ElectrodeTable.hpp" -using namespace AQNWBIO; +using namespace AQNWB::Schema; // ElectrodeTable diff --git a/src/file/ElectrodeTable.hpp b/src/schema/nwb/file/ElectrodeTable.hpp similarity index 93% rename from src/file/ElectrodeTable.hpp rename to src/schema/nwb/file/ElectrodeTable.hpp index 4732b6a5..7fd5d7dc 100644 --- a/src/file/ElectrodeTable.hpp +++ b/src/schema/nwb/file/ElectrodeTable.hpp @@ -2,12 +2,12 @@ #include -#include "hdmf/table/DynamicTable.hpp" -#include "hdmf/table/ElementIdentifiers.hpp" -#include "hdmf/table/VectorData.hpp" #include "io/BaseIO.hpp" +#include "schema/hdmf/table/DynamicTable.hpp" +#include "schema/hdmf/table/ElementIdentifiers.hpp" +#include "schema/hdmf/table/VectorData.hpp" -namespace AQNWBIO +namespace AQNWB::Schema { /** * @brief Represents a table containing electrode metadata. @@ -115,4 +115,4 @@ class ElectrodeTable : public DynamicTable */ std::string groupPath = "/general/extracellular_ephys/array1"; }; -} // namespace AQNWBIO +} // namespace AQNWB::Schema diff --git a/tests/aq-nwb_test.cpp b/tests/aq-nwb_test.cpp index 150e8312..010e0a3a 100644 --- a/tests/aq-nwb_test.cpp +++ b/tests/aq-nwb_test.cpp @@ -4,12 +4,11 @@ #include #include "NWBFile.hpp" -#include "file/ElectrodeTable.hpp" #include "io/BaseIO.hpp" #include "io/HDF5IO.hpp" +#include "schema/nwb/file/ElectrodeTable.hpp" -using namespace AQNWBIO; - +using namespace AQNWB; namespace fs = std::filesystem; std::string getTestFilePath(std::string filename) @@ -34,7 +33,7 @@ TEST_CASE("writeAttributes", "[hdf5io]") { // create and open file std::string filename = getTestFilePath("test_attributes.h5"); - HDF5IO hdf5io(filename); + HDF5::HDF5IO hdf5io(filename); hdf5io.open(); hdf5io.createGroup("/data"); @@ -43,8 +42,7 @@ TEST_CASE("writeAttributes", "[hdf5io]") SECTION("single_value") { const signed int data = 1; - hdf5io.createAttribute( - AQNWBIO::BaseDataType::I32, &data, "/data", "single_value"); + hdf5io.createAttribute(BaseDataType::I32, &data, "/data", "single_value"); } // integer array @@ -54,7 +52,7 @@ TEST_CASE("writeAttributes", "[hdf5io]") const int dataSize = sizeof(data) / sizeof(data[0]); hdf5io.createAttribute( - AQNWBIO::BaseDataType::I32, &data, "/data", "array", dataSize); + BaseDataType::I32, &data, "/data", "array", dataSize); } // string array @@ -80,7 +78,7 @@ TEST_CASE("saveNWBFile", "[nwb]") { std::string filename = getTestFilePath("test_nwb_file.h5"); - NWBFile nwbfile("123", std::make_unique(filename)); + NWBFile nwbfile("123", std::make_unique(filename)); nwbfile.initialize(); nwbfile.finalize(); } @@ -89,7 +87,7 @@ TEST_CASE("startRecording", "[nwb]") { std::string filename = getTestFilePath("test_recording.h5"); - NWBFile nwbfile("123", std::make_unique(filename)); + NWBFile nwbfile("123", std::make_unique(filename)); nwbfile.initialize(); Status result = nwbfile.startRecording(); nwbfile.finalize(); @@ -104,10 +102,10 @@ TEST_CASE("ElectrodeTable", "[datatypes]") { std::string filename = getTestFilePath("electrodeTable.h5"); std::vector channels = {1, 2, 3}; - std::shared_ptr io = std::make_unique(filename); + std::shared_ptr io = std::make_unique(filename); io->open(); io->createGroup("array1"); - ElectrodeTable electrodeTable(path, io, channels); + Schema::ElectrodeTable electrodeTable(path, io, channels); electrodeTable.initialize(); electrodeTable.setGroupPath("array1"); electrodeTable.electrodeDataset->dataset = @@ -126,8 +124,8 @@ TEST_CASE("ElectrodeTable", "[datatypes]") size_t numChannels = 3; BaseRecordingData* id_data = io->getDataSet(path + "id"); int* buffer = new int[numChannels]; - static_cast(id_data)->readDataBlock(BaseDataType::I32, - buffer); + static_cast(id_data)->readDataBlock( + BaseDataType::I32, buffer); std::vector read_channels(buffer, buffer + numChannels); delete[] buffer; REQUIRE(channels == read_channels); @@ -136,9 +134,9 @@ TEST_CASE("ElectrodeTable", "[datatypes]") SECTION("initialize without empty channels") { std::string filename = getTestFilePath("electrodeTableNoData.h5"); - std::shared_ptr io = std::make_unique(filename); + std::shared_ptr io = std::make_unique(filename); io->open(); - ElectrodeTable electrodeTable(path, io, std::vector(), "none"); + Schema::ElectrodeTable electrodeTable(path, io, std::vector(), "none"); electrodeTable.initialize(); } }