Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Add GenericLoader to load events from file. #81

Merged
merged 1 commit into from Feb 1, 2017

Conversation

chevtche
Copy link
Contributor

@chevtche chevtche commented Feb 1, 2017

Added read and write methods in the EventSource, to
save/load events to/from binary or ASCII files.

Use "fivox://" for the GenericLoader ("fivoxcompartments://"
for the CompartmentLoader)

Replace TestLoader with new GenericLoader, behaving the same way
as previously when no events file is specified.

@@ -58,6 +58,7 @@ std::istream& operator >> ( std::istream& is, Vector2ui& vec )

namespace
{
typedef fivox::FloatVolume::Pointer VolumePtr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed?

@@ -328,7 +328,8 @@ class ComputeVSD : public CommandLineApplication

file << "VSDPositionFile=" << _outputFile + ".psp" << std::endl;
file << "VSDIntensityFile=" << filename + ".psi" << std::endl;
file << "TimeStep=" << _eventSource->getDt() << std::endl;
file << "TimeStep=" << _eventSource->getCurrentTime() << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really?

doc/Changelog.md Outdated
@@ -3,6 +3,9 @@ Changelog {#changelog}

# git master {#master}

* [#!!](https://github.com/BlueBrain/Fivox/pull/!!)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

81

@@ -90,6 +109,65 @@ class EventSource::Impl
events.reset((float*) ptr );
}

bool isBinary( const lunchbox::MemoryMap& binaryFile )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const function

if( _impl->isBinary( binaryFile ))
return _impl->readBinary( binaryFile, filename );

std::string line;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to _impl->readAscii()

{
return Vector2f( 0.f, 100.f );
}

ssize_t TestLoader::_load( const size_t /*chunkIndex*/,
ssize_t GenericLoader::_load( const size_t /*chunkIndex*/,
const size_t /*numChunks*/ )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

@chevtche chevtche force-pushed the master branch 2 times, most recently from 97f4200 to 3071ab5 Compare February 1, 2017 16:36
Added read and write methods in the EventSource, to
save/load events to/from binary or ASCII files.

Use "fivox://" for the GenericLoader ("fivoxcompartments://"
for the CompartmentLoader)

Replace TestLoader with new GenericLoader, behaving the same way
as previously when no events file is specified.
@tribal-tec tribal-tec merged commit 8f5d157 into BlueBrain:master Feb 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants