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

Last change on this file since 4245 was 4051, checked in by jlopez, 21 years ago
*** empty log message ***
File size: 2.7 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
57MStarLocalCam::~MStarLocalCam()
58{
59 fStars->SetOwner();
60 fStars->Delete();
61}
62
63// --------------------------------------------------------------------------
64//
65// Get i-th
66//
67MStarLocalPos &MStarLocalCam::operator[] (Int_t i)
68{
69 return *static_cast<MStarLocalPos*>(fStars->At(i));
70}
71
72// --------------------------------------------------------------------------
73//
74// Get i-th
75//
76const MStarLocalPos &MStarLocalCam::operator[] (Int_t i) const
77{
78 return *static_cast<MStarLocalPos*>(fStars->At(i));
79}
80
81void MStarLocalCam::Paint(Option_t *o)
82{
83 TIter Next(fStars);
84 MStarLocalPos* star;
85 while ((star=(MStarLocalPos*)Next()))
86 star->Paint(o);
87}
88
89void MStarLocalCam::Print(Option_t *o) const
90{
91 TIter Next(fStars);
92 MStarLocalPos* star;
93 UInt_t starnum = 0;
94 while ((star=(MStarLocalPos*)Next()))
95 {
96 *fLog << inf << "Star[" << starnum << "] info:" << endl;
97 star->Print(o);
98 starnum++;
99 }
100}
Note: See TracBrowser for help on using the repository browser.