Changeset 753 for trunk/MagicSoft/Mars/macros/getCollArea.C
- Timestamp:
- 04/18/01 16:26:42 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/getCollArea.C
r705 r753 1 1 void getCollArea(char *filename = "/big0/Maggi/CamData/Gamma/gamma_15_on.root" ) 2 2 { 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. 9 5 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; 12 11 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); 15 22 23 MCollArea *collArea = new MCollArea(); 24 parlist.AddToList(collArea); 16 25 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); 19 33 20 MCollAreaTrigger effi ; 21 tasklist->AddToList( &effi) ; 22 23 parlist.AddToList( tasklist); 34 MCollAreaTrigger effi; 35 tasklist.AddToList(&effi); 24 36 25 tasklist->Print() ; 37 // 38 // set up the loop for the processing 39 // 40 MEvtLoop magic; 41 magic.SetParList(&parlist); 26 42 27 // set up the loop for the processing28 29 MEvtLoop magic;30 magic.SetParList( parlist);43 // 44 // Start to loop over all events 45 // 46 magic.Eventloop(); 31 47 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(); 37 53 }
Note:
See TracChangeset
for help on using the changeset viewer.