source: trunk/MagicSoft/Mars/macros/collarea.C@ 993

Last change on this file since 993 was 988, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.0 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25void collarea(char *filename = "data/camera.root")
26{
27 // FIXME: Harald, you should tell the people what the result of
28 // this macro really is.
29
30 //
31 // first we have to create our empty lists
32 //
33 MParList parlist;
34 MTaskList tasklist;
35
36 parlist.AddToList(&tasklist);
37
38 //
39 // Setup out tasks:
40 // - First we have to read the events
41 // - Then we can fill the efficiency histograms
42 //
43 MReadTree reader("Events", filename);
44 reader.UseLeaf("fImpact");
45 reader.UseLeaf("fEnergy");
46 reader.UseLeaf("fNumFirstLevel");
47 tasklist.AddToList(&reader);
48
49 MMcCollectionAreaCalc effi;
50 tasklist.AddToList(&effi);
51
52 MTask task;
53 tasklist.AddToList(&task);
54
55 //
56 // set up the loop for the processing
57 //
58 MEvtLoop magic;
59 magic.SetParList(&parlist);
60
61 //
62 // Start to loop over all events
63 //
64 if (!magic.Eventloop())
65 return;
66
67 tasklist.PrintStatistics();
68
69 //
70 // Now the histogram we wanted to get out of the data is
71 // filled and can be displayd
72 //
73 parlist.FindObject("MHMcCollectionArea")->DrawClone();
74}
Note: See TracBrowser for help on using the repository browser.