Changeset 14169 for trunk/FACT++/src


Ignore:
Timestamp:
06/13/12 14:25:42 (12 years ago)
Author:
tbretz
Message:
Improved some error messages.
File:
1 edited

Legend:

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

    r14148 r14169  
    8585    if (h->NPix != 1440)
    8686    {
    87         fMsg.Error("Number of pixels in header for run " << GetRunId() << " not 1440.");
     87        Error("Number of pixels in header for run "+to_string(GetRunId())+" not 1440.");
    8888        return false;
    8989    }
     
    9191    if (fProcessing)
    9292    {
    93         fMsg.Warn("Previous DRS calibration run not yet finished (current run " << GetRunId() << ")");
     93        Warn("Previous DRS calibration run not yet finished (current run "+to_string(GetRunId())+")");
    9494        return false;
    9595    }
     
    9797    if (fData.fStep==3)
    9898    {
    99         fMsg.Warn("DRS Calibration already finished before current run " << GetRunId() << "... please restart!");
     99        Warn("DRS Calibration already finished before current run "+to_string(GetRunId())+"... please restart!");
    100100        return false;
    101101    }
     
    105105        ostringstream msg;
    106106        msg << "Region of interest of run " << GetRunId() << " not 1024, but " << h->Nroi << " in step " << fData.fStep <<  " ... as it ought to be.";
    107         fMsg.Error(msg);
     107        Error(msg);
    108108        return false;
    109109    }
     
    218218    const size_t n = 1440*1024*4 + 1440*roi*2 + ntm*roi*2 + 3;
    219219
    220     if (vec.size()!=n+1)
    221         throw runtime_error("Size of vector does not match region-of-interest");
     220    // The vector has a fixed size
     221    //if (vec.size()!=n+1)
     222    //    throw runtime_error("Size of vector does not match region-of-interest");
    222223
    223224    ofits file(filename.c_str());
     
    265266    {
    266267        ostringstream str;
    267         str << "DRS calibration run (run=" << GetRunId() << ", step=" << fData.fStep << ", roi=" << roi << ") has 0 events.";
     268        str << "DRS calibration run (run=" << GetRunId() << ", step=" << fData.fStep << ", roi=" << fData.fRoi << ") has 0 events.";
    268269        Warn(str);
    269270    }
Note: See TracChangeset for help on using the changeset viewer.