source: trunk/MagicSoft/Mars/macros/getCollArea.C@ 948

Last change on this file since 948 was 948, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.3 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
25
26void getCollArea(char *filename = "data/gamma_15_on.root" )
27{
28 // FIXME: Harald, you should tell the people what the result of
29 // this macro really is.
30
31 //
32 // first we have to create our empty lists
33 //
34 MParList parlist;
35 MTaskList tasklist;
36
37 //
38 // Setup the parameter list.
39 // - we need to create MCollArea only. The other containers
40 // are created automatically without loss - we don't have to
41 // access them-
42 // - MCollArea must be created by us because we need the pointer
43 // to it and if it would get created automatically it would also be
44 // deleted automatically
45 //
46 parlist.AddToList(&tasklist);
47
48 MHMcCollectionArea *collArea = new MHMcCollectionArea();
49 parlist.AddToList(collArea);
50
51 //
52 // Setup out tasks:
53 // - First we have to read the events
54 // - Then we can fill the efficiency histograms
55 //
56 MReadTree reader("Events", filename);
57 tasklist.AddToList(&reader);
58
59 MMcCollectionAreaCalc effi;
60 tasklist.AddToList(&effi);
61
62 //
63 // set up the loop for the processing
64 //
65 MEvtLoop magic;
66 magic.SetParList(&parlist);
67
68 //
69 // Start to loop over all events
70 //
71 if (!magic.Eventloop())
72 return;
73
74 //
75 // Now the histogram we wanted to get out of the data is
76 // filled and can be displayd
77 //
78 collArea->Draw();
79}
Note: See TracBrowser for help on using the repository browser.