Changeset 14148 for trunk/FACT++


Ignore:
Timestamp:
06/10/12 22:50:59 (12 years ago)
Author:
tbretz
Message:
Improved some error messages; added a warning if a run contained no events.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/DataCalib.cc

    r14075 r14148  
    8585    if (h->NPix != 1440)
    8686    {
    87         fMsg.Error("Number of pixels in header not 1440.");
     87        fMsg.Error("Number of pixels in header for run " << GetRunId() << " not 1440.");
    8888        return false;
    8989    }
     
    9191    if (fProcessing)
    9292    {
    93         fMsg.Warn("Previous DRS calibration run not yet finished!");
     93        fMsg.Warn("Previous DRS calibration run not yet finished (current run " << GetRunId() << ")");
    9494        return false;
    9595    }
     
    9797    if (fData.fStep==3)
    9898    {
    99         fMsg.Warn("DRS Calibration already finished... please restart!");
     99        fMsg.Warn("DRS Calibration already finished before current run " << GetRunId() << "... please restart!");
    100100        return false;
    101101    }
     
    104104    {
    105105        ostringstream msg;
    106         msg << "Region of interest not 1024, but " << h->Nroi << " in step " << fData.fStep <<  " ... as it ought to be.";
     106        msg << "Region of interest of run " << GetRunId() << " not 1024, but " << h->Nroi << " in step " << fData.fStep <<  " ... as it ought to be.";
    107107        fMsg.Error(msg);
    108108        return false;
     
    262262bool DataCalib::Close(RUN_TAIL *tail)
    263263{
     264    if (fNumEntries==0)
     265    {
     266        ostringstream str;
     267        str << "DRS calibration run (run=" << GetRunId() << ", step=" << fData.fStep << ", roi=" << roi << ") has 0 events.";
     268        Warn(str);
     269    }
     270
    264271    if (fData.fStep==0)
    265272    {
     
    311318
    312319            ostringstream str;
    313             str << "Wrote DRS calibration data (step=" << fData.fStep << ", roi=" << fData.fRoi << ") to '" << filename << "'";
     320            str << "Wrote DRS calibration data (run=" << GetRunId() << ", step=" << fData.fStep << ", roi=" << fData.fRoi << ") to '" << filename << "'";
    314321            Info(str);
    315322        }
    316323        catch (const exception &e)
    317324        {
    318             Error("Exception writing '"+filename+"': "+e.what());
     325            Error("Exception writing run "+to_string(GetRunId())+" '"+filename+"': "+e.what());
    319326        }
    320327    }
Note: See TracChangeset for help on using the changeset viewer.