diff --git a/src/nwb/NWBFile.cpp b/src/nwb/NWBFile.cpp index 0c59ba37..1d76c253 100644 --- a/src/nwb/NWBFile.cpp +++ b/src/nwb/NWBFile.cpp @@ -122,9 +122,8 @@ Status NWBFile::createElectricalSeries( elecGroup.initialize(); // Setup electrical series datasets - auto electricalSeries = std::make_unique( - electricalSeriesPath, - io); + auto electricalSeries = + std::make_unique(electricalSeriesPath, io); electricalSeries->initialize( dataType, channelVector, diff --git a/src/nwb/base/TimeSeries.cpp b/src/nwb/base/TimeSeries.cpp index bc2668f6..a207ac32 100644 --- a/src/nwb/base/TimeSeries.cpp +++ b/src/nwb/base/TimeSeries.cpp @@ -5,8 +5,7 @@ using namespace AQNWB::NWB; // TimeSeries /** Constructor */ -TimeSeries::TimeSeries(const std::string& path, - std::shared_ptr io) +TimeSeries::TimeSeries(const std::string& path, std::shared_ptr io) : Container(path, io) { } diff --git a/src/nwb/base/TimeSeries.hpp b/src/nwb/base/TimeSeries.hpp index 71fafeda..704f8556 100644 --- a/src/nwb/base/TimeSeries.hpp +++ b/src/nwb/base/TimeSeries.hpp @@ -18,8 +18,7 @@ class TimeSeries : public Container * @param path The location of the TimeSeries in the file. * @param io A shared pointer to the IO object. */ - TimeSeries(const std::string& path, - std::shared_ptr io); + TimeSeries(const std::string& path, std::shared_ptr io); /** * @brief Destructor diff --git a/src/nwb/device/Device.cpp b/src/nwb/device/Device.cpp index 21bd4e50..6d802eac 100644 --- a/src/nwb/device/Device.cpp +++ b/src/nwb/device/Device.cpp @@ -4,8 +4,7 @@ using namespace AQNWB::NWB; // Device /** Constructor */ -Device::Device(const std::string& path, - std::shared_ptr io) +Device::Device(const std::string& path, std::shared_ptr io) : Container(path, io) { } diff --git a/src/nwb/device/Device.hpp b/src/nwb/device/Device.hpp index 83e0cb2a..51ace8dd 100644 --- a/src/nwb/device/Device.hpp +++ b/src/nwb/device/Device.hpp @@ -19,8 +19,7 @@ class Device : public Container * @param path The location of the device in the file. * @param io A shared pointer to the IO object. */ - Device(const std::string& path, - std::shared_ptr io); + Device(const std::string& path, std::shared_ptr io); /** * @brief Destructor @@ -48,6 +47,5 @@ class Device : public Container * @return The description of the device. */ std::string getDescription() const; - }; } // namespace AQNWB::NWB diff --git a/src/nwb/ecephys/ElectricalSeries.cpp b/src/nwb/ecephys/ElectricalSeries.cpp index e561676b..9a03a687 100644 --- a/src/nwb/ecephys/ElectricalSeries.cpp +++ b/src/nwb/ecephys/ElectricalSeries.cpp @@ -10,8 +10,7 @@ using namespace AQNWB::NWB; /** Constructor */ ElectricalSeries::ElectricalSeries(const std::string& path, std::shared_ptr io) - : TimeSeries(path, - io) + : TimeSeries(path, io) { } @@ -20,23 +19,23 @@ ElectricalSeries::~ElectricalSeries() {} /** Initialization function*/ void ElectricalSeries::initialize(const BaseDataType& dataType, - const Types::ChannelVector& channelVector, - const std::string& description, - const SizeArray& dsetSize, - const SizeArray& chunkSize, - const float& conversion, - const float& resolution, - const float& offset) + const Types::ChannelVector& channelVector, + const std::string& description, + const SizeArray& dsetSize, + const SizeArray& chunkSize, + const float& conversion, + const float& resolution, + const float& offset) { TimeSeries::initialize(dataType, - "volts", - description, - channelVector[0].comments, - dsetSize, - chunkSize, - channelVector[0].getConversion(), - resolution, - offset); + "volts", + description, + channelVector[0].comments, + dsetSize, + chunkSize, + channelVector[0].getConversion(), + resolution, + offset); // setup variables based on number of channels std::vector electrodeInds(channelVector.size()); diff --git a/src/nwb/ecephys/ElectricalSeries.hpp b/src/nwb/ecephys/ElectricalSeries.hpp index a438dbb6..8c6c9507 100644 --- a/src/nwb/ecephys/ElectricalSeries.hpp +++ b/src/nwb/ecephys/ElectricalSeries.hpp @@ -19,8 +19,7 @@ class ElectricalSeries : public TimeSeries * @param path The location of the ElectricalSeries in the file. * @param io A shared pointer to the IO object. */ - ElectricalSeries(const std::string& path, - std::shared_ptr io); + ElectricalSeries(const std::string& path, std::shared_ptr io); /** * @brief Destructor diff --git a/src/nwb/file/ElectrodeTable.cpp b/src/nwb/file/ElectrodeTable.cpp index 3b1b5a66..c3621ec3 100644 --- a/src/nwb/file/ElectrodeTable.cpp +++ b/src/nwb/file/ElectrodeTable.cpp @@ -15,10 +15,10 @@ ElectrodeTable::ElectrodeTable(std::shared_ptr io) ElectrodeTable::ElectrodeTable(const std::string& path, std::shared_ptr io) - : DynamicTable(electrodeTablePath, // use the electrodeTablePath + : DynamicTable(electrodeTablePath, // use the electrodeTablePath io) { - assert(path == electrodeTablePath); + assert(path == electrodeTablePath); } /** Destructor */ diff --git a/src/nwb/file/ElectrodeTable.hpp b/src/nwb/file/ElectrodeTable.hpp index 5693db43..da8b6ad4 100644 --- a/src/nwb/file/ElectrodeTable.hpp +++ b/src/nwb/file/ElectrodeTable.hpp @@ -37,7 +37,8 @@ class ElectrodeTable : public DynamicTable * Initializes the ElectrodeTable by creating NWB related attributes and * adding required columns. */ - void initialize(const std::string& description = "metadata about extracellular electrodes"); + void initialize(const std::string& description = + "metadata about extracellular electrodes"); /** * @brief Finalizes the ElectrodeTable. diff --git a/src/nwb/hdmf/base/Container.hpp b/src/nwb/hdmf/base/Container.hpp index 41b09fa9..7133d5b5 100644 --- a/src/nwb/hdmf/base/Container.hpp +++ b/src/nwb/hdmf/base/Container.hpp @@ -37,11 +37,12 @@ class Container */ std::string getPath() const; - template + template static std::unique_ptr create(const BaseIO& io, const std::string& path) { - static_assert(std::is_base_of::value, "T must be a derived class of Container"); - return std::unique_ptr(new T(path, io)); + static_assert(std::is_base_of::value, + "T must be a derived class of Container"); + return std::unique_ptr(new T(path, io)); } protected: diff --git a/src/nwb/hdmf/base/Data.hpp b/src/nwb/hdmf/base/Data.hpp index 656fbcab..949767e7 100644 --- a/src/nwb/hdmf/base/Data.hpp +++ b/src/nwb/hdmf/base/Data.hpp @@ -25,6 +25,8 @@ class Data /** * @brief Pointer to dataset. */ - std::unique_ptr dataset; // TODO For read we may not want this here if we ned Data for reads + std::unique_ptr + dataset; // TODO For read we may not want this here if we ned Data for + // reads }; } // namespace AQNWB::NWB diff --git a/src/nwb/hdmf/table/DynamicTable.cpp b/src/nwb/hdmf/table/DynamicTable.cpp index 28d517e7..44716f46 100644 --- a/src/nwb/hdmf/table/DynamicTable.cpp +++ b/src/nwb/hdmf/table/DynamicTable.cpp @@ -5,8 +5,7 @@ using namespace AQNWB::NWB; // DynamicTable /** Constructor */ -DynamicTable::DynamicTable(const std::string& path, - std::shared_ptr io) +DynamicTable::DynamicTable(const std::string& path, std::shared_ptr io) : Container(path, io) , description(description) { diff --git a/src/nwb/hdmf/table/DynamicTable.hpp b/src/nwb/hdmf/table/DynamicTable.hpp index 4a864aa5..064cac56 100644 --- a/src/nwb/hdmf/table/DynamicTable.hpp +++ b/src/nwb/hdmf/table/DynamicTable.hpp @@ -24,8 +24,7 @@ class DynamicTable : public Container * @param path The location of the table in the file. * @param io A shared pointer to the IO object. */ - DynamicTable(const std::string& path, - std::shared_ptr io); + DynamicTable(const std::string& path, std::shared_ptr io); /** * @brief Destructor diff --git a/tests/testBase.cpp b/tests/testBase.cpp index cb44db62..0d30f5fe 100644 --- a/tests/testBase.cpp +++ b/tests/testBase.cpp @@ -17,7 +17,8 @@ TEST_CASE("TimeSeries", "[base]") std::vector dataShape = {numSamples}; std::vector positionOffset = {0}; BaseDataType dataType = BaseDataType::F32; - std::vector data = {0,1,2,3,4,5,6,7,8,9}; // getMockData1D(numSamples); + std::vector data = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; // getMockData1D(numSamples); BaseDataType timestampsType = BaseDataType::F64; std::vector timestamps = getMockTimestamps(numSamples, 1); diff --git a/tests/testEcephys.cpp b/tests/testEcephys.cpp index e830c474..2725e047 100644 --- a/tests/testEcephys.cpp +++ b/tests/testEcephys.cpp @@ -56,9 +56,7 @@ TEST_CASE("ElectricalSeries", "[ecephys]") elecTable.initialize(); // setup electrical series - NWB::ElectricalSeries es = - NWB::ElectricalSeries(dataPath, - io); + NWB::ElectricalSeries es = NWB::ElectricalSeries(dataPath, io); es.initialize(dataType, mockArrays[0], "no description", @@ -110,9 +108,7 @@ TEST_CASE("ElectricalSeries", "[ecephys]") elecTable.initialize(); // setup electrical series - NWB::ElectricalSeries es = - NWB::ElectricalSeries(dataPath, - io); + NWB::ElectricalSeries es = NWB::ElectricalSeries(dataPath, io); es.initialize(dataType, mockArrays[0], "no description",