source: trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.cc@ 4693

Last change on this file since 4693 was 2206, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.8 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 1/2002 <mailto:tbretz@uni-sw.gwdg.de>
19! Author(s): Wolfgang Wittek 1/2002 <mailto:wittek@mppmu.mpg.de>
20!
21! Copyright: MAGIC Software Development, 2000-2002
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27// //
28// MEnergyEstimate //
29// //
30// Task to estimate the energy //
31// //
32// //
33/////////////////////////////////////////////////////////////////////////////
34#include "MEnergyEstimate.h"
35
36#include "MParList.h"
37
38#include "MMcEvt.hxx"
39#include "MHillas.h"
40#include "MEnergyEst.h"
41
42#include "MLog.h"
43#include "MLogManip.h"
44
45ClassImp(MEnergyEstimate);
46
47using namespace std;
48
49
50// --------------------------------------------------------------------------
51//
52// Default constructor.
53//
54MEnergyEstimate::MEnergyEstimate(const char *name, const char *title)
55{
56 fName = name ? name : "MEnergyEstimate";
57 fTitle = title ? title : "Task to estimate the energy";
58
59 AddToBranchList("MMcEvt.fEnergy");
60}
61
62Int_t MEnergyEstimate::PreProcess(MParList *plist)
63{
64 fHillas = (MHillas*)plist->FindObject("MHillas");
65 if (!fHillas)
66 {
67 *fLog << err << dbginf << "MHillas not found... aborting." << endl;
68 return kFALSE;
69 }
70
71 fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
72 if (!fMcEvt)
73 {
74 *fLog << err << dbginf << "MMcEvt not found... aborting." << endl;
75 return kFALSE;
76 }
77
78 fEnergy = (MEnergyEst*)plist->FindCreateObj("MEnergyEst");
79 if (!fEnergy)
80 return kFALSE;
81
82 return kTRUE;
83}
84
85Int_t MEnergyEstimate::Process()
86{
87 //fEnergy->SetEnergy(fHillas->GetSize());
88 fEnergy->SetEnergy(fMcEvt->GetEnergy());
89 return kTRUE;
90}
Note: See TracBrowser for help on using the repository browser.