{{
  
  //  load the shared lib
  gSystem->Load("lib/mars.so") ; 
  
  MTaskList *tlist = new MTaskList() ; 
  MParList  *plist = new MParList() ; 

  //
  
  MNphotEvent *phevt = new MNphotEvent() ; 


  plist->AddToList( phevt ) ; 
  

  //MReadCT1Ascii *readct1 = new MReadCT1Ascii("/hd10/www/Anal_MAGIC/MCCT1_99_ga20.dat") ; 

  MReadCT1Ascii *readct1 = new MReadCT1Ascii("/hd10/www/Anal_MAGIC/CT1_99_on1.dat") ; 

  cout << readct1->PreProcess(plist) << endl ; 

  Int_t icount = 0 ; 

  MCamDisplay display(0) ; 

  //display.SetAutoScale(kFALSE) ; 

  while ( readct1->Process() == kTRUE )
    {
      cout << "Event: " << icount++  << endl  ;
      
      if ( icount == 3 ) { 
	phevt->Print() ;
      } 

      display->Draw( phevt )  ; 
      // display->DrawError( phevt )  ; 

      gClient->HandleInput();   
      
      if(getchar()=='q')
       	break;
    } 

  cout << readct1->PostProcess() << endl ; 
}}

