Last change
on this file since 738 was 706, checked in by tbretz, 24 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Line | |
---|
1 | /////////////////////////////////////////////////////////////////////////////
|
---|
2 | // //
|
---|
3 | // MHillas Calc //
|
---|
4 | // //
|
---|
5 | /////////////////////////////////////////////////////////////////////////////
|
---|
6 |
|
---|
7 | #include "MHillasCalc.h"
|
---|
8 |
|
---|
9 | #include "MParList.h"
|
---|
10 |
|
---|
11 | #include "MHillas.h"
|
---|
12 | #include "MCerPhotEvt.h"
|
---|
13 |
|
---|
14 | #include "MLog.h"
|
---|
15 | #include "MLogManip.h"
|
---|
16 |
|
---|
17 | ClassImp(MHillasCalc)
|
---|
18 |
|
---|
19 | MHillasCalc::MHillasCalc(const char *name, const char *title)
|
---|
20 | {
|
---|
21 | *fName = name ? name : "MHillasCalc";
|
---|
22 | *fTitle = title ? title : "Task to calculate Hillas parameters";
|
---|
23 | }
|
---|
24 |
|
---|
25 | Bool_t MHillasCalc::PreProcess( MParList *pList )
|
---|
26 | {
|
---|
27 | fCerPhotEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
|
---|
28 | if (!fCerPhotEvt)
|
---|
29 | {
|
---|
30 | *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl;
|
---|
31 | return kFALSE;
|
---|
32 | }
|
---|
33 |
|
---|
34 | fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam");
|
---|
35 | if (!fGeomCam)
|
---|
36 | {
|
---|
37 | *fLog << dbginf << "MGeomCam (Camera Geometry) missing in Parameter List... aborting." << endl;
|
---|
38 | return kFALSE;
|
---|
39 | }
|
---|
40 |
|
---|
41 | fHillas = (MHillas*)pList->FindCreateObj("MHillas");
|
---|
42 | if (!fHillas)
|
---|
43 | return kFALSE;
|
---|
44 |
|
---|
45 | return kTRUE;
|
---|
46 | }
|
---|
47 |
|
---|
48 | Bool_t MHillasCalc::Process()
|
---|
49 | {
|
---|
50 | //
|
---|
51 | // If you want do complex descisions inside the calculations
|
---|
52 | // we must move the calculation code inside this function
|
---|
53 | //
|
---|
54 | // If the calculation wasn't sucessfull skip this event
|
---|
55 | //
|
---|
56 | return fHillas->Calc(*fGeomCam, *fCerPhotEvt) ? kTRUE : kCONTINUE;
|
---|
57 | }
|
---|
58 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.