Ignore:
Timestamp:
04/18/01 16:26:42 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r705 r753  
    11void getCollArea(char *filename = "/big0/Maggi/CamData/Gamma/gamma_15_on.root" )
    22{
    3  
    4   MParList  *parlist  = new MParList() ;
    5   MTaskList *tasklist = new MTaskList() ;
    6  
    7   MMcEvt *mcEvt = new MMcEvt() ;
    8   parlist->AddToList( mcEvt ) ;
     3    // FIXME: Harald, you should tell the people what the result of
     4    // this macro really is.
    95
    10   MMcTrig *McTrig = new MMcTrig() ;
    11   parlist->AddToList( McTrig ) ;
     6    //
     7    // first we have to create our empty lists
     8    //
     9    MParList  parlist;
     10    MTaskList tasklist;
    1211
    13   MCollArea *collArea = new MCollArea() ;
    14   parlist->AddToList( collArea ) ;
     12    //
     13    // Setup the parameter list.
     14    //  - we need to create MCollArea only. The other containers
     15    //    are created automatically without loss - we don't have to
     16    //    access them-
     17    //  - MCollArea must be created by us because we need the pointer
     18    //    to it and if it would get created automatically it would also be
     19    //    deleted automatically
     20    //
     21    parlist.AddToList(&tasklist);
    1522
     23    MCollArea *collArea = new MCollArea();
     24    parlist.AddToList(collArea);
    1625
    17   MReadTree reader( "Events", filename) ;
    18   tasklist->AddToList( &reader ) ;
     26    //
     27    // Setup out tasks:
     28    //  - First we have to read the events
     29    //  - Then we can fill the efficiency histograms
     30    //
     31    MReadTree reader("Events", filename);
     32    tasklist.AddToList(&reader);
    1933
    20   MCollAreaTrigger  effi ;
    21   tasklist->AddToList( &effi) ;
    22  
    23   parlist.AddToList( tasklist);
     34    MCollAreaTrigger effi;
     35    tasklist.AddToList(&effi);
    2436
    25   tasklist->Print() ;
     37    //
     38    // set up the loop for the processing
     39    //
     40    MEvtLoop magic;
     41    magic.SetParList(&parlist);
    2642
    27   //    set up the loop for the processing
    28  
    29   MEvtLoop magic;
    30   magic.SetParList( parlist );
     43    //
     44    // Start to loop over all events
     45    //
     46    magic.Eventloop();
    3147
    32 
    33   magic.Eventloop() ;
    34 
    35   collArea->Draw() ;
    36  
     48    //
     49    // Now the histogram we wanted to get out of the data is
     50    // filled and can be displayd
     51    //
     52    collArea->Draw();
    3753}
Note: See TracChangeset for help on using the changeset viewer.