source: trunk/MagicSoft/Mars/mtemp/MStarLocalCam.cc@ 5245

Last change on this file since 5245 was 4294, checked in by jlopez, 20 years ago
*** empty log message ***
File size: 3.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): Javier Lopez 04/2004 <mailto:jlopez@ifae.es>
19! Author(s): Jordi Albert 04/2004 <mailto:albert@astro.uni-wuerzburg.de>
20!
21!
22! Copyright: MAGIC Software Development, 2000-2004
23!
24!
25\* ======================================================================== */
26
27/////////////////////////////////////////////////////////////////////////////
28// //
29// MStarLocalCam
30// //
31// //
32/////////////////////////////////////////////////////////////////////////////
33
34#include "MStarLocalCam.h"
35
36#include <TList.h>
37
38#include "MLog.h"
39#include "MLogManip.h"
40
41#include "MStarLocalPos.h"
42
43using namespace std;
44
45// --------------------------------------------------------------------------
46// Default constructor.
47//
48//
49MStarLocalCam::MStarLocalCam(const char *name, const char *title)
50{
51 fName = name ? name : "MStarLocalCam";
52 fTitle = title ? title : "";
53
54 fStars = new TList;
55
56 fInnerPedestalDC = 0.;
57 fOuterPedestalDC = 0.;
58 fInnerPedestalRMSDC = 0.;
59 fOuterPedestalRMSDC = 0.;
60
61}
62
63MStarLocalCam::~MStarLocalCam()
64{
65 fStars->SetOwner();
66 fStars->Delete();
67}
68
69// --------------------------------------------------------------------------
70//
71// Get i-th
72//
73MStarLocalPos &MStarLocalCam::operator[] (Int_t i)
74{
75 MStarLocalPos& star = *static_cast<MStarLocalPos*>(fStars->At(i));
76 return star;
77}
78
79// --------------------------------------------------------------------------
80//
81// Get i-th
82//
83const MStarLocalPos &MStarLocalCam::operator[] (Int_t i) const
84{
85 return *static_cast<MStarLocalPos*>(fStars->At(i));
86}
87
88void MStarLocalCam::Paint(Option_t *o)
89{
90 TIter Next(fStars);
91 MStarLocalPos* star;
92 while ((star=(MStarLocalPos*)Next()))
93 star->Paint(o);
94}
95
96void MStarLocalCam::Print(Option_t *o) const
97{
98 *fLog << inf << "DCs baseline:" << endl;
99 *fLog << inf << " Inner Pixels Mean pedestal \t" << setw(4) << fInnerPedestalDC << " uA and RMS " << setw(4) << fInnerPedestalRMSDC << " uA for DCs" << endl;
100 *fLog << inf << " Outer Pixels Mean pedestal \t" << setw(4) << fOuterPedestalDC << " uA and RMS " << setw(4) << fOuterPedestalRMSDC << " uA for DCs" << endl;
101
102 TIter Next(fStars);
103 MStarLocalPos* star;
104 UInt_t starnum = 0;
105 while ((star=(MStarLocalPos*)Next()))
106 {
107 *fLog << inf << "Star[" << starnum << "] info:" << endl;
108 star->Print(o);
109 starnum++;
110 }
111}
Note: See TracBrowser for help on using the repository browser.