Ignore:
Timestamp:
03/09/16 15:40:33 (9 years ago)
Author:
dbaack
Message:
Commit old changes from 7.4 Branch to this branch
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Corsika7500Compatibility/mcorsika/MCorsikaFormat.cc

    r10213 r18455  
    5757    }
    5858
    59     char *buffer = new char[5];
    60     memset(buffer, 0, 5);
    61     fileIn->read(buffer, 4);
    62     fileIn->seekg(-4, ios::cur);
     59    char *buffer = new char[9];
     60    memset(buffer, 0, 9);
     61    fileIn->read(buffer, 8);
     62    fileIn->seekg(-8, ios::cur);
    6363
    6464    if (strcmp(buffer, "RUNH") == 0)
     
    6666        delete [] buffer;
    6767        return new MCorsikaFormatRaw(fileIn);
     68    }
     69    else if(strcmp(&buffer[4], "RUNH") == 0)
     70    {
     71        fileIn->seekg(4, ios::cur);
     72        delete[] buffer;
     73        return new MCorsikaFormatRaw(fileIn, true);
    6874    }
    6975
     
    159165    for (int i=1; i<22; i++)
    160166    {
    161         fIn->seekg(-i*273*4, ios::end);
     167        if(fFortranRaw)
     168                fIn->seekg(-i*273*4-4, ios::end);
     169        else
     170                fIn->seekg(-i*273*4, ios::end);
    162171
    163172        char runh[5]="\0\0\0\0";
Note: See TracChangeset for help on using the changeset viewer.