| 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 | 
 | 
|---|
| 14 | using namespace std;
 | 
|---|
| 15 | 
 | 
|---|
| 16 | // --------------------------------------------------------------------------
 | 
|---|
| 17 | //
 | 
|---|
| 18 | // Default constructor.
 | 
|---|
| 19 | //
 | 
|---|
| 20 | MIslands::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 | //
 | 
|---|
| 33 | MIslands::~MIslands()
 | 
|---|
| 34 | {
 | 
|---|
| 35 |    fIslands->SetOwner();
 | 
|---|
| 36 |    fIslands->Delete();
 | 
|---|
| 37 | }
 | 
|---|
| 38 | 
 | 
|---|
| 39 | 
 | 
|---|
| 40 | // --------------------------------------------------------------------------
 | 
|---|
| 41 | //
 | 
|---|
| 42 | // Get i-th
 | 
|---|
| 43 | //
 | 
|---|
| 44 | 
 | 
|---|
| 45 | MImgIsland &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 | 
 | 
|---|
| 56 | const 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 |  
 | 
|---|
| 67 | void 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.