Ignore:
Timestamp:
10/27/19 20:18:28 (5 years ago)
Author:
tbretz
Message:
Alias on two argument functions does not work with root 5.24/28 but 6.14/04
File:
1 edited

Legend:

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

    r19811 r19816  
    113113        "   --add.Area='TMath::TwoPi()*Width*Length'\n"
    114114        "\n"
     115#if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
     116        "Note that functions which require two arguments (e.g. atan2) can be used in "
     117        "a column (i.e. with --add) but can not be references in an alias.\n"
     118        "\n"
     119#endif
    115120        "Sometimes leaf names might be quite unconvenient like MTime.fTime.fMilliSec or "
    116121        "just MHillas.fWidth. To allow to simplify column names, regular expressions "
     
    205210        {
    206211            cerr << "File '" << path << "' is not writable." << endl;
    207             return 7;
     212            return 8;
    208213        }
    209214
     
    211216        {
    212217            cerr << "File '" << path << "' already exists." << endl;
    213             return 8;
     218            return 9;
    214219        }
    215220        else
     
    518523        const string val  = conf.Get<string>(*it);
    519524
     525#if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
     526        if (val.find_first_of(',')!=string::npos)
     527        {
     528            cerr << "\nERROR - Alias contains comma... functions with two arguments do not work as alias in root 5!\n";
     529            cerr << "   " << name << " = " << val << endl;
     530            return 2;
     531        }
     532#endif
     533
    520534        if (verbose>0)
    521535            cout << "Alias: " << name << " = " << val << endl;
     
    525539            cerr << "\nERROR - Alias could not be established!\n";
    526540            cerr << "   " << name << " = " << val << endl;
    527             return 2;
     541            return 3;
    528542        }
    529543    }
     
    540554    {
    541555        cerr << "Compilation of Selector failed!" << endl;
    542         return 3;
     556        return 4;
    543557    }
    544558    selector.SetQuickLoad(kTRUE);
     
    565579        {
    566580            cerr << "Compilation of Column failed!" << endl;
    567             return 4;
     581            return 5;
    568582        }
    569583        form->SetQuickLoad(kTRUE);
     
    597611        {
    598612            cerr << "Failed to enable branch '" << L->GetName() << "' (type unknown)" << endl;
    599             return 5;
     613            return 6;
    600614        }
    601615
     
    604618        {
    605619            cerr << "Failed to enable branch '" << L->GetName() << "' (strange array size)" << endl;
    606             return 6;
     620            return 7;
    607621        }
    608622
Note: See TracChangeset for help on using the changeset viewer.