diff --git a/src/nwb/NWBFile.cpp b/src/nwb/NWBFile.cpp index 5ce0ee14..361f298d 100644 --- a/src/nwb/NWBFile.cpp +++ b/src/nwb/NWBFile.cpp @@ -38,14 +38,11 @@ NWBFile::~NWBFile() {} Status NWBFile::initialize(const std::string description, const std::string dataCollection) { - this->description = description; - this->dataCollection = dataCollection; - if (std::filesystem::exists(io->getFileName())) { return io->open(false); } else { io->open(true); - return createFileStructure(); + return createFileStructure(description, dataCollection); } } @@ -54,7 +51,8 @@ Status NWBFile::finalize() return io->close(); } -Status NWBFile::createFileStructure() +Status NWBFile::createFileStructure(std::string description, + std::string dataCollection) { if (!io->canModifyObjects()) { return Status::Failure; diff --git a/src/nwb/NWBFile.hpp b/src/nwb/NWBFile.hpp index 2c13cdf8..313c54e2 100644 --- a/src/nwb/NWBFile.hpp +++ b/src/nwb/NWBFile.hpp @@ -89,9 +89,12 @@ class NWBFile * Note, this function will fail if the file is in a mode where * new objects cannot be added, which can be checked via * nwbfile.io->canModifyObjects() + * @param description A description of the NWBFile session. + * @param dataCollection Information about the data collection methods. * @return Status The status of the file structure creation. */ - Status createFileStructure(); + Status createFileStructure(std::string description, + std::string dataCollection); private: /** @@ -127,9 +130,6 @@ class NWBFile const std::string identifierText; std::shared_ptr<BaseIO> io; static std::vector<SizeType> emptyContainerIndexes; - - std::string description; - std::string dataCollection; }; } // namespace AQNWB::NWB \ No newline at end of file