Ignore:
Timestamp:
03/20/01 17:25:33 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/readCT1.C

    r655 r695  
    11void readCT1()
    22{
    3     MParList  *plist = new MParList() ;
     3    MParList plist;
    44
    5     MCT1ReadAscii *readct1 = new MCT1ReadAscii("CT1_99_on1.dat") ;
     5    MGeomCamMagic camct1;
     6    MHillas       hillas;
     7    MTaskList     tlist;
    68
    7     if (!readct1->PreProcess(plist))
     9    plist->AddToList(&camct1);
     10    plist->AddToList(&hillas);
     11    plist->AddToList(&tlist);
     12
     13    MCT1ReadAscii readct1("CT1_99_on1.dat") ;
     14    MHillasCalc hcalc;
     15
     16    tlist.AddToList(&readct1);
     17    tlist.AddToList(&hcalc);
     18
     19    MEvtLoop evtloop;
     20    evtloop.SetParList(&plist);
     21
     22    if (!evtloop.PreProcess())
    823        return;
    924
    10     MCerPhotEvt *phevt = (MCerPhotEvt*)plist->FindObject("MCerPhotEvt");
     25    MCerPhotEvt &phevt = *(MCerPhotEvt*)plist->FindObject("MCerPhotEvt");
    1126
    1227    Int_t icount = 0 ;
    13     MCamDisplay display(0) ;
     28    MCamDisplay display(&camct1) ;
    1429
    15     while ( readct1->Process() )
     30    while (readct1.Process())
    1631    {
    1732        cout << "Event: " << icount++  << endl  ;
    1833
    19         if (icount >= 45 )
    20         {
    21             display->DrawPhotNum( phevt ) ;
     34        if (icount < 45 )
     35            continue;
    2236
    23             gClient->HandleInput();
    24             if(getchar()=='q')
    25                 break;
     37        display.DrawPhotNum(&phevt);
     38        gClient->HandleInput();
     39        if(getchar()=='q')
     40            break;
    2641
    27             phevt->CleanLevel1() ;
    28             phevt->CleanLevel2() ;
    29             display->DrawPhotNum( phevt ) ;
    30             gClient->HandleInput();
    31             if(getchar()=='q')
    32                 break;
     42        phevt.CleanLevel1();
     43        phevt.CleanLevel2();
     44        display.DrawPhotNum(&phevt);
     45        gClient->HandleInput();
     46        if(getchar()=='q')
     47            break;
    3348
    34             phevt->CleanLevel3() ;
     49        phevt.CleanLevel3();
    3550
    36             display->DrawPhotNum( phevt ) ;
    37             gClient->HandleInput();
    38             if(getchar()=='q')
    39                 break;
    40         }
     51        hcalc.Process();
     52
     53        hillas.Print();
     54        hillas.Draw();
     55
     56        display.DrawPhotNum(&phevt);
     57
     58        gClient->HandleInput();
     59        if(getchar()=='q')
     60            break;
     61
     62        hillas.Clear();
    4163    }
    4264
    43     readct1->PostProcess();
     65    evtloop.PostProcess();
    4466}
Note: See TracChangeset for help on using the changeset viewer.