Changeset 13165 for trunk/FACT++


Ignore:
Timestamp:
03/22/12 11:04:20 (13 years ago)
Author:
tbretz
Message:
Added some improved output.
File:
1 edited

Legend:

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

    r12989 r13165  
    879879    int Track(const EventImp &evt)
    880880    {
     881        if (evt.GetSize()<=17)
     882        {
     883            ostringstream msg;
     884            msg << "Track - Received event has " << evt.GetSize() << " bytes, but expected at least 17.";
     885            T::Fatal(msg);
     886            return false;
     887        }
     888
     889        if (evt.Get<char>(evt.GetSize()-1)!='\0')
     890            T::Warn("Track - It seems that the string is not zero-terminated.");
     891
    881892        const double *dat = evt.Ptr<double>();
    882893        const string name = evt.Ptr<char>(16);
     
    886897            return T::Error("Source '"+name+"' not found in list.");
    887898
    888         const double &ra   = it->second.first;
    889         const double &dec  = it->second.second;
     899        const double &ra  = it->second.first;
     900        const double &dec = it->second.second;
    890901
    891902        return StartWobble(ra, dec, dat[0], dat[1], name);
Note: See TracChangeset for help on using the changeset viewer.