Changeset 18542 for trunk/Mars
- Timestamp:
- 08/24/16 18:12:23 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcorsika/MCorsikaRead.cc
r18533 r18542 393 393 gLog << " identifier=" << fBlockIdentifier << " length=" << fBlockLength; 394 394 gLog << " readState= " << fReadState << endl; 395 */ 395 */ 396 396 if (fReadState == 3 && fBlockType != 1210) 397 397 // fReadState == 3 means we have read the event end … … 499 499 break; 500 500 501 case 1201: // telescope position 501 case 1201: // telescope positions 502 502 status = ReadTelescopePosition(); 503 503 break; … … 525 525 fReadState = 2; 526 526 break; 527 528 case 1203: // 16 bytes 529 fInFormat->Seek(fBlockLength); 530 break; 531 532 case 1212: 533 { 534 char *buf = new char[fBlockLength]; 535 fInFormat->Read(buf, fBlockLength); 536 status = kTRUE; 537 538 char *ptr = buf; 539 540 unsigned int n = ((int*)ptr)[0]; 541 ptr += 4; 542 543 cout << endl; 544 545 for (unsigned int i=0; i<n && ptr<buf+fBlockLength; i++) 546 { 547 unsigned short s = ((unsigned short*)ptr)[0]; 548 ptr += 2; 549 550 cout << string(ptr, ptr+s) << '\n'; 551 ptr += s; 552 } 553 cout << '\n' << endl; 554 555 delete [] buf; 556 } 557 break; 558 527 559 528 560 case 1204: // top level block for one array (only for eventio data) … … 542 574 { 543 575 Int_t telIdx = fBlockIdentifier % 1000; 544 if ( fBlockVersion == 0&&576 if ((fBlockVersion == 0 || fBlockVersion == 1000) && 545 577 (fTelescopeIdx < 0 || fTelescopeIdx == telIdx) ) 546 578 { 547 status = f Event->ReadEventIoEvt(fInFormat);579 status = fBlockVersion==0 ? fEvent->ReadEventIoEvt(fInFormat) : fEvent->ReadEventIoEvtCompact(fInFormat); 548 580 549 581 Int_t arrayIdx = fBlockIdentifier / 1000; … … 566 598 case 1209: // the event end 567 599 status = fEvtHeader->ReadEvtEnd(fInFormat); 568 600 569 601 if (fReadState == 10 || fReadState == 2) 570 602 {
Note:
See TracChangeset
for help on using the changeset viewer.