source: trunk/MagicSoft/Mars/mstarcam/MStarCam.cc@ 6000

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