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

Last change on this file since 4043 was 4037, 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::Print(Option_t *o) const
82{
83 //loop to extract position of stars on the camera
84 TIter Next(fStars);
85 MStarLocalPos* star;
86 UInt_t starnum = 0;
87 while ((star=(MStarLocalPos*)Next()))
88 {
89 *fLog << inf << "Star[" << starnum << "] info:" << endl;
90 star->Print();
91 starnum++;
92 }
93}
Note: See TracBrowser for help on using the repository browser.