Index: trunk/MagicSoft/Simulation/Corsika/GuiSimone/MSimone.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Corsika/GuiSimone/MSimone.cxx	(revision 413)
+++ trunk/MagicSoft/Simulation/Corsika/GuiSimone/MSimone.cxx	(revision 413)
@@ -0,0 +1,109 @@
+#include <iostream.h>
+#include "MSimone.hxx"
+//==========
+// MSimone
+//    
+// This class handles and contains the MonteCarlo information
+// with which the events have been generated
+// This information exists for each event.
+
+//ClassImp(MSimone)
+
+
+
+MSimone::MSimone() {
+  //
+  //  default constructor
+  //  set all values to zero
+
+  PartId = 0  ;
+  Energy  = 0. ;
+
+  Theta   = 0. ;
+  Phi     = 0. ;
+
+  CoreD   = 0. ;
+  CoreX   = 0. ;
+  CoreY   = 0. ;
+  
+  FirstInt = 0. ;
+
+  NumCerPhot = 0. ; 
+}
+
+MSimone::~MSimone() {
+  //
+  //  default destructor
+  //
+}
+
+
+
+
+void MSimone::Clear() {
+  //
+  //  
+  //  reset all values to zero
+
+  PartId  = 0.  ;
+  Energy  = 0.  ;
+
+  Theta   = 0.  ;
+  Phi     = 0.  ;
+
+  CoreD   = 0.  ;
+  CoreX   = 0.  ;
+  CoreY   = 0.  ;
+  
+  FirstInt= 0.  ; 
+
+  NumCerPhot = 0. ; 
+}
+
+
+void MSimone::Print(void) {
+  //
+  //  print out the data member on screen
+  //
+  cout <<endl << "Monte Carlo output:" <<endl;
+  cout << " Particle Id    : " << PartId ; 
+  cout << " Energy (GeV)   : " << Energy  ; 
+  cout << endl ; 
+}
+
+
+void MSimone::Transfer( COREventHeader *e )
+{
+  PartId       = e->PrimaryID;
+  Energy       = e->Etotal;
+
+  Theta          = e->Theta;
+  Phi            = e->Phi;
+  
+  Float_t x, y ; 
+
+  CoreD = e->get_core(&x, &y, 0 ) ; 
+
+  CoreX = x ; 
+  CoreY = y ; 
+
+  FirstInt      = e->zFirstInt;
+
+}
+
+void MSimone::SetNumCerPhot( Int_t iN ) 
+{
+  NumCerPhot = (Float_t) iN ; 
+}
+
+void MSimone::NtupFill( TNtuple *n )
+{
+  n->Fill(PartId,Energy,Theta,Phi,CoreX, CoreY, CoreD, NumCerPhot ) ; 
+}
+
+
+
+
+
+
+
Index: trunk/MagicSoft/Simulation/Corsika/GuiSimone/MSimone.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Corsika/GuiSimone/MSimone.hxx	(revision 413)
+++ trunk/MagicSoft/Simulation/Corsika/GuiSimone/MSimone.hxx	(revision 413)
@@ -0,0 +1,52 @@
+#ifndef __MSimone__
+#define __MSimone__
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>  
+
+#include <iostream.h>
+#include "TObject.h"
+#include "TNtuple.h"
+
+#include "COREventHeader.hxx"
+
+//class MSimone : public TObject {
+class MSimone {
+ private:
+  Float_t  PartId;        // Type of particle
+  Float_t  Energy;       // Energy in GeV
+
+  Float_t  Theta;        // Theta angle of event 
+  Float_t  Phi;          // Phi angle of event 
+
+  Float_t  CoreD;        // Core d pos
+  Float_t  CoreX;        // Core x pos
+  Float_t  CoreY;        // Core y pos
+
+  Float_t  FirstInt ;    // First interaction in cm above sea level
+
+  Float_t  NumCerPhot ;  // Number of Cerenkov photons in shower
+  
+ public:
+  MSimone() ;         
+  
+  ~MSimone(); 
+
+  void Clear();
+
+  void Print(void);
+
+  void Transfer ( COREventHeader *e );
+
+  void NtupFill ( TNtuple *n ) ; 
+
+  void SetNumCerPhot( Int_t iN ) ; 
+
+  //  ClassDef(MSimone, 1)   //Stores Montecarlo Information 
+
+};
+
+#endif
Index: trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.cxx	(revision 413)
+++ trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.cxx	(revision 413)
@@ -0,0 +1,636 @@
+//
+//
+//
+#define  START_DIRECTORY  "/dat1"
+#define S_ISDIR(m) (((m)&(0170000)) == (0040000))  
+
+#include <TApplication.h>
+#include <TGMsgBox.h>
+
+#include "MainFrameSimone.hxx"
+
+
+
+MainFrameSimone::MainFrameSimone(const TGWindow *p, UInt_t w, UInt_t h)
+    : TGMainFrame(p, w, h)
+{
+  sprintf (fInputPath, "\0" ) ; 
+  fNumEvents = 0 ; 
+  
+  fNtup = new TNtuple ("fNtup", "Ntuple with Run distributions", 
+		       "PartID:Energy:CoreX:CoreY") ; 
+  //
+  // Create a main frame with a number of different buttons.
+  //
+
+  //
+  // First create the MenuBar. 
+  //
+
+  fLayMenuBar = new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX,
+				    2, 2, 2, 2 ) ; 
+  fLayMenuItem = new TGLayoutHints ( kLHintsTop | kLHintsLeft ,
+				     0, 4, 0, 0 ) ; 
+
+  
+  fFileMenu = new TGPopupMenu ( fClient->GetRoot() ) ; 
+  fFileMenu->AddEntry ("Exit", M_FILE_EXIT ) ; 
+
+  //
+  //  the button messages are handled by main frame (this) 
+  //
+  fFileMenu->Associate(this) ; 
+
+
+  fMenuBar = new TGMenuBar ( this, 1, 1, kHorizontalFrame ) ; 
+  fMenuBar->AddPopup("File", fFileMenu, fLayMenuItem ) ; 
+  
+  AddFrame(fMenuBar, fLayMenuBar ) ; 
+
+
+  //
+  // create the Tab 
+  //
+
+  fFrame = new TGCompositeFrame (this, 300,300, kHorizontalFrame ) ; 
+  
+  fLayTab = new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX  , 5, 5, 5, 5 ) ; 
+  fTab = new TGTab ( fFrame, 400, 400 ) ; 
+  
+  TGCompositeFrame *tf = fTab->AddTab("Input") ; 
+  fTabF1 = new TGCompositeFrame (tf, 100, 100, kHorizontalFrame) ; 
+
+  tf->AddFrame(fTabF1, fLayTab ) ; 
+
+  fTabF1a = new TGCompositeFrame (tf, 100, 100, kHorizontalFrame) ; 
+  tf->AddFrame(fTabF1a,  new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ; 
+
+  fTabF1b = new TGCompositeFrame (tf, 100, 100, kVerticalFrame) ; 
+  tf->AddFrame(fTabF1b,  new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY  , 5, 5, 5, 5 ) ) ; 
+
+  fDir = new TGListBox(fTabF1, -1) ; 
+  fDir->Resize(350,20) ; 
+  char temp[100] ; 
+  //  sprintf ( temp, "%s", START_DIRECTORY ) ; 
+  sprintf ( temp, "%s", gSystem->WorkingDirectory()  ) ; 
+  fDir->AddEntry(temp, 1) ; 
+  fTabF1->AddFrame( fDir, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ; 
+
+
+  fPicCdup = fClient->GetPicture("tb_uplevel.xpm") ; 
+  fCdup = new TGPictureButton(fTabF1, fPicCdup, M_CDIR_UP ) ; 
+  fCdup->SetToolTipText("One Level up!") ; 
+  fCdup->Associate(this) ; 
+  fTabF1->AddFrame (fCdup, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ; 
+
+  fPicList = fClient->GetPicture("tb_list.xpm") ; 
+  fListMode = new TGPictureButton(fTabF1, fPicList, M_LIST_MODE ) ; 
+  fListMode->SetToolTipText("List Mode") ; 
+  fListMode->Associate(this) ; 
+  fListMode->SetState(kButtonUp) ; 
+  fListMode->AllowStayDown(kTRUE) ; 
+  fTabF1->AddFrame (fListMode, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ; 
+
+  fPicDetail = fClient->GetPicture("tb_details.xpm") ; 
+  fDetail = new TGPictureButton(fTabF1, fPicDetail, M_DETAIL_MODE ) ; 
+  fDetail->SetToolTipText("Details Mode") ; 
+  fDetail->Associate(this) ; 
+  fDetail->SetState(kButtonEngaged) ; 
+  fDetail->AllowStayDown(kTRUE) ; 
+  fTabF1->AddFrame (fDetail, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ; 
+
+  
+  fSelectButton = new TGTextButton(fTabF1b, "Select", M_BUTTON_SELECT );
+  fSelectButton->SetToolTipText("To select a path with Mmcs data files!");
+  fSelectButton->SetState(kButtonDisabled); 
+  fSelectButton->Associate(this) ; 
+
+  fTabF1b->AddFrame(fSelectButton,
+		    new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 5, 5) ) ; 
+  
+  fFileView = new TGListView(fTabF1b, 540, 380 ) ; 
+  fFileCont = new TGFileContainer(fFileView->GetViewPort(), 100, 100,
+				  kVerticalFrame, fgWhitePixel) ; 
+
+  fFileCont->Associate(this) ; 
+  fFileView->GetViewPort()->SetBackgroundColor(fgWhitePixel) ; 
+  fFileView->SetContainer(fFileCont) ; 
+  fFileCont->SetFilter("*") ; 
+  //  fFileCont->ChangeDirectory(START_DIRECTORY) ; 
+  fFileCont->ChangeDirectory(gSystem->WorkingDirectory()) ; 
+  fFileView->SetViewMode(kLVDetails); 
+  fFileCont->Sort(kSortByName) ; 
+  
+  fTabF1b->AddFrame(fFileView, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5) ) ; 
+
+  //
+  //  create Tab 2 
+  //
+
+  tf = fTab->AddTab("Run Dist") ; 
+  fTabF2 = new TGCompositeFrame (tf, 100, 100, kVerticalFrame) ; 
+  
+  tf->AddFrame(fTabF2,  new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5)) ; 
+
+  //  create the vertical subframes
+
+  fTabF2a = new TGCompositeFrame (fTabF2, 100, 100, kHorizontalFrame) ; 
+  fTabF2->AddFrame(fTabF2a, fLayTab ) ; 
+
+  fTabF2b = new TGCompositeFrame (fTabF2, 300, 300, kHorizontalFrame) ; 
+  fTabF2->AddFrame(fTabF2b, 
+		   new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX |kLHintsExpandY, 5, 5, 5, 5 ) ) ; 
+
+  fTabF2c = new TGCompositeFrame (fTabF2, 100, 100, kHorizontalFrame) ; 
+  fTabF2->AddFrame(fTabF2c,new TGLayoutHints(kLHintsBottom | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 )  ) ; 
+
+  //  create the entries in first subframe
+
+  fLabelInput = new TGLabel(fTabF2a, new TGString("Title:") );       
+  fTabF2a->AddFrame( fLabelInput, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
+
+  fDir2 = new TGListBox(fTabF2a, -1) ; 
+  fDir2->Resize(350,20) ; 
+  sprintf ( temp, "%s", fInputPath ) ; 
+  fDir2->AddEntry(temp, 1) ; 
+  fTabF2a->AddFrame( fDir2, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5 ) ) ; 
+  
+  fLabelNumEvts = new TGLabel(fTabF2a, new TGString("Number of Events:") );       
+  fTabF2a->AddFrame( fLabelNumEvts, new TGLayoutHints(kLHintsTop | kLHintsLeft , 5, 5, 5, 5 ) ) ;   
+  
+  fDirNum = new TGListBox(fTabF2a, -1) ; 
+  fDirNum->Resize(50,20) ; 
+  fTabF2a->AddFrame( fDirNum, 
+		     new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5 ) ) ;
+
+  fButtonPlot = new TGTextButton(fTabF2a, "PLOT", M_BUTTON_PLOT );
+  fButtonPlot->Associate(this) ;   
+  fTabF2a->AddFrame (fButtonPlot, new TGLayoutHints(kLHintsTop | kLHintsLeft, 50, 50, 5, 5) );
+
+  //  create the entries in the second subframe
+  
+  fCanvasRun = new TRootEmbeddedCanvas("fCanvasRun", fTabF2b, 300, 300 ) ; 
+  fTabF2b->AddFrame(fCanvasRun, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandY | kLHintsExpandX, 5, 5, 5, 5 ) ) ; 
+
+  //  create the entries in the second subframe
+
+  fButtonPartID = new TGTextButton(fTabF2c, "PartId", M_BUTTON_PARTID );
+  fButtonPartID->Associate(this) ;
+  fTabF2c->AddFrame (fButtonPartID, new TGLayoutHints(kLHintsBottom | kLHintsLeft, 2, 2, 2, 2) );
+
+  fButtonEnergy = new TGTextButton(fTabF2c, "Energy", M_BUTTON_ENERGY );
+  fButtonEnergy->Associate(this) ;
+  fTabF2c->AddFrame (fButtonEnergy, new TGLayoutHints(kLHintsBottom | kLHintsLeft, 2, 2, 2, 2) );
+
+  fButtonCore = new TGTextButton(fTabF2c, "CoreX", M_BUTTON_CORE );
+  fButtonCore->Associate(this) ;
+  fTabF2c->AddFrame (fButtonCore, new TGLayoutHints(kLHintsBottom | kLHintsLeft, 2, 2, 2, 2) );
+
+  //
+  //  create Tab 3 
+  //
+
+  tf = fTab->AddTab("Control") ; 
+  fTabF3 = new TGCompositeFrame (tf, 100, 100, kVerticalFrame) ; 
+  
+  
+  fButton1 = new TGTextButton(fTabF3, "&Exit", M_CTRL_EXIT);
+  fButton2 = new TGTextButton(fTabF3, "Working Directory", M_CTRL_PWD);
+  fButton3 = new TGTextButton(fTabF3, "Input Path", M_CTRL_PATH);
+
+  fButton1->Associate(this) ; 
+  fButton2->Associate(this) ; 
+  fButton3->Associate(this) ; 
+  
+  fLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 10, 10);
+  
+  fTabF3->AddFrame (fButton1, fLayout ) ; 
+  fTabF3->AddFrame (fButton2, fLayout ) ; 
+  fTabF3->AddFrame (fButton3, fLayout ) ; 
+  
+  tf->AddFrame(fTabF3, fLayTab) ; 
+
+  fFrame->AddFrame ( fTab, new TGLayoutHints(kLHintsBottom | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5) ); 
+
+  AddFrame(fFrame, new TGLayoutHints (kLHintsExpandX|kLHintsExpandY) ) ; 
+
+
+
+  //
+  //
+  //
+
+  MapSubwindows();
+  
+  Layout();
+  
+  SetWindowName("MainSimone");
+  SetIconName("MainSimone");
+  
+  MapWindow();
+}
+ 
+// ======================================================================
+// ======================================================================
+
+MainFrameSimone::~MainFrameSimone() {
+  
+  delete fButton1 ; 
+  delete fButton2 ; 
+  delete fFrame, fTab, fTabF1, fTabF2, fTabF3 ; 
+  delete fTabF1a, fTabF1b ; 
+  delete fDir, fCdup, fListMode, fDetail ; 
+  delete fFileCont, fFileView ;
+  delete fFileMenu, fMenuBar; 
+  delete fLayout, fLayMenuBar, fLayMenuItem, fLayTab ; 
+ 
+  delete  fPicCdup, fPicList, fPicDetail ; 
+  
+}
+
+// ======================================================================
+// ======================================================================
+ 
+void MainFrameSimone::CloseWindow()
+{
+   // Got close message for this MainFrame. Calls parent CloseWindow()
+   // (which destroys the window) and terminate the application.
+   // The close message is generated by the window manager when its close
+   // window menu item is selected.
+
+   TGMainFrame::CloseWindow();
+   gROOT->GetApplication()->Terminate(0)  ; 
+
+}
+
+// ======================================================================
+// ======================================================================
+
+Bool_t MainFrameSimone::CerFileExist(Char_t *dir)
+{
+  Char_t testfile[110] ;
+  FILE *unit ; 
+  
+  sprintf (testfile, "%s/%s/cer000001", 
+	    	     gSystem->WorkingDirectory(), dir  ) ; 
+  //
+  //   try to open the testfile
+  //
+
+  if ( (unit = fopen (testfile, "r" )) == 0 ) {
+    //
+    //  doesn't exist --> kFALSE
+     return (kFALSE) ; 
+  }
+  else {
+    fclose ( unit ) ; 
+    
+    return ( kTRUE ) ; 
+  }
+  
+  return (kFALSE) ; 
+}
+
+// ======================================================================
+// ======================================================================        
+Bool_t MainFrameSimone::CheckNtup()
+{
+  if ( ! strcmp( fInputPath, "\0")  ) {
+    printf ("No InputPath specified!! Do this before!!\n") ; 
+    return (kFALSE) ;
+  }
+  
+
+  if ( ! strcmp ( fInputPath, fNtupPath ) ) {
+    return (kTRUE) ; 
+  }
+  else {
+    
+    if ( ReadDataToNtup() ) {
+      return (kTRUE) ; 
+    }
+  }
+      
+  return (kFALSE) ;
+}
+
+// ======================================================================
+// ======================================================================
+
+Bool_t MainFrameSimone::ReadDataToNtup()
+{
+  Char_t  cername[256] ; 
+  Char_t  datname[256] ;
+  
+  ifstream   cerfile ; 
+  
+  COREventHeader Event ;  
+  
+  printf("readin the input path: %s \n", fInputPath ) ; 
+  
+  fNtup->Reset() ; 
+
+  for (int i_cer = 1; i_cer <= 100000; i_cer++ ) {
+  
+    //   create the file names 
+    
+    sprintf ( cername, "%s/cer%06d", fInputPath, i_cer ) ; 
+    sprintf ( datname, "%s/dat%06d", fInputPath, i_cer ) ; 
+    
+    //   try to open the files
+        
+    cerfile.open( cername );
+    
+    if ( cerfile.bad() ) { 
+
+      fNumEvents = i_cer -1 ;
+      
+      sprintf ( datname, "%d", fNumEvents ) ; 
+
+      fDirNum->RemoveEntry(1) ; 
+      fDirNum->AddEntry(datname,1) ; 	    
+      fDirNum->MapSubwindows() ; 
+      fDirNum->Layout() ;  
+      
+      break ; 
+    }
+    
+    Event.read( cerfile );
+
+    //
+    //   fill Ntuple
+    // 
+    
+    fNtup->Fill( Event.get_primary() ,
+		 Event.get_energy() , 
+		 Event.get_coreX(), 
+		 Event.get_coreY() ) ;  
+
+ 
+    cerfile.close();
+    
+  }
+
+  //
+  //    set some value of this class
+  //
+  sprintf ( fNtupPath, "%s", fInputPath) ;  
+
+  return (kTRUE) ; 
+}
+
+// ======================================================================
+// ======================================================================
+
+Bool_t MainFrameSimone::ProcessMessage(Long_t msg, Long_t parm1, Long_t)
+{
+  Int_t retval = 0 ; 
+  Char_t  wort[100] ;
+  Char_t  testfile[100] ;
+  Char_t  extens[5] ;
+  Char_t  command[110] ;
+ 
+  TGFileItem *item ;     // to process items in the file view container
+  void *np = NULL ;      // null pointer
+
+  TCanvas *canvas =  fCanvasRun->GetCanvas();   
+ 
+  // Process events generated by the buttons in the frame.
+
+  switch (GET_MSG(msg)) {
+  case kC_COMMAND:
+    switch (GET_SUBMSG(msg)) {
+    case kCM_BUTTON:
+
+      switch (parm1) {
+      case M_CDIR_UP :
+	sprintf ( fInputPath, "\0") ; 
+	fSelectButton->SetState(kButtonDisabled) ; 
+	fDir2->RemoveEntry(1) ; 
+	fDir2->AddEntry(fInputPath,1) ; 
+	fDir2->MapSubwindows() ; 
+	fDir2->Layout() ;   
+	      
+	//
+	//  goto the parent directory
+	//
+	gSystem->ChangeDirectory("..") ; 
+	fDir->RemoveEntry(1) ; 
+	sprintf (wort, "%s", gSystem->WorkingDirectory() ) ; 
+	fDir->AddEntry(wort,1) ; 
+	fDir->MapSubwindows() ; 
+	fDir->Layout() ; 
+	fFileCont->ChangeDirectory( wort ) ; 
+	fFileCont->DisplayDirectory() ; 
+	  
+	break ; 
+
+      case M_LIST_MODE:
+	fFileView->SetViewMode(kLVList) ; 
+	fDetail->SetState(kButtonUp) ; 
+	break ; 
+
+      case M_DETAIL_MODE:
+	fFileView->SetViewMode(kLVDetails) ; 
+	fListMode->SetState(kButtonUp) ; 
+	break ; 
+
+      case M_BUTTON_SELECT: 
+
+	if ( fFileCont->NumSelected() == 1 ) {   
+	  //
+	  //  one file selected
+	  //	  
+	  item = (TGFileItem *) fFileCont->GetNextSelected(&np) ; 
+
+	  if ( S_ISDIR(item->GetType()) ) {   // file is directory
+	    
+	    sprintf (fInputPath, "%s/%s",
+		     gSystem->WorkingDirectory(), 
+		     item->GetItemName()->GetString()) ;
+
+	    fDir2->RemoveEntry(1) ; 
+	    fDir2->AddEntry(fInputPath,1) ; 	    
+	    fDir2->MapSubwindows() ; 
+	    fDir2->Layout() ;   
+	      
+	  }
+	}
+	break;
+
+      case M_BUTTON_PARTID: 
+	if ( CheckNtup() )  
+	  {
+	    fNtup->Draw("PartID") ; 
+	    canvas->Modified() ; 
+	    canvas->Update() ; 
+	  }
+	else  
+	  printf("No Ntuple exist!!\n"); 
+	break; 
+
+      case M_BUTTON_ENERGY: 
+	if ( CheckNtup() )  
+	  {
+	    fNtup->Draw("Energy") ; 
+	    canvas->Modified() ; 
+	    canvas->Update() ; 
+	  }
+	else  
+	  printf("No Ntuple exist!!\n"); 
+	break; 
+
+      case M_BUTTON_CORE: 
+	if ( CheckNtup() )  
+	  {
+	    fNtup->Draw("CoreY:CoreX") ; 
+	    canvas->Modified() ; 
+	    canvas->Update() ; 
+	  }
+	else  
+	  printf("No Ntuple exist!!\n"); 
+	break; 
+
+      case M_CTRL_EXIT:
+	CloseWindow() ; 
+	break; 
+
+      case M_CTRL_PWD: 
+	printf ("WorkingDirectory -> %s <- \n", gSystem->WorkingDirectory() ) ;
+	break ; 
+
+      case M_CTRL_PATH: 
+	printf ("Input Path: -> %s <- \n", fInputPath ) ;
+	break ; 
+      }
+
+      break; 
+      
+    case kCM_CHECKBUTTON:
+
+      break;
+
+    case kCM_RADIOBUTTON:
+      break;
+
+
+    case kCM_MENU: 
+      switch (parm1) {
+      case M_FILE_EXIT: 
+	CloseWindow() ;
+	break; 
+	
+      }
+      break ; 
+	 
+    default:
+      break;
+      
+    }
+
+  case kC_CONTAINER: 
+    switch (GET_SUBMSG(msg)) {
+      
+      //      case kCT_ITEMCLICK:
+      //        printf ("itemclick\n"); 
+      //        break; 
+
+      
+    case kCT_ITEMDBLCLICK: 
+      //
+      //  process the double click in the file view container
+      //
+      
+      if ( parm1 == kButton1) {
+	if ( fFileCont->NumSelected() == 1 ) {   
+	  //
+	  //  one file selected
+	  //	  
+	  item = (TGFileItem *) fFileCont->GetNextSelected(&np) ; 
+
+	  if ( S_ISDIR(item->GetType()) ) {   // file is directory
+
+	    sprintf (wort, "%s", item->GetItemName()->GetString()) ;
+	    
+	    //
+	    //  check if in this directory the file cer000001 exits
+	    //  if it exists, do not open the stuff
+	    //
+
+	    if ( CerFileExist( wort ) ) {
+	      printf ("Warning: Cer files in directory\n") ; 
+	      fSelectButton->SetState(kButtonUp) ; 
+	    }  
+	    else {
+	      sprintf (fInputPath,"\0") ; 
+	      fSelectButton->SetState(kButtonDisabled) ;
+	      fDir2->RemoveEntry(1) ; 
+	      fDir2->AddEntry(fInputPath,1) ;
+	      fDir2->MapSubwindows() ; 
+	      fDir2->Layout() ;   
+	      //
+	      //  goto directory 
+	      //
+	      fFileCont->ChangeDirectory ( wort ) ; 
+	      gSystem->ChangeDirectory( wort ) ; 
+	      
+	      sprintf (wort, "%s", gSystem->WorkingDirectory() ) ; 
+	      fDir->RemoveEntry(1) ; 
+	      fDir->AddEntry( wort, 1 ) ; 
+	      fDir->MapSubwindows() ; 
+	      fDir->Layout() ; 
+	    }
+	    
+	  }
+	  else {   // item is a file
+	    sprintf (testfile, "%s", item->GetItemName()->GetString() ) ; 
+	    
+	    //
+	    //    determine the file type by extensions
+	    //
+	    
+	    for (Int_t i = 0 ; i<5; i++) 
+	      extens[i] = '\0' ; 
+	    
+	    for ( Int_t i=0; testfile[i] != '\0'; i++) {
+	      if ( testfile[i] == '.') {
+		strncpy (extens, &testfile[i+1], 4 ) ; 
+		break ; 
+	      }
+	    }
+
+	    //
+	    //     postscript file
+	    //
+	    
+	    if ( ! strcmp(extens, "ps") ) {
+	      sprintf ( command, "gv %s/%s &", 
+			gSystem->WorkingDirectory(), 
+			testfile ) ; 
+	      gSystem->Exec(command) ; 
+	      break ; 
+	    }
+	    
+		
+	    
+	      
+	  }
+	}
+      }      
+      else if ( parm1 == kButton3) {  // right mouse double click
+	printf ("huschel kButton3\n");  
+      }
+
+      break; 
+      
+    }
+    break ;
+
+     
+  default:
+    break;
+  }
+  return kTRUE;
+}
+
+
Index: trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.hxx	(revision 413)
+++ trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.hxx	(revision 413)
@@ -0,0 +1,101 @@
+#include <TROOT.h>
+#include <TSystem.h>
+#include <TGClient.h>
+#include <TGButton.h>
+#include <TGMenu.h>
+#include <TGTab.h>
+#include <TGListBox.h>
+#include <TGLabel.h>
+#include <TGPicture.h>
+#include <TGFSContainer.h>
+#include <TRootEmbeddedCanvas.h>
+#include <TNtuple.h>
+#include <TCanvas.h>
+
+#include "COREventHeader.hxx"
+
+
+enum CommandIdentifiers {
+  M_FILE_EXIT ,
+
+  M_CDIR_UP,
+  M_LIST_MODE , 
+  M_DETAIL_MODE, 
+  M_BUTTON_SELECT,
+
+  M_BUTTON_PLOT, 
+  M_BUTTON_PARTID, 
+  M_BUTTON_ENERGY, 
+  M_BUTTON_CORE,
+
+
+  M_CTRL_EXIT, 
+  M_CTRL_PWD, 
+  M_CTRL_PATH 
+}; 
+
+
+class MainFrameSimone : public TGMainFrame {
+
+private:
+  Char_t            fInputPath[200] ; 
+  Int_t             fNumEvents ; 
+  Char_t            fNtupPath[200] ; 
+
+  TNtuple           *fNtup ; 
+
+  TGMenuBar         *fMenuBar ; 
+  TGPopupMenu       *fFileMenu ;
+  TGCompositeFrame  *fFrame ; 
+  TGTab             *fTab ; 
+  TGCompositeFrame  *fTabF1, *fTabF2, *fTabF3 ; 
+  TGCompositeFrame  *fTabF1a, *fTabF1b ; 
+  TGTextButton      *fSelectButton ; 
+  TGListBox         *fDir ; 
+  TGPictureButton   *fCdup, *fListMode, *fDetail ; 
+  TGFileContainer   *fFileCont ; 
+  TGListView        *fFileView ;
+  TGCompositeFrame  *fTabF2a, *fTabF2b, *fTabF2c ; 
+  TGLabel           *fLabelInput, *fLabelNumEvts ;
+  TGListBox         *fDir2, *fDirNum ; 
+  TGTextButton      *fButtonPlot ; 
+  TRootEmbeddedCanvas    *fCanvasRun ; 
+  TGTextButton      *fButtonPartID, *fButtonEnergy, *fButtonCore ; 
+  
+  TGTextButton      *fButton1 ;
+  TGTextButton      *fButton2 ;
+  TGTextButton      *fButton3 ;
+  TGLayoutHints     *fLayout, *fLayMenuBar, *fLayMenuItem ; 
+  TGLayoutHints     *fLayTab; 
+
+  const TGPicture   *fPicCdup, *fPicList, *fPicDetail ; 
+  
+public:
+  MainFrameSimone(const TGWindow *p, UInt_t w, UInt_t h);
+  ~MainFrameSimone(); 
+  
+  void CloseWindow()  ; 
+
+
+  Bool_t CerFileExist(Char_t *dir) ; 
+  Bool_t CheckNtup() ; 
+  Bool_t ReadDataToNtup() ; 
+  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
+
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: trunk/MagicSoft/Simulation/Corsika/GuiSimone/Makefile
===================================================================
--- trunk/MagicSoft/Simulation/Corsika/GuiSimone/Makefile	(revision 413)
+++ trunk/MagicSoft/Simulation/Corsika/GuiSimone/Makefile	(revision 413)
@@ -0,0 +1,256 @@
+##################################################################
+#
+# makefile
+#
+# @file        makefile 
+# @title       Simulation of the camera and trigger logic
+# @author      J C Gonz\'alez
+# @email       gonzalez@mppmu.mpg.de
+# @date        Fri Mar 12 11:51:11 MET 1999
+#
+#_______________________________________________________________
+#
+# Created: Fri Mar 12 11:51:11 MET 1999
+# Author:  Jose Carlos Gonzalez
+# Purpose: Makefile for the compilation of the camera program
+# Notes:   
+#    
+#---------------------------------------------------------------
+#
+# $RCSfile: Makefile,v $
+# $Revision: 1.1.1.1 $
+# $Author: harald $ 
+# $Date: 2000-07-06 10:18:48 $
+#
+##################################################################
+# @maintitle
+
+# @code
+
+INCLUDEMK = config.mk.${OSTYPE}
+include ${INCLUDEMK}
+
+# @endcode
+
+# @code 
+
+# common flags
+INCLUDES = -I${INCLUDE}      \
+	   -I${INCLUDE_COR}  \
+	   -I${INCLUDE_ROOT}  \
+	   -I${INCLUDE_SIMO} \
+           -I/usr/include  -I/usr/include/g++
+
+RANLIB  = -L${RANLIBDIR} -lranlib
+
+# what is needed for ROOT is declared in config.mk file
+
+
+# special flags
+
+osf_FORLIBS = -lUfor -lfor -lutil -lots -lm 
+linux_FORLIBS = -lm 
+generic_FORLIBS = -lm 
+
+FORLIBS = ${${SYSTEM}_FORLIBS}
+
+# compilation and linking flags
+
+CXXFLAGS  = -D__${SYSTEM}__ ${INCLUDES} ${OPTIM} ${DEBUG}
+CFLAGS    = ${CXXFLAGS}
+FFLAGS    = ${CXXFLAGS}
+LIBS      = ${RANLIB} ${ROOTLIBS} ${ROOTGLIBS} ${GLIBS} ${FORLIBS} 
+#LIBS      = ${CERNLIB} ${RANLIB} ${FORLIBS} 
+
+#------------------------------------------------------------------------------
+
+#.SILENT:
+
+.SUFFIXES: .c .cxx .C .c++ .h .hxx .H .h++ .o .so .f
+
+SRCS = \
+	${INCLUDE_COR}/COREventHeader.cxx \
+	${INCLUDE_COR}/CORParticle.cxx \
+	${INCLUDE_COR}/CORStatfile.cxx \
+	MainFrameSimone.cxx \
+	simone.cxx      
+
+HEADERS = \
+	COREventHeader.hxx \
+	CORParticle.hxx \
+	CORStatfile.hxx \
+	MainFrameSimone.hxx \
+	simone.h
+
+OBJS = \
+	${INCLUDE_COR}/COREventHeader.o \
+	${INCLUDE_COR}/CORParticle.o \
+	${INCLUDE_COR}/CORStatfile.o \
+	MainFrameSimone.o \
+	simone.o      
+
+PROGRAM=simone
+
+############################################################
+
+all: ${PROGRAM}
+
+depend:
+	@makedepend $(SRCS) -fMakefile 2> /dev/null
+
+doc: reflector-doc
+
+reflector-doc: 
+	@echo "Generating documentation for camera . . . "
+	$(DOCUM) -latex -o reflector.tex \
+	reflector.cxx reflector.h \
+	readparam.cxx readparam.h \
+	atm.cxx atm.h
+	latex "\nonstopmode\input{reflector.tex}" && \
+	makeindex reflector && \
+	latex "\nonstopmode\input{reflector.tex}" && \
+	latex "\nonstopmode\input{reflector.tex}"
+	@echo "Files reflector.tex and reflector.dvi generated."
+
+rate: 
+	@echo "Rating documentation inside code . . . "
+	$(RATE) \
+	reflector.cxx reflector.h \
+	readparam.cxx readparam.h \
+	atm.cxx atm.h
+
+${PROGRAM}: $(OBJS)
+	@echo "Linking..." $@
+	$(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@
+	@echo "done."
+
+.cxx.o:	
+	@echo "Compiling " $<
+	$(CXX) $(CXXFLAGS) -c $< -o $@
+
+.c.o:	
+	@echo "Compiling " $<
+	$(CC) $(CFLAGS) -c $< -o $@
+
+.f.o:	
+	@echo "Compiling " $<
+	$(F77) $(FFLAGS) -c $< -o $@
+
+lclean:
+	@echo "Cleanning..."
+	@rm -f *.o core 
+
+clean:
+	@echo "Cleanning..."
+	@rm -f $(OBJS) core 
+
+mrproper: clean
+	@echo "Mr.Proper in action . . ."
+	@rm -f $(PROGRAM)
+
+ctags:
+	@echo "Creating CTAGS file . . ."
+	@ctags -txw $(SRCS) $(HEADERS) > CTAGS
+
+etags:
+	@echo "Creating TAGS file . . ."
+	@etags -C $(SRCS) $(HEADERS)
+
+listsrc:
+	@ls -m $(SRCS) $(HEADERS) | sed 's/,//g'
+
+redo: clean all
+
+# @endcode
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+../../Detector/include-CORSIKA/COREventHeader.o: ../../Detector/include-CORSIKA/COREventHeader.hxx
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/stdlib.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/features.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/cdefs.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/gnu/stubs.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/types.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/types.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/time.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/endian.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/endian.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/select.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/select.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/sigset.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/sys/sysmacros.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/alloca.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/math.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/huge_val.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/mathdef.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/include/bits/mathcalls.h
+../../Detector/include-CORSIKA/COREventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h
+../../Detector/include-CORSIKA/CORParticle.o: ../../Detector/include-CORSIKA/CORParticle.hxx
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/stdlib.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/features.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/cdefs.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/gnu/stubs.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/types.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/types.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/time.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/endian.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/endian.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/select.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/select.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/sigset.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/sys/sysmacros.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/alloca.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/math.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/huge_val.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/mathdef.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/include/bits/mathcalls.h
+../../Detector/include-CORSIKA/CORParticle.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h
+../../Detector/include-CORSIKA/CORStatfile.o: ../../Detector/include-CORSIKA/CORStatfile.hxx
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/stdlib.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/features.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/cdefs.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/gnu/stubs.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/types.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/types.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/time.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/endian.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/endian.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/select.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/select.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/sigset.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/sys/sysmacros.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/alloca.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/math.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/huge_val.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/mathdef.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/include/bits/mathcalls.h
+../../Detector/include-CORSIKA/CORStatfile.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h
+MainFrameSimone.o: MainFrameSimone.hxx
+MainFrameSimone.o: ../../Detector/include-CORSIKA/COREventHeader.hxx
+MainFrameSimone.o: /usr/include/stdlib.h /usr/include/features.h
+MainFrameSimone.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
+MainFrameSimone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h
+MainFrameSimone.o: /usr/include/sys/types.h /usr/include/bits/types.h
+MainFrameSimone.o: /usr/include/time.h /usr/include/endian.h
+MainFrameSimone.o: /usr/include/bits/endian.h /usr/include/sys/select.h
+MainFrameSimone.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
+MainFrameSimone.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h
+MainFrameSimone.o: /usr/include/math.h /usr/include/bits/huge_val.h
+MainFrameSimone.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
+MainFrameSimone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h
+simone.o: /usr/include/stdlib.h /usr/include/features.h
+simone.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
+simone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h
+simone.o: /usr/include/sys/types.h /usr/include/bits/types.h
+simone.o: /usr/include/time.h /usr/include/endian.h
+simone.o: /usr/include/bits/endian.h /usr/include/sys/select.h
+simone.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
+simone.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h
+simone.o: MainFrameSimone.hxx
+simone.o: ../../Detector/include-CORSIKA/COREventHeader.hxx
+simone.o: /usr/include/math.h /usr/include/bits/huge_val.h
+simone.o: /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
+simone.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h
Index: trunk/MagicSoft/Simulation/Corsika/GuiSimone/config.mk.linux-gnu
===================================================================
--- trunk/MagicSoft/Simulation/Corsika/GuiSimone/config.mk.linux-gnu	(revision 413)
+++ trunk/MagicSoft/Simulation/Corsika/GuiSimone/config.mk.linux-gnu	(revision 413)
@@ -0,0 +1,71 @@
+##################################################################
+#
+# config.mk
+#
+# @file        config.mk
+# @title       small configuration file for Makefile
+# @author      J C Gonz\'alez
+# @email       gonzalez@mppmu.mpg.de
+# @date        Fri Mar 12 11:51:11 MET 1999
+#
+#_______________________________________________________________
+#
+# Created: Fri Mar 12 11:51:11 MET 1999
+# Author:  Jose Carlos Gonzalez
+# Purpose: Makefile for the compilation of the reflector program
+# Notes:   
+#    
+#---------------------------------------------------------------
+# $RCSfile: config.mk.linux-gnu,v $
+# $Revision: 1.1.1.1 $
+# $Author: harald $ 
+# $Date: 2000-07-06 10:18:48 $
+##################################################################
+# @maintitle
+
+# @code
+
+# program
+
+PROGRAM = camera
+
+# compilers & tools
+
+CC            = gcc
+CXX           = g++
+F77           = g77
+
+DOCUM         = ../sus/sus
+RATE          = ../../comstat/comstat -g -p 
+
+# includes		
+
+INCLUDE       = ../../Detector/include-GENERAL
+INCLUDE_COR   = ../../Detector/include-CORSIKA
+INCLUDE_ROOT  = ${ROOTSYS}/include  
+INCLUDE_SIMO  = .
+
+OPTIM    = 
+DEBUG    = -g
+
+# libraries
+
+
+ROOTLIBS      = -L/cern/root/lib -lNew -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lm -ldl -lpthread -rdynamic 
+
+ROOTGLIBS     = -lGpad -lGui -lGX11 -lX3d -lX11
+
+
+GLIBS         = $(ROOTLIBS) $(ROOTGLIBS) -L/usr/X11R6/lib \
+                -lXpm -lX11  -lm -ldl 
+
+
+RANLIBDIR = ../../Detector/lib
+CERNDIR = /CERN
+
+# system
+
+SYSTEM  = linux
+
+# @endcode
+##EOF
Index: trunk/MagicSoft/Simulation/Corsika/GuiSimone/config.mk.osf1
===================================================================
--- trunk/MagicSoft/Simulation/Corsika/GuiSimone/config.mk.osf1	(revision 413)
+++ trunk/MagicSoft/Simulation/Corsika/GuiSimone/config.mk.osf1	(revision 413)
@@ -0,0 +1,72 @@
+##################################################################
+#
+# config.mk
+#
+# @file        config.mk
+# @title       small configuration file for Makefile
+# @author      J C Gonz\'alez
+# @email       gonzalez@mppmu.mpg.de
+# @date        Fri Mar 12 11:51:11 MET 1999
+#
+#_______________________________________________________________
+#
+# Created: Fri Mar 12 11:51:11 MET 1999
+# Author:  Jose Carlos Gonzalez
+# Purpose: Makefile for the compilation of the reflector program
+# Notes:   
+#    
+#---------------------------------------------------------------
+# $RCSfile: config.mk.osf1,v $
+# $Revision: 1.1.1.1 $
+# $Author: harald $ 
+# $Date: 2000-07-06 10:18:48 $
+##################################################################
+# @maintitle
+
+# @code
+
+# program
+
+PROGRAM = camera
+
+# compilers & tools
+
+CC            = cc
+CXX           = cxx
+F77           = f77
+
+DOCUM         = ../sus/sus
+RATE          = ../../comstat/comstat -g -p 
+
+# includes		
+
+INCLUDE       = ../../Detector/include-GENERAL
+INCLUDE_COR   = ../../Detector/include-CORSIKA
+INCLUDE_ROOT  = ${ROOTSYS}/include  
+INCLUDE_SIMO  = .
+
+OPTIM    = -O
+DEBUG    = -g
+
+# libraries
+
+ROOTLIBS =  	-L/CERN/root/lib -lNew -lCore -lCint -lHist \
+		-lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript \
+		-lMatrix -lPhysics -lm  
+
+ROOTGLIBS = 	-L/CERN/root/lib -lNew -lCore -lCint -lHist \
+		-lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript \
+		-lMatrix -lPhysics -lGui -lm  
+
+GLIBS = 	$(ROOTLIBS) $(ROOTGLIBS)
+
+
+RANLIBDIR = ../../Detector/lib
+CERNDIR = /CERN
+
+# system
+
+SYSTEM  = osf
+
+# @endcode
+##EOF
Index: trunk/MagicSoft/Simulation/Corsika/GuiSimone/simone.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Corsika/GuiSimone/simone.cxx	(revision 413)
+++ trunk/MagicSoft/Simulation/Corsika/GuiSimone/simone.cxx	(revision 413)
@@ -0,0 +1,33 @@
+//
+//
+//
+//
+//
+//
+#include <stdlib.h>
+#include "TROOT.h"
+#include "TApplication.h"
+#include <TVirtualX.h>
+
+#include <TGClient.h>   
+
+#include "MainFrameSimone.hxx"
+
+int main(int argc, char **argv)
+{
+  // initialise ROOT
+
+  TROOT simple("simple", "SIMONE - statistic of MonteCarlo");
+
+  TApplication theApp("App", &argc, argv);
+  
+  MainFrameSimone mainWin(gClient->GetRoot(), 600, 500);     
+  
+
+  theApp.Run();
+
+
+  return 0;                              
+}
+
+
