Changeset 18455


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
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/Corsika7500Compatibility/mbase/MQuaternion.h

    r9564 r18455  
    99#ifndef ROOT_TQuaternion
    1010#include <math.h>
    11 #define sqrt ::sqrt
     11//#define sqrt ::sqrt
    1212#include <TQuaternion.h>
    13 #undef sqrt
     13//#undef sqrt
    1414#endif
    1515
  • 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 (°)
  • branches/Corsika7500Compatibility/msim/MPhotonData.h

    r18449 r18455  
    1616#ifndef ROOT_TQuaternion
    1717#include <math.h>
    18 #define sqrt ::sqrt
     18//#define sqrt ::sqrt
    1919#include <TQuaternion.h>
    20 #undef sqrt
     20//#undef sqrt
    2121#endif
    2222
  • branches/Corsika7500Compatibility/msim/MPhotonEvent.cc

    r18447 r18455  
    559559   fInFormat->Read(bunchHeader, 3 * sizeof(Int_t));
    560560
     561   this->resize( bunchHeader[2] );   
     562
    561563   Int_t n = 0;
    562564
     
    583585{
    584586   Int_t n = 0;
     587
     588   this->resize(numEvents);
    585589
    586590   for (Int_t event = 0; event < numEvents; event++)
     
    644648    }
    645649}
     650
     651void MPhotonEvent::Reset()
     652{
     653        this->Clear();
     654        this->Resize(0);
     655}
  • branches/Corsika7500Compatibility/msim/MPhotonEvent.h

    r18447 r18455  
    7070    //void Clear(Option_t * = NULL);
    7171
     72    void Reset();
     73
    7274    ClassDef(MPhotonEvent, 1) //Container to store the raw Event Data
    7375};
Note: See TracChangeset for help on using the changeset viewer.