Changeset 18455 for branches/Corsika7500Compatibility/mcorsika
- Timestamp:
- 03/09/16 15:40:33 (9 years ago)
- Location:
- branches/Corsika7500Compatibility/mcorsika
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Corsika7500Compatibility/mcorsika/MCorsikaFormat.cc
r10213 r18455 57 57 } 58 58 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); 63 63 64 64 if (strcmp(buffer, "RUNH") == 0) … … 66 66 delete [] buffer; 67 67 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); 68 74 } 69 75 … … 159 165 for (int i=1; i<22; i++) 160 166 { 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); 162 171 163 172 char runh[5]="\0\0\0\0"; -
branches/Corsika7500Compatibility/mcorsika/MCorsikaFormat.h
r10213 r18455 45 45 { 46 46 private: 47 47 Bool_t fFortranRaw = false; 48 48 public: 49 49 MCorsikaFormatRaw(std::istream * in) 50 50 : MCorsikaFormat(in) {} 51 52 MCorsikaFormatRaw(std::istream* in, Bool_t fortranRaw) 53 : MCorsikaFormat(in), fFortranRaw(fortranRaw) {} 51 54 52 55 Bool_t NextBlock(Int_t readState, Int_t & blockType, Int_t & blockVersion, -
branches/Corsika7500Compatibility/mcorsika/MCorsikaRead.cc
r14892 r18455 402 402 return kTRUE; 403 403 404 if (fBlockType == 1204 && fReadState != 2)404 if (fBlockType == 1204 && (fReadState != 2 && fReadState != 15)) 405 405 // next is a new set of telescope arrays, we store the previous ones 406 406 // but not if this is the first one (fReadState != 2) … … 474 474 Int_t MCorsikaRead::Process() 475 475 { 476 //fEvent->Clear(); 477 //fEvent->Reset(); 478 fEvent->Resize(0); 476 479 while (1) // loop for multiple input files 477 480 { -
branches/Corsika7500Compatibility/mcorsika/MCorsikaRunHeader.cc
r10060 r18455 205 205 */ 206 206 fWavelengthMin = g[94]; // Cherenkov bandwidth lower end in nm 207 fWavelengthMax = g[95]; // Cherenkov bandwidth upper end in nm207 fWavelengthMax = 900;//g[95]; // Cherenkov bandwidth upper end in nm 208 208 209 209 fViewConeInnerAngle = g[151]; // inner angle of view cone (°)
Note:
See TracChangeset
for help on using the changeset viewer.