Changeset 722 for trunk/MagicSoft/Simulation/Corsika/Simone/simone.cxx
- Timestamp:
- 04/06/01 11:19:49 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Corsika/Simone/simone.cxx
r721 r722 25 25 26 26 Int_t iPhotonInShower ; 27 Int_t iShowers = 0 ; 27 28 28 29 Float_t lambda ; … … 69 70 // same sice than the EventHeader 70 71 Event.read( cerfile ); 71 72 Event.Print() ; 72 73 // now we read in the event 73 74 Event.read( cerfile );75 76 Event.Print() ;77 78 //79 // loop over the particles (cerenkov photons) in80 // the file81 //82 83 iPhotonInShower = 0 ;84 74 85 75 while( ! (cerfile.eof() || cerfile.bad() )) { 86 76 87 cout << " testit " ; 77 Event.read( cerfile ); 78 79 Event.Print() ; 80 81 iShowers++ ; 82 88 83 // 89 // read in the particles 84 // loop over the particles (cerenkov photons) in 85 // the file 90 86 // 91 87 92 Photon.read ( cerfile );88 iPhotonInShower = 0 ; 93 89 94 // 95 // only if the wavelength lambda is greater than 96 // 1.0 it is a real cerenkov photon 97 // 98 lambda = Photon.get_wl() ; 90 while( ! (cerfile.eof() || cerfile.bad() )) { 99 91 100 Photon.print() ; 92 // 93 // read in the particles 94 // 95 96 Photon.read ( cerfile ) ; 97 98 // 99 // only if the wavelength lambda is greater than 100 // 1.0 it is a real cerenkov photon 101 // 102 lambda = Photon.get_wl() ; 103 104 // Photon.print() ; 105 106 if ( lambda < 1.0 ) { 107 // here we got to the next event reading in all the ZERO 108 // from the file 109 while ( lambda < 1. && ! (cerfile.eof() || cerfile.bad() ) ) { 110 111 Photon.read ( cerfile ) ; 112 lambda = Photon.get_wl() ; 113 // cout << lambda << endl ; 114 } 115 116 // go back in the file 117 cerfile.seekg( -28, ios::cur ) ; 118 119 // read in an Event footer or something like that 120 Event.read( cerfile ); 121 122 break ; 123 } 124 125 iPhotonInShower++ ; 126 127 } 101 128 102 if ( lambda < 1.0 ) { 103 // here we got to the next event reading in all the ZERO 104 // from the file 105 while ( lambda < 1.) { 106 Photon.read ( cerfile ) ; 107 lambda = Photon.get_wl() ; 108 } 129 cout << "Number of Photons In Shower: " 130 << iPhotonInShower << endl ; 131 132 109 133 110 // sprintf (" size of Photon: %d \n", (int) sizeof( CORParticle )) ;111 fseek ( cerfile, -sizeof(CORParticle), SEEK_CUR(1) );112 113 cout << sizeof ( CORParticle ) ;114 cout << sizeof ( int ) ;115 116 break ;117 118 119 120 121 }122 123 124 iPhotonInShower++ ;125 126 134 } 127 135 … … 130 138 // 131 139 132 cerfile.close(); 133 134 140 cerfile.close(); 135 141 136 142 }
Note:
See TracChangeset
for help on using the changeset viewer.