Changeset 18535 for trunk/Mars/mcorsika


Ignore:
Timestamp:
08/05/16 16:23:19 (8 years ago)
Author:
tbretz
Message:
This new magic number seems to be around larger blocks
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcorsika/MCorsikaFormat.cc

    r18534 r18535  
    124124{
    125125
    126     int blockHeader;
    127     fIn->read((char*)&blockHeader, 4);
    128     if (fIn->eof())
    129         return kFALSE;
     126    int blockHeader = 22932;
     127    while (blockHeader==22932)
     128    {
     129        fIn->read((char*)&blockHeader, 4);
     130        if (fIn->eof())
     131            return kFALSE;
     132    }
    130133
    131134    blockVersion = 0;
    132135    blockIdentifier = 0;
    133136    blockLength     = 272 * 4;
     137
     138    cout << "BH=" << blockHeader << endl;
    134139
    135140    switch(blockHeader)
     
    138143         blockType = 1200;
    139144         break;
    140       case 22932:       // Magic Number (seems(!) to also signal run end, RUNE comes AFTER)
    141145      case 1162761554 : // RUNE
    142146         blockType = 1210;
Note: See TracChangeset for help on using the changeset viewer.