source: branches/removing_cpp11_features/mtemp/mifae/library/MIslands.cc@ 19758

Last change on this file since 19758 was 5879, checked in by rico, 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 fIslands->SetOwner();
27}
28
29// --------------------------------------------------------------------------
30//
31// Destructor.
32//
33MIslands::~MIslands()
34{
35 fIslands->Delete();
36}
37
38
39// --------------------------------------------------------------------------
40//
41// Get i-th
42//
43
44MImgIsland &MIslands::operator[] (Int_t i)
45{
46 MImgIsland& isl = *static_cast<MImgIsland*>(fIslands->At(i));
47 return isl;
48}
49
50// --------------------------------------------------------------------------
51//
52// Get i-th
53//
54
55const MImgIsland &MIslands::operator[] (Int_t i) const
56{
57 return *static_cast<MImgIsland*>(fIslands->At(i));
58}
59
60
61// --------------------------------------------------------------------------
62//
63// Print the island parameters to *fLog
64//
65
66void MIslands::Print(Option_t *opt) const
67{
68 *fLog << all;
69 *fLog << "Island Parameters (" << GetName() << ")" << endl;
70
71 TIter Next(fIslands);
72 MImgIsland* isl;
73 UInt_t islnum = 0;
74 while ((isl=(MImgIsland*)Next()))
75 {
76 *fLog << inf << "*** Island #" << islnum << " parameters ***" << endl;
77 isl->Print();
78 islnum++;
79 }
80
81}
82
83
Note: See TracBrowser for help on using the repository browser.