Last change
on this file since 904 was 904, checked in by magicsol, 23 years ago |
The name of MMcCollectinAreaCalc class had to be updated.
|
File size:
1.3 KB
|
Line | |
---|
1 | void getCollArea(char *filename = "data/gamma_15_on.root" )
|
---|
2 | {
|
---|
3 | // FIXME: Harald, you should tell the people what the result of
|
---|
4 | // this macro really is.
|
---|
5 |
|
---|
6 | //
|
---|
7 | // first we have to create our empty lists
|
---|
8 | //
|
---|
9 | MParList parlist;
|
---|
10 | MTaskList tasklist;
|
---|
11 |
|
---|
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);
|
---|
22 |
|
---|
23 | MHMcCollectionArea *collArea = new MHMcCollectionArea();
|
---|
24 | parlist.AddToList(collArea);
|
---|
25 |
|
---|
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);
|
---|
33 |
|
---|
34 | MMcCollectionAreaCalc effi;
|
---|
35 | tasklist.AddToList(&effi);
|
---|
36 |
|
---|
37 | //
|
---|
38 | // set up the loop for the processing
|
---|
39 | //
|
---|
40 | MEvtLoop magic;
|
---|
41 | magic.SetParList(&parlist);
|
---|
42 |
|
---|
43 | //
|
---|
44 | // Start to loop over all events
|
---|
45 | //
|
---|
46 | magic.Eventloop();
|
---|
47 |
|
---|
48 | //
|
---|
49 | // Now the histogram we wanted to get out of the data is
|
---|
50 | // filled and can be displayd
|
---|
51 | //
|
---|
52 | collArea->Draw();
|
---|
53 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.