Commit 5d667532 authored by Pilar Cossio's avatar Pilar Cossio
Browse files

Controll for particle Map file header missing

parent e49f5d72
......@@ -111,6 +111,7 @@ int bioem_RefMap::readRefMaps(bioem_param& param, const char* filemap)
char line[512] = {0};
char tmpLine[512] = {0};
bool first=true;
while (!input.eof())
{
......@@ -119,6 +120,14 @@ int bioem_RefMap::readRefMaps(bioem_param& param, const char* filemap)
strncpy(tmpLine, line, strlen(line));
char *token = strtok(tmpLine, " ");
if(first){
if (strcmp(token, "PARTICLE") != 0) {
cout << "Missing correct Standard Map Format: PARTICLE HEADER\n"<< endl ;
exit(1);
}
first=false;
}
if (strcmp(token, "PARTICLE") == 0) // to count the number of maps
{
nummap++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment