Skip to content

Commit

Permalink
Refs #8570. Add support for multiple vector column type loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Jan 29, 2014
1 parent a1fc162 commit f09b616
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp
Expand Up @@ -574,10 +574,14 @@ API::Workspace_sptr LoadNexusProcessed::loadTableEntry(NXEntry & entry)
}
}
}
else if ( info.type == NX_INT32 ) // A vector_int column
{
loadVectorColumn<int>(nx_tw, str, workspace, "vector_int");
#define IF_VECTOR_COLUMN(Type, ColumnTypeName, NexusType) \
else if ( info.type == NexusType ) \
{ \
loadVectorColumn<Type>(nx_tw, str, workspace, #ColumnTypeName); \
}
IF_VECTOR_COLUMN(int, vector_int, NX_INT32)
IF_VECTOR_COLUMN(double, vector_double, NX_FLOAT64)

}

columnNumber++;
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/DataObjects/src/VectorColumn.cpp
Expand Up @@ -11,6 +11,7 @@ namespace DataObjects
// IMPORTANT: When you do add new column types, please update the following places as well:
// - ARRAY_TYPES in ITableWorkspace.cpp, so that column is exported to Python properly
// - IF_VECTOR_COLUMN in NexusFileIO.cpp, so that column is save to Nexus file properly
// - IF_VECTOR_COLUMN in LoadNexusProcessed.cpp, so that column can be loaded from Nexus file

DECLARE_VECTORCOLUMN(int, vector_int)
DECLARE_VECTORCOLUMN(double, vector_double)
Expand Down

0 comments on commit f09b616

Please sign in to comment.