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

Last change on this file since 3808 was 3808, checked in by jlopez, 20 years ago
*** empty log message ***
File size: 2.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 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#include "MStarLocalPos.h"
36
37#include <TList.h>
38
39
40// --------------------------------------------------------------------------
41// Default constructor.
42//
43//
44MStarLocalCam::MStarLocalCam(const char *name, const char *title)
45{
46 fName = name ? name : "MStarLocalCam";
47 fTitle = title ? title : "";
48
49 fStars = new TList;
50}
51
52MStarLocalCam::~MStarLocalCam()
53{
54 delete fStars;
55}
56
57// --------------------------------------------------------------------------
58//
59// Get i-th
60//
61MStarLocalPos &MStarLocalCam::operator[] (Int_t i)
62{
63 return *static_cast<MStarLocalPos*>(fStars->At(i));
64}
65
66// --------------------------------------------------------------------------
67//
68// Get i-th
69//
70const MStarLocalPos &MStarLocalCam::operator[] (Int_t i) const
71{
72 return *static_cast<MStarLocalPos*>(fStars->At(i));
73}
74
75void MStarLocalCam::Print(Option_t *o) const
76{
77 //loop to extract position of stars on the camera
78 TIter Next(fStars);
79 MStarLocalPos* star;
80 while ((star=(MStarLocalPos*)Next()))
81 star->Print();
82}
Note: See TracBrowser for help on using the repository browser.