Changeset 6924 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 04/11/05 16:15:08 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc
r6499 r6924 46 46 // through. 47 47 // 48 MMatrixLoop::MMatrixLoop(MHMatrix *mat, const char *name, const char *title) : fMatrix(mat) 48 MMatrixLoop::MMatrixLoop(MHMatrix *mat, const char *name, const char *title) : fMatrix(mat), fOperationMode(kDefault) 49 49 { 50 50 fName = name ? name : gsDefName.Data(); … … 75 75 Int_t MMatrixLoop::PreProcess(MParList *plist) 76 76 { 77 fNumRow = 0;77 fNumRow = fOperationMode==kOdd ? 1 : 0; 78 78 79 79 return fMatrix ? kTRUE : kFALSE; … … 87 87 Int_t MMatrixLoop::Process() 88 88 { 89 return fMatrix->SetNumRow(fNumRow++); 89 const Int_t rc = fMatrix->SetNumRow(fNumRow); 90 fNumRow += fOperationMode==kDefault ? 1 : 2; 91 return rc; 90 92 } -
trunk/MagicSoft/Mars/manalysis/MMatrixLoop.h
r6499 r6924 10 10 class MMatrixLoop : public MRead 11 11 { 12 public: 13 enum OperationMode_t { 14 kDefault, 15 kEven, 16 kOdd 17 }; 12 18 private: 13 19 // MMatrixLoop … … 17 23 MHMatrix *fMatrix; 18 24 Int_t fNumRow; //! Number of dimensions of histogram 25 26 Byte_t fOperationMode; 19 27 20 28 // MRead … … 33 41 MMatrixLoop(MHMatrix *mat, const char *name=NULL, const char *title=NULL); 34 42 43 void SetOperationMode(OperationMode_t mode) { fOperationMode = mode; } 44 35 45 ClassDef(MMatrixLoop, 0) // Task 'reading' events from a MHMatrix 36 46 };
Note:
See TracChangeset
for help on using the changeset viewer.