Changeset 19279


Ignore:
Timestamp:
Oct 23, 2018, 4:19:05 PM (3 months ago)
Author:
tbretz
Message:
Added TFile::ls() as an option.
File:
1 edited

Legend:

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

    r19238 r19279  
    7474        ("dry-run",        po_switch(),               "Skip any query which changes the databse (might result in consecutive failures)")
    7575        ("print-connection", po_switch(),             "Print database connection information")
     76        ("print-ls",       po_switch(),               "Calls TFile::ls()")
    7677        ("print-branches", po_switch(),               "Print the branches found in the tree")
    7778        ("print-leaves",   po_switch(),               "Print the leaves found in the tree (this is what is processed)")
     
    110111        "the tree name. It can be overwritten using --table.\n"
    111112        "\n"
     113        "To get a list of the contents (keys and trees) of a root file, you can use --print-ls. "
    112114        "The name of each column to which data is filled from a leave is obtained from "
    113115        "the leaves' names. The leave names can be checked using --print-leaves. "
     
    370372
    371373    const bool print_connection  = conf.Get<bool>("print-connection");
     374    const bool print_ls          = conf.Get<bool>("print-ls");
    372375    const bool print_branches    = conf.Get<bool>("print-branches");
    373376    const bool print_leaves      = conf.Get<bool>("print-leaves");
     
    397400    }
    398401
    399     if (verbose>0)
     402    if (verbose>0 && !print_ls)
    400403        cout << "File: " << file << endl;
     404
     405    if (print_ls)
     406    {
     407        cout << '\n';
     408        f.ls();
     409        cout << '\n';
     410    }
    401411
    402412    TTree *T = 0;
Note: See TracChangeset for help on using the changeset viewer.