Ignore:
Timestamp:
04/11/05 16:15:08 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc

    r6499 r6924  
    4646//  through.
    4747//
    48 MMatrixLoop::MMatrixLoop(MHMatrix *mat, const char *name, const char *title) : fMatrix(mat)
     48MMatrixLoop::MMatrixLoop(MHMatrix *mat, const char *name, const char *title) : fMatrix(mat), fOperationMode(kDefault)
    4949{
    5050    fName  = name  ? name  : gsDefName.Data();
     
    7575Int_t MMatrixLoop::PreProcess(MParList *plist)
    7676{
    77     fNumRow = 0;
     77    fNumRow = fOperationMode==kOdd ? 1 : 0;
    7878
    7979    return fMatrix ? kTRUE : kFALSE;
     
    8787Int_t MMatrixLoop::Process()
    8888{
    89     return fMatrix->SetNumRow(fNumRow++);
     89    const Int_t rc = fMatrix->SetNumRow(fNumRow);
     90    fNumRow += fOperationMode==kDefault ? 1 : 2;
     91    return rc;
    9092}
  • trunk/MagicSoft/Mars/manalysis/MMatrixLoop.h

    r6499 r6924  
    1010class MMatrixLoop : public MRead
    1111{
     12public:
     13    enum OperationMode_t {
     14        kDefault,
     15        kEven,
     16        kOdd
     17    };
    1218private:
    1319    // MMatrixLoop
     
    1723    MHMatrix *fMatrix;
    1824    Int_t     fNumRow;    //! Number of dimensions of histogram
     25
     26    Byte_t fOperationMode;
    1927
    2028    // MRead
     
    3341    MMatrixLoop(MHMatrix *mat, const char *name=NULL, const char *title=NULL);
    3442
     43    void SetOperationMode(OperationMode_t mode) { fOperationMode = mode; }
     44
    3545    ClassDef(MMatrixLoop, 0) // Task 'reading' events from a MHMatrix
    3646};
Note: See TracChangeset for help on using the changeset viewer.