ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/Utils/src/SimpleTable.cc
(Generate patch)

Comparing UserCode/MitAna/Utils/src/SimpleTable.cc (file contents):
Revision 1.1 by loizides, Fri Jan 23 07:34:34 2009 UTC vs.
Revision 1.2 by loizides, Fri Jan 23 08:46:48 2009 UTC

# Line 39 | Line 39 | SimpleTable::SimpleTable(const char *inp
39    TString name;
40    TString value;
41    while(!in.eof()) {
42 <    in >> name >> value;
43 <    if ((name.IsNull()) || name.BeginsWith("#"))
42 >    in >> name;
43 >    if ((name.IsNull()) || name.BeginsWith("#")) {
44 >      in.getline(dummy,1024);
45        continue;
46 +    }
47 +    in >> value;
48      in.getline(dummy,1024);
49  
50      TFormula fval("formula",value);
# Line 57 | Line 60 | Double_t SimpleTable::Get(const char *na
60  
61    const MyParameter *p = dynamic_cast<const MyParameter*>(fTable.FindObject(name));
62    
63 <  if(p)
63 >  if(!p)
64      Fatal("Get", "Could not get value for given name %s", name);
65  
66    return p->GetVal();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines