Changeset 18526 for branches/Corsika7500Compatibility/mcorsika
- Timestamp:
- 06/28/16 14:29:15 (8 years ago)
- Location:
- branches/Corsika7500Compatibility/mcorsika
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Corsika7500Compatibility/mcorsika/MCorsikaFormat.cc
r18455 r18526 69 69 else if(strcmp(&buffer[4], "RUNH") == 0) 70 70 { 71 fileIn->seekg(4, ios::cur); 72 delete[] buffer; 73 return new MCorsikaFormatRaw(fileIn, true); 71 //std::cout << "\n||||\tIgnore first 4 bytes" << std::endl; 72 fileIn->seekg(4, ios::cur); 73 delete[] buffer; 74 return new MCorsikaFormatRaw(fileIn, true); 74 75 } 75 76 … … 129 130 blockIdentifier = 0; 130 131 blockLength = 272 * 4; 131 132 //std::cout << "||||||||||||||| Raw Blockheader: " << blockHeader << std::endl; 132 133 switch(blockHeader) 133 134 { … … 166 167 { 167 168 if(fFortranRaw) 168 fIn->seekg(-i*273*4-4, ios::end); 169 { 170 fIn->seekg(-i*273*4-4, ios::end); 171 } 169 172 else 173 { 170 174 fIn->seekg(-i*273*4, ios::end); 175 } 171 176 172 177 char runh[5]="\0\0\0\0"; -
branches/Corsika7500Compatibility/mcorsika/MCorsikaFormat.h
r18455 r18526 1 1 #ifndef MARS_MDataFormat 2 2 #define MARS_MDataFormat 3 4 #include <iostream> 3 5 4 6 #ifndef MARS_MAGIC … … 47 49 Bool_t fFortranRaw = false; 48 50 public: 49 MCorsikaFormatRaw(std::istream * in)50 51 //MCorsikaFormatRaw(std::istream * in) 52 // : MCorsikaFormat(in) {} 51 53 52 MCorsikaFormatRaw(std::istream* in, Bool_t fortranRaw )53 : MCorsikaFormat(in), fFortranRaw(fortranRaw) {} 54 MCorsikaFormatRaw(std::istream* in, Bool_t fortranRaw = false) 55 : MCorsikaFormat(in), fFortranRaw(fortranRaw) {}//std::cout << "\n\n||||||||||||||||||||||||||||" << fortranRaw << std::endl;} 54 56 55 57 Bool_t NextBlock(Int_t readState, Int_t & blockType, Int_t & blockVersion, -
branches/Corsika7500Compatibility/mcorsika/MCorsikaRead.cc
r18455 r18526 561 561 fRunHeader->GetWavelengthMax()); 562 562 } 563 else 563 else if (fBlockVersion == 1000 && (fTelescopeIdx < 0 || fTelescopeIdx == telIdx) ) 564 { 565 status = fEvent->ReadEventIoEvtCompact(fInFormat); 566 567 Int_t arrayIdx = fBlockIdentifier / 1000; 568 Float_t xArrOff, yArrOff; 569 fEvtHeader->GetArrayOffset(arrayIdx, xArrOff, yArrOff); 570 fEvtHeader->SetTelescopeOffset(arrayIdx, 571 xArrOff + fTelescopeY[telIdx], 572 yArrOff - fTelescopeX[telIdx] ); 573 fEvent->AddXY(xArrOff + fTelescopeY[telIdx], 574 yArrOff - fTelescopeX[telIdx]); 575 fEvent->SimWavelength(fRunHeader->GetWavelengthMin(), 576 fRunHeader->GetWavelengthMax()); 577 } 578 else 564 579 // skip this telescope 565 580 fInFormat->Seek(fBlockLength);
Note:
See TracChangeset
for help on using the changeset viewer.