Skip to content

Commit 59a9f51

Browse files
committed
Merge branch 'testing' into development
2 parents a441f80 + a1691ec commit 59a9f51

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

Source/Plugins/KWIKFormat/FileSource/KwikFileSource.cpp

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,22 @@ void KWIKFileSource::fillRecordInfo()
117117
try
118118
{
119119
recordN = recordings.openGroup((String(i) + "/application_data").toUTF8());
120-
attr=recordN.openAttribute("channel_bit_volts");
121-
attr.read(ArrayType(PredType::NATIVE_FLOAT,1,&dims[1]),bitVoltArray);
122-
foundBitVoltArray = true;
120+
try
121+
{
122+
DataSet bV = recordN.openDataSet("channel_bit_volts");
123+
bV.read(bitVoltArray.getData(), PredType::NATIVE_FLOAT);
124+
foundBitVoltArray = true;
125+
}
126+
catch (GroupIException)
127+
{ }
128+
catch (DataSetIException)
129+
{ }
130+
if (!foundBitVoltArray)
131+
{
132+
attr = recordN.openAttribute("channel_bit_volts");
133+
attr.read(ArrayType(PredType::NATIVE_FLOAT, 1, &dims[1]), bitVoltArray);
134+
foundBitVoltArray = true;
135+
}
123136
} catch (GroupIException)
124137
{
125138
} catch (AttributeIException)

0 commit comments

Comments
 (0)