source: trunk/MagicSoft/Mars/mhist/MFillHStarMap.cc@ 967

Last change on this file since 967 was 859, checked in by tbretz, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 3.1 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//////////////////////////////////////////////////////////////////////////////
26// //
27// MFillHStarMap //
28// //
29// This task fills a star map (a 2D histogram, MHStarMap) //
30// from the calculated hillas parameter (MHillas). //
31// The algorithm for this can be found in MHStarMap::Fill //
32// //
33// Input Containers: //
34// MHillas //
35// //
36// Output Containers: //
37// MHStarMap //
38// //
39//////////////////////////////////////////////////////////////////////////////
40#include "MFillHStarMap.h"
41
42#include "MLog.h"
43#include "MLogManip.h"
44#include "MHStarMap.h"
45#include "MHillas.h"
46#include "MParList.h"
47
48ClassImp(MFillHStarMap);
49
50// --------------------------------------------------------------------------
51MFillHStarMap::MFillHStarMap (const char *name, const char *title)
52{
53 *fName = name ? name : "MFillHStarMap";
54 *fTitle = title ? title : "Task to fill a StarMap";
55}
56
57// --------------------------------------------------------------------------
58Bool_t MFillHStarMap::PreProcess (MParList *pList)
59{
60 fEvt = (MHillas*)pList->FindObject("MHillas");
61 if (!fEvt)
62 {
63 *fLog << dbginf << "MHillas not found... aborting." << endl;
64 return kFALSE ;
65 }
66
67 fHistos = (MHStarMap*)pList->FindCreateObj("MHStarMap");
68 if (!fHistos)
69 return kFALSE;
70
71 return kTRUE ;
72}
73
74// --------------------------------------------------------------------------
75Bool_t MFillHStarMap::Process()
76{
77 fHistos->Fill(fEvt);
78
79 return kTRUE;
80}
81
82Bool_t MFillHStarMap::PostProcess()
83{
84 fHistos->SetReadyToSave();
85 return kTRUE;
86}
Note: See TracBrowser for help on using the repository browser.