Changeset 425
- Timestamp:
- 07/17/00 09:05:20 (24 years ago)
- Location:
- trunk/MagicSoft/Simulation/Corsika/GuiSimone
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.cxx
r424 r425 26 26 27 27 fNtupEvt = new TNtuple ("fNtupEvt", "Ntuple with Event distributions", 28 "WaveLen:PosX:Po xY:Height:Time:DireX:DireY") ;28 "WaveLen:PosX:PosY:Height:Time:DireX:DireY") ; 29 29 30 30 … … 34 34 35 35 // 36 // First create the MenuBar. 37 // 36 // First create the MenuBar. // 38 37 39 38 fLayMenuBar = new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX, … … 215 214 fTabF3 = new TGCompositeFrame (tf, 100, 100, kVerticalFrame) ; 216 215 217 tf->AddFrame(fTabF3, fLayTab) ;216 tf->AddFrame(fTabF3, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5)) ; 218 217 219 218 … … 408 407 else 409 408 printf("No Ntuple exist!!\n"); 409 410 return (kFALSE) ; 411 } 412 413 414 // ====================================================================== 415 // ====================================================================== 416 417 Bool_t MainFrameSimone::DrawEvtParam (Char_t *paraName) { 418 419 TCanvas *canvas = fCanvasEvt->GetCanvas(); 420 421 canvas->cd() ; 422 423 if ( fNtupEvt->GetEntries() > 0 ) 424 { 425 fNtupEvt->Draw(paraName) ; 426 canvas->Modified() ; 427 canvas->Update() ; 428 429 return(kTRUE) ; 430 } 431 else 432 printf("No entries in Ntuple!!\n"); 410 433 411 434 return (kFALSE) ; … … 588 611 } 589 612 613 614 // ====================================================================== 615 // ====================================================================== 616 617 Bool_t MainFrameSimone::ReadinEvt() 618 { 619 FILE *unit ; 620 Char_t filename[256] ; 621 622 ifstream cerfile ; 623 624 COREventHeader Event ; 625 CORParticle Photon ; 626 627 Int_t iPhotonInShower ; 628 Float_t lambda ; 629 630 // 631 // check the input Path 632 // 633 634 if ( ! strcmp( fInputPath, "\0") ) { 635 printf ("No InputPath specified!! Do this before!!\n") ; 636 return (kFALSE) ; 637 } 638 639 if ( fEvtNb == 0 ) { 640 printf ("Don't press the Prev Button at the first time!!\n") ; 641 return (kFALSE) ; 642 } 643 644 sprintf ( filename, "%s/cer%06d", fInputPath, fEvtNb ) ; 645 cout << filename << endl ; 646 647 fNtupEvt->Reset() ; 648 649 // 650 // open the file 651 // 652 653 cerfile.open( filename ); 654 655 if ( cerfile.bad() ) { 656 cout << "Cannot open input file: " << filename << endl ; 657 658 return (kFALSE) ; 659 } 660 661 // 662 // read in the header 663 // 664 665 Event.read( cerfile ); 666 667 // 668 // loop over the particles 669 // 670 671 672 iPhotonInShower = 0 ; 673 674 while( ! (cerfile.eof() || cerfile.bad() )) { 675 676 // 677 // read in the particles 678 // 679 680 Photon.read ( cerfile ) ; 681 // 682 // only if the wavelength lambda is greater than 683 // 1.0 it is a real cerenkov photon 684 // 685 686 lambda = Photon.get_wl() ; 687 688 if ( lambda < 1.0 ) 689 break ; 690 691 iPhotonInShower++ ; 692 693 Photon.print() ; 694 695 fNtupEvt->Fill(Photon.get_wl(), 696 Photon.get_x(), 697 Photon.get_y(), 698 Photon.get_h(), 699 Photon.get_t(), 700 Photon.get_u(), 701 Photon.get_v() ) ; 702 703 } 704 705 706 // 707 // close the file 708 // 709 710 cerfile.close(); 711 712 713 cout << fNtupEvt->GetEntries() << endl ; 714 715 return (kTRUE) ; 716 717 } 590 718 // ====================================================================== 591 719 // ====================================================================== … … 730 858 fEvtNb-- ; 731 859 732 733 860 if (fEvtNb < 1 ) { 861 fEvtNb++ ; 862 863 } 864 734 865 sprintf (wort2, "%d", fEvtNb ) ; 735 866 fDirEvtNb->RemoveEntry(1) ; … … 737 868 fDirEvtNb->MapSubwindows() ; 738 869 fDirEvtNb->Layout() ; 870 871 ReadinEvt() ; 739 872 break; 740 873 … … 747 880 fDirEvtNb->AddEntry( wort2, 1 ) ; 748 881 fDirEvtNb->MapSubwindows() ; 749 fDirEvtNb->Layout() ; 882 fDirEvtNb->Layout() ; 883 884 ReadinEvt() ; 885 750 886 break; 887 888 889 case M_BUTTON_WAVELEN: 890 DrawEvtParam("WaveLen") ; 891 break; 892 893 case M_BUTTON_POSIT: 894 DrawEvtParam("PosY:PosX") ; 895 break; 896 897 case M_BUTTON_HEIGHT: 898 DrawEvtParam("Height") ; 899 break; 900 901 case M_BUTTON_TIME: 902 DrawEvtParam("Time") ; 903 break; 904 905 case M_BUTTON_DIRE: 906 DrawEvtParam("DireX:DireY") ; 907 break; 751 908 752 909 -
trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.hxx
r424 r425 15 15 16 16 #include "COREventHeader.hxx" 17 #include "CORParticle.hxx" 17 18 18 19 … … 104 105 void CloseWindow() ; 105 106 106 107 107 Bool_t CerFileExist(Char_t *dir) ; 108 108 Bool_t DrawRunParam(Char_t *paraName) ; 109 Bool_t DrawEvtParam(Char_t *paraName) ; 110 109 111 Bool_t CheckNtup() ; 112 110 113 Bool_t ReadDataToNtup() ; 114 Bool_t ReadinEvt() ; 115 111 116 Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); 112 117 … … 119 124 120 125 121 122 123 124 125 126 127 128 129 -
trunk/MagicSoft/Simulation/Corsika/GuiSimone/Makefile
r424 r425 19 19 # 20 20 # $RCSfile: Makefile,v $ 21 # $Revision: 1. 4$21 # $Revision: 1.5 $ 22 22 # $Author: harald $ 23 # $Date: 2000-07-1 5 11:15:57$23 # $Date: 2000-07-17 08:05:20 $ 24 24 # 25 25 ################################################################## … … 168 168 ../../Detector/include-CORSIKA/COREventHeader.o: ../../Detector/include-CORSIKA/COREventHeader.hxx 169 169 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/stdlib.h 170 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/standards.h 171 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/getopt.h 170 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/features.h 171 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/cdefs.h 172 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/gnu/stubs.h 173 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 172 174 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/types.h 173 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/mach/machine/vm_types.h 175 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/types.h 176 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/time.h 177 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/endian.h 178 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/endian.h 174 179 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/select.h 180 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/select.h 181 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/sigset.h 182 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/sysmacros.h 183 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/alloca.h 175 184 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/math.h 185 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/huge_val.h 186 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/mathdef.h 187 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/mathcalls.h 188 ../../Detector/include-CORSIKA/COREventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 176 189 ../../Detector/include-CORSIKA/CORParticle.o: ../../Detector/include-CORSIKA/CORParticle.hxx 177 190 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/stdlib.h 178 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/standards.h 179 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/getopt.h 191 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/features.h 192 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/cdefs.h 193 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/gnu/stubs.h 194 ../../Detector/include-CORSIKA/CORParticle.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 180 195 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/types.h 181 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/mach/machine/vm_types.h 196 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/types.h 197 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/time.h 198 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/endian.h 199 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/endian.h 182 200 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/select.h 201 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/select.h 202 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/sigset.h 203 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/sysmacros.h 204 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/alloca.h 183 205 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/math.h 206 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/huge_val.h 207 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/mathdef.h 208 ../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/mathcalls.h 209 ../../Detector/include-CORSIKA/CORParticle.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 184 210 ../../Detector/include-CORSIKA/CORStatfile.o: ../../Detector/include-CORSIKA/CORStatfile.hxx 185 211 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/stdlib.h 186 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/standards.h 187 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/getopt.h 212 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/features.h 213 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/cdefs.h 214 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/gnu/stubs.h 215 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 188 216 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/types.h 189 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/mach/machine/vm_types.h 217 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/types.h 218 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/time.h 219 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/endian.h 220 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/endian.h 190 221 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/select.h 222 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/select.h 223 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/sigset.h 224 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/sysmacros.h 225 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/alloca.h 191 226 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/math.h 227 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/huge_val.h 228 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/mathdef.h 229 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/mathcalls.h 230 ../../Detector/include-CORSIKA/CORStatfile.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 192 231 MainFrameSimone.o: MainFrameSimone.hxx 193 232 MainFrameSimone.o: ../../Detector/include-CORSIKA/COREventHeader.hxx 194 MainFrameSimone.o: /usr/include/stdlib.h /usr/include/standards.h 195 MainFrameSimone.o: /usr/include/getopt.h /usr/include/sys/types.h 196 MainFrameSimone.o: /usr/include/mach/machine/vm_types.h 197 MainFrameSimone.o: /usr/include/sys/select.h /usr/include/math.h 198 simone.o: /usr/include/stdlib.h /usr/include/standards.h 199 simone.o: /usr/include/getopt.h /usr/include/sys/types.h 200 simone.o: /usr/include/mach/machine/vm_types.h /usr/include/sys/select.h 233 MainFrameSimone.o: /usr/include/stdlib.h /usr/include/features.h 234 MainFrameSimone.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h 235 MainFrameSimone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 236 MainFrameSimone.o: /usr/include/sys/types.h /usr/include/bits/types.h 237 MainFrameSimone.o: /usr/include/time.h /usr/include/endian.h 238 MainFrameSimone.o: /usr/include/bits/endian.h /usr/include/sys/select.h 239 MainFrameSimone.o: /usr/include/bits/select.h /usr/include/bits/sigset.h 240 MainFrameSimone.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h 241 MainFrameSimone.o: /usr/include/math.h /usr/include/bits/huge_val.h 242 MainFrameSimone.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h 243 MainFrameSimone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 244 MainFrameSimone.o: ../../Detector/include-CORSIKA/CORParticle.hxx 245 simone.o: /usr/include/stdlib.h /usr/include/features.h 246 simone.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h 247 simone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 248 simone.o: /usr/include/sys/types.h /usr/include/bits/types.h 249 simone.o: /usr/include/time.h /usr/include/endian.h 250 simone.o: /usr/include/bits/endian.h /usr/include/sys/select.h 251 simone.o: /usr/include/bits/select.h /usr/include/bits/sigset.h 252 simone.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h 201 253 simone.o: MainFrameSimone.hxx 202 254 simone.o: ../../Detector/include-CORSIKA/COREventHeader.hxx 203 simone.o: /usr/include/math.h 255 simone.o: /usr/include/math.h /usr/include/bits/huge_val.h 256 simone.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h 257 simone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 258 simone.o: ../../Detector/include-CORSIKA/CORParticle.hxx
Note:
See TracChangeset
for help on using the changeset viewer.