Changeset 9901 for trunk


Ignore:
Timestamp:
08/30/10 09:52:12 (14 years ago)
Author:
tbretz
Message:
Added the possibility of having comments in MLut.
Location:
trunk/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/Changelog

    r9900 r9901  
    2626   * mgeom/MGeomCamFACT.cc:
    2727     - changed default distance from 4.8887 to 4.90
     28
     29   * mbase/MLut.cc:
     30     - added possibility to have comment (ignored) lines
    2831
    2932
  • trunk/Mars/mbase/MLut.cc

    r9518 r9901  
    286286//  The lines can have a different number of entries.
    287287//
     288//  Lines which first(!) character is a # are ignored (as they are not
     289//  existing in the file)
     290//
    288291Int_t MLut::ReadStream(istream &fin)
    289292{
     
    293296
    294297    Int_t n = 0;
     298    Int_t l = 0;
    295299
    296300    while (1)
     
    301305            break;
    302306
     307        l++;
     308
     309        if (line[0]=='#')
     310            continue;
     311
    303312        n++;
    304313
    305314        if (line.Contains(reg))
    306315        {
    307             gLog << warn << "WARNING - MLut::ReadStream: Line #" << n << " contains invalid character... ignored." << endl;
     316            gLog << warn << "WARNING - MLut::ReadStream: Line #" << l << " contains invalid character... ignored." << endl;
    308317            continue;
    309318        }
Note: See TracChangeset for help on using the changeset viewer.