Changeset 3148 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 02/14/04 11:48:43 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r2859 r3148 54 54 55 55 ClassImp(MCerPhotEvt); 56 ClassImp(MCerPhotEvtIter); 56 57 57 58 using namespace std; … … 428 429 *fLog << warn << "MCerPhotEvt::DrawPixelContent - not available." << endl; 429 430 } 431 432 TObject *MCerPhotEvtIter::Next() 433 { 434 MCerPhotPix *pix; 435 while ((pix = (MCerPhotPix*)TObjArrayIter::Next())) 436 if (pix->IsPixelUsed()) 437 return pix; 438 return pix; 439 } -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r2958 r3148 17 17 class MGeomCam; 18 18 class MCerPhotPix; 19 class MCerPhotEvtIter; 19 20 20 21 class MCerPhotEvt : public MParContainer, public MCamEvent 21 22 { 23 friend class MCerPhotEvtIter; 22 24 private: 23 25 UInt_t fNumPixels; … … 78 80 void Clear(Option_t *opt=NULL) { Reset(); } 79 81 82 // class MCamEvent 80 83 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 81 84 void DrawPixelContent(Int_t num) const; 85 86 operator TIterator*() const; 82 87 83 88 ClassDef(MCerPhotEvt, 2) // class for an event containing cerenkov photons 84 89 }; 85 90 91 class MCerPhotEvtIter : public TObjArrayIter 92 { 93 private: 94 Bool_t fUsedOnly; 95 public: 96 MCerPhotEvtIter(const MCerPhotEvt *evt, Bool_t usedonly=kTRUE, Bool_t dir=kIterForward) : TObjArrayIter(evt->fPixels, dir), fUsedOnly(usedonly) { } 97 TObject *Next(); 98 ClassDef(MCerPhotEvtIter, 0) 99 }; 100 101 inline MCerPhotEvt::operator TIterator*() const { return new MCerPhotEvtIter(this); } 102 86 103 #endif
Note:
See TracChangeset
for help on using the changeset viewer.