Changeset 17069 for trunk/Mars/mdrs


Ignore:
Timestamp:
09/05/13 11:17:32 (11 years ago)
Author:
tbretz
Message:
Simplified the loop doing the step correction.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mdrs/MDrsCalibApply.cc

    r16110 r17069  
    205205        fResult->fData.resize(fPrevStart.size()*2);
    206206
    207         list<vector<Short_t>>::const_iterator it = fPrevStart.begin();
    208 
    209         for (size_t i=0; i<fPrevStart.size()*2; i++)
     207        int i=0;
     208        for (auto it=fPrevStart.begin(); it!=fPrevStart.end(); it++)
    210209        {
    211             fResult->fData[i] = DrsCalibrate::Step();
    212 
    213             const int32_t off = i%2 ? 3 : roi+10;
    214 
    215             fResult->fData[i] =
    216                 DrsCalibrate::CorrectStep(vec, fRawEvt->GetNumPixels(), roi,
    217                                           it->data(), start, off, idx);
    218 
    219             if (i%2==1)
    220                 it++;
     210            fResult->fData[i++] = DrsCalibrate::CorrectStep(vec, fRawEvt->GetNumPixles(), roi, it->data(), start, roi+10, idx);
     211            fResult->fData[i++] = DrsCalibrate::CorrectStep(vec, fRawEvt->GetNumPixles(), roi, it->data(), start, 3,      idx);
    221212        }
    222213
Note: See TracChangeset for help on using the changeset viewer.