Ignore:
Timestamp:
03/09/16 15:40:33 (9 years ago)
Author:
dbaack
Message:
Commit old changes from 7.4 Branch to this branch
Location:
branches/Corsika7500Compatibility/mcorsika
Files:
4 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";
  • branches/Corsika7500Compatibility/mcorsika/MCorsikaFormat.h

    r10213 r18455  
    4545{
    4646private:
    47 
     47   Bool_t fFortranRaw = false;
    4848public:
    4949   MCorsikaFormatRaw(std::istream * in)
    5050        : MCorsikaFormat(in) {}
     51
     52   MCorsikaFormatRaw(std::istream* in, Bool_t fortranRaw)
     53        : MCorsikaFormat(in), fFortranRaw(fortranRaw) {}
    5154
    5255   Bool_t NextBlock(Int_t   readState, Int_t & blockType, Int_t & blockVersion,
  • branches/Corsika7500Compatibility/mcorsika/MCorsikaRead.cc

    r14892 r18455  
    402402      return kTRUE;
    403403
    404    if (fBlockType == 1204 && fReadState != 2)
     404   if (fBlockType == 1204 && (fReadState != 2 && fReadState != 15))
    405405      // next is a new set of telescope arrays, we store the previous ones
    406406      // but not if this is the first one (fReadState != 2)
     
    474474Int_t MCorsikaRead::Process()
    475475{
     476   //fEvent->Clear();
     477   //fEvent->Reset();
     478   fEvent->Resize(0);
    476479   while (1)  // loop for multiple input files
    477480   {
  • branches/Corsika7500Compatibility/mcorsika/MCorsikaRunHeader.cc

    r10060 r18455  
    205205 */
    206206    fWavelengthMin = g[94];        // Cherenkov bandwidth lower end in nm
    207     fWavelengthMax = g[95];        // Cherenkov bandwidth upper end in nm
     207    fWavelengthMax = 900;//g[95];        // Cherenkov bandwidth upper end in nm
    208208
    209209    fViewConeInnerAngle = g[151];  // inner angle of view cone (°)
Note: See TracChangeset for help on using the changeset viewer.