Ignore:
Timestamp:
02/09/09 14:14:59 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc

    r9243 r9309  
    154154    // average hit rate
    155155    const UInt_t npix = fAPDs.GetEntriesFast();
     156
     157    // Check if we can safely proceed (this can fail if we either haven't been
     158    // ReInit'ed or the max index in MPhotonStatistics is wrong)
     159    if ((Int_t)npix<fStat->GetMaxIndex())
     160    {
     161        *fLog << err << "ERROR - MSimAPD::Process: Only " << npix << " APDs initialized. At least " << fStat->GetMaxIndex() << " needed... abort." << endl;
     162        return kERROR;
     163    }
     164
    156165    for (UInt_t idx=0; idx<npix; idx++)
    157166        static_cast<APD*>(fAPDs.UncheckedAt(idx))->FillRandom(fFreq, fStat->GetTimeFirst());
Note: See TracChangeset for help on using the changeset viewer.