source: trunk/MagicSoft/Mars/mtemp/mifae/library/MIslands.cc@ 5463

Last change on this file since 5463 was 5186, checked in by aliu, 20 years ago
*** empty log message ***
File size: 1.6 KB
Line 
1#include "MIslands.h"
2
3#include <TList.h>
4
5#include "MLog.h"
6#include "MLogManip.h"
7
8#include "MImgIsland.h"
9
10#include "MCerPhotPix.h"
11#include "MCerPhotEvt.h"
12
13
14using namespace std;
15
16// --------------------------------------------------------------------------
17//
18// Default constructor.
19//
20MIslands::MIslands(const char *name, const char *title)
21{
22 fName = name ? name : "MIslands";
23 fTitle = title ? title : "Storage container for the island information of one event";
24
25 fIslands = new TList;
26
27}
28
29// --------------------------------------------------------------------------
30//
31// Destructor.
32//
33MIslands::~MIslands()
34{
35 fIslands->SetOwner();
36 fIslands->Delete();
37}
38
39
40// --------------------------------------------------------------------------
41//
42// Get i-th
43//
44
45MImgIsland &MIslands::operator[] (Int_t i)
46{
47 MImgIsland& isl = *static_cast<MImgIsland*>(fIslands->At(i));
48 return isl;
49}
50
51// --------------------------------------------------------------------------
52//
53// Get i-th
54//
55
56const MImgIsland &MIslands::operator[] (Int_t i) const
57{
58 return *static_cast<MImgIsland*>(fIslands->At(i));
59}
60
61
62// --------------------------------------------------------------------------
63//
64// Print the island parameters to *fLog
65//
66
67void MIslands::Print(Option_t *opt) const
68{
69 *fLog << all;
70 *fLog << "Island Parameters (" << GetName() << ")" << endl;
71
72 TIter Next(fIslands);
73 MImgIsland* isl;
74 UInt_t islnum = 0;
75 while ((isl=(MImgIsland*)Next()))
76 {
77 *fLog << inf << "*** Island #" << islnum << " parameters ***" << endl;
78 isl->Print();
79 islnum++;
80 }
81
82}
83
84
Note: See TracBrowser for help on using the repository browser.