Changeset 19331 for trunk/Mars/mcorsika
- Timestamp:
- 10/30/18 15:36:44 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcorsika/MCorsikaFormat.cc
r19329 r19331 55 55 } 56 56 57 uint32_t magic = 0 ;57 uint32_t magic = 0, 58 58 fileIn->read((char*)&magic, 4); 59 59 … … 131 131 } 132 132 133 blockVersion = 0;133 blockVersion = 0; 134 134 blockIdentifier = 0; 135 135 blockLength = fBlockLength/21 - 4; 136 137 // cout << "P=" << fIn->tellg() << " L=" <<blockLength << " " << hex << blockHeader << dec << " " << fIn->eof() << endl;138 136 139 137 switch(blockHeader) … … 173 171 Bool_t MCorsikaFormatRaw::SeekEvtEnd() 174 172 { 175 const uint32_t step = fBlockLength/21; 176 const uint32_t offset = fBlockLength?4:0; 177 178 // cout << fIn->bad() << " " << fIn->eof() << " " << fIn->tellg() << endl; 173 const uint32_t step = fBlockLength/21; 174 const uint32_t offset = (fBlockLength?4:0); 179 175 180 176 // Search subblockwise backward (Block: 5733*4 = 21*273*4) 181 177 for (uint32_t i=1; i<22; i++) 182 178 { 183 const int32_t L = i*step + offset;179 const uint32_t L = i*step + offset; 184 180 fIn->seekg(-L, ios::end); 185 181 186 182 uint32_t magic = 0; 187 183 fIn->read((char*)&magic, 4); 188 189 // cout << dec << L << " " << fIn->tellg() << " " << hex << magic << endl;190 184 191 185 if (magic==kRUNE)
Note:
See TracChangeset
for help on using the changeset viewer.