Changeset 18526 for branches/Corsika7500Compatibility
- Timestamp:
- 06/28/16 14:29:15 (8 years ago)
- Location:
- branches/Corsika7500Compatibility
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Corsika7500Compatibility/Makefile
r18451 r18526 116 116 RNDMNAME:=$(shell mktemp) 117 117 118 all: $(SOLIB) $(PROGRAMS)118 all: gcc $(SOLIB) $(PROGRAMS) 119 119 @echo " Done. " 120 120 @echo " " 121 122 gcc: 123 @echo "gcc -v" 124 $(CC) -v 121 125 122 126 static: LIBS=$(SUBDIRS:=/*.o) $(OBJS) -
branches/Corsika7500Compatibility/Makefile.conf.linux
r17770 r18526 10 10 11 11 ifeq ($(shell which colorgcc), ) 12 CC := gcc 13 CXX := g++ 12 CC := gcc-4.8 13 CXX := g++-4.8 14 14 else 15 15 CC := colorgcc … … 17 17 endif 18 18 19 LINKER := g++ 19 LINKER := g++-4.8 20 20 F77 := f77 21 21 AR := ar -rc -
branches/Corsika7500Compatibility/Makefile.conf.linux-gnu
r2491 r18526 12 12 # compilers 13 13 14 CC = gcc 15 CXX = g++ 14 CC = gcc-4.8 15 CXX = g++-4.8 16 16 F77 = f77 17 17 AR = ar -rc -
branches/Corsika7500Compatibility/mbase/MTime.cc
r17070 r18526 1152 1152 { 1153 1153 out << *this; 1154 return out ;1154 return out.good(); 1155 1155 } 1156 1156 -
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); -
branches/Corsika7500Compatibility/mfileio/MReadFiles.cc
r11553 r18526 157 157 158 158 // return stream status 159 return *fIn;159 return fIn->good(); 160 160 } 161 161 -
branches/Corsika7500Compatibility/msim/MPhotonEvent.cc
r18455 r18526 559 559 fInFormat->Read(bunchHeader, 3 * sizeof(Int_t)); 560 560 561 this-> resize( bunchHeader[2] );561 this->Resize( bunchHeader[2] ); 562 562 563 563 Int_t n = 0; … … 582 582 } 583 583 584 Int_t MPhotonEvent::ReadEventIoEvtCompact(MCorsikaFormat *fInFormat) 585 { 586 //Int_t bunchHeader[3]; 587 //fInFormat->Read(bunchHeader, 3*sizeof(Int_t)); 588 short array; 589 short tel; 590 float photon; 591 fInFormat->Read(&array, sizeof(array)); 592 fInFormat->Read(&tel, sizeof(tel)); 593 fInFormat->Read(&photon, sizeof(photon)); 594 595 std::cout << "ReadEventIO Evt Compact (Header) : " << array << " - " << tel << " - " << photon << std::endl; 596 597 this->Resize( (int)photon ); 598 599 int nbunches; 600 fInFormat->Read(&nbunches, sizeof(int)); 601 std::cout << "ReadEventIO Evt Compact (nbunches) : " << nbunches << std::endl; 602 603 Int_t n = 0; 604 605 for(int bunch = 0; bunch < (int)nbunches; bunch++) 606 { 607 short buffer[8]; 608 float floatBuffer[8]; 609 fInFormat->Read(buffer, 8 * sizeof(short)); 610 611 612 std::cout << "\nBunch: " << bunch << " with: "; 613 for(int i=0; i<8; i++) 614 { 615 std::cout << ", " <<buffer[i]; 616 floatBuffer[i] = static_cast<float>(buffer[i]); 617 } 618 619 if(Add(n).FillEventIO(floatBuffer)) 620 n++; 621 } 622 Resize(n); 623 fData.UnSort(); 624 625 SetReadyToSave(); 626 627 return kTRUE; 628 } 629 584 630 Int_t MPhotonEvent::ReadCorsikaEvt(Float_t * data, Int_t numEvents, Int_t arrayIdx) 585 631 { 586 632 Int_t n = 0; 587 633 588 this-> resize(numEvents);634 this->Resize(numEvents); 589 635 590 636 for (Int_t event = 0; event < numEvents; event++) -
branches/Corsika7500Compatibility/msim/MPhotonEvent.h
r18455 r18526 63 63 // I/O 64 64 Int_t ReadEventIoEvt(MCorsikaFormat *fInFormat); 65 Int_t ReadEventIoEvtCompact(MCorsikaFormat *fInFormat); 65 66 Int_t ReadCorsikaEvt(Float_t * data, Int_t numEvents, Int_t arrayIdx); 66 67
Note:
See TracChangeset
for help on using the changeset viewer.