Skip to content

Commit

Permalink
do not save description and dataCollection on nwbfile
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Sep 6, 2024
1 parent 6a913bb commit cb6257e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/nwb/NWBFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/nwb/NWBFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
/**
Expand Down Expand Up @@ -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

0 comments on commit cb6257e

Please sign in to comment.