Changeset 18455 for branches/Corsika7500Compatibility
- Timestamp:
- 03/09/16 15:40:33 (9 years ago)
- Location:
- branches/Corsika7500Compatibility
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Corsika7500Compatibility/mbase/MQuaternion.h
r9564 r18455 9 9 #ifndef ROOT_TQuaternion 10 10 #include <math.h> 11 #define sqrt ::sqrt11 //#define sqrt ::sqrt 12 12 #include <TQuaternion.h> 13 #undef sqrt13 //#undef sqrt 14 14 #endif 15 15 -
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 (°) -
branches/Corsika7500Compatibility/msim/MPhotonData.h
r18449 r18455 16 16 #ifndef ROOT_TQuaternion 17 17 #include <math.h> 18 #define sqrt ::sqrt18 //#define sqrt ::sqrt 19 19 #include <TQuaternion.h> 20 #undef sqrt20 //#undef sqrt 21 21 #endif 22 22 -
branches/Corsika7500Compatibility/msim/MPhotonEvent.cc
r18447 r18455 559 559 fInFormat->Read(bunchHeader, 3 * sizeof(Int_t)); 560 560 561 this->resize( bunchHeader[2] ); 562 561 563 Int_t n = 0; 562 564 … … 583 585 { 584 586 Int_t n = 0; 587 588 this->resize(numEvents); 585 589 586 590 for (Int_t event = 0; event < numEvents; event++) … … 644 648 } 645 649 } 650 651 void MPhotonEvent::Reset() 652 { 653 this->Clear(); 654 this->Resize(0); 655 } -
branches/Corsika7500Compatibility/msim/MPhotonEvent.h
r18447 r18455 70 70 //void Clear(Option_t * = NULL); 71 71 72 void Reset(); 73 72 74 ClassDef(MPhotonEvent, 1) //Container to store the raw Event Data 73 75 };
Note:
See TracChangeset
for help on using the changeset viewer.