From 53aa1cd525404622949dff5542baf59c086ad00e Mon Sep 17 00:00:00 2001 From: Aaron Cuevas Lopez <aacuelo@teleco.upv.es> Date: Thu, 19 Jan 2017 07:12:06 +0100 Subject: [PATCH] Lock event metadata when copying event channels --- Source/Processors/Channel/MetaData.h | 2 +- Source/Processors/GenericProcessor/GenericProcessor.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Processors/Channel/MetaData.h b/Source/Processors/Channel/MetaData.h index c1e6092b5..b3677b5ce 100644 --- a/Source/Processors/Channel/MetaData.h +++ b/Source/Processors/Channel/MetaData.h @@ -196,7 +196,7 @@ protected: }; //Special class for event and spike info objects, whose events can hold extra metadata -class PLUGIN_API MetaDataEventObject : private MetaDataEventLock +class PLUGIN_API MetaDataEventObject : public MetaDataEventLock { public: //This method will only work when creating the info object, but not for those copied down the chain diff --git a/Source/Processors/GenericProcessor/GenericProcessor.cpp b/Source/Processors/GenericProcessor/GenericProcessor.cpp index abc131ddf..ee6569ef9 100755 --- a/Source/Processors/GenericProcessor/GenericProcessor.cpp +++ b/Source/Processors/GenericProcessor/GenericProcessor.cpp @@ -320,7 +320,7 @@ void GenericProcessor::update() { DataChannel* sourceChan = sourceNode->dataChannelArray[i]; DataChannel* ch = new DataChannel (*sourceChan); - + if (i < m_recordStatus.size()) { @@ -336,12 +336,14 @@ void GenericProcessor::update() { EventChannel* sourceChan = sourceNode->eventChannelArray[i]; EventChannel* ch = new EventChannel (*sourceChan); + ch->eventMetaDataLock = true; eventChannelArray.add (ch); } for (int i = 0; i < sourceNode->spikeChannelArray.size(); ++i) { SpikeChannel* sourceChan = sourceNode->spikeChannelArray[i]; SpikeChannel* ch = new SpikeChannel(*sourceChan); + ch->eventMetaDataLock = true; spikeChannelArray.add(ch); } for (int i = 0; i < sourceNode->configurationObjectArray.size(); ++i) -- GitLab