Documentation

Overview

    Package rsql provides a convenient access to ROOT files/trees as a database.

    Index

    Examples

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Scan

    func Scan(tree rtree.Tree, query string, f interface{}) error

      Scan executes a query against the given tree and runs the function f within that context.

      Example
      Output:
      
      tree["two"]: [1.1 2.2 3.3 4.4]
      
      Example (NVars)
      Output:
      
      tree["one"]: [1 2 3 4]
      tree["two"]: [1.1 2.2 3.3 4.4]
      tree["three"]: ["uno" "dos" "tres" "quatro"]
      

      func ScanH1D

      func ScanH1D(tree rtree.Tree, query string, h *hbook.H1D) (*hbook.H1D, error)

        ScanH1D executes a query against the tree and fills the histogram with the results of the query. If h is nil, a (100-bins, xmin, xmax+ULP) histogram is created, where xmin and xmax are inferred from the content of the underlying database.

        Example
        Output:
        
        entries: 4
        x-axis: (min=1.1, max=4.400000000000001)
        x-mean: 2.75
        x-std-dev: 1.4200938936093859
        x-std-err: 0.7100469468046929
        
        Example (WithH1D)
        Output:
        
        entries: 4
        x-axis: (min=0, max=10)
        x-mean: 2.75
        x-std-dev: 1.4200938936093859
        x-std-err: 0.7100469468046929
        

        func ScanH2D

        func ScanH2D(tree rtree.Tree, query string, h *hbook.H2D) (*hbook.H2D, error)

          ScanH2D executes a query against the ntuple and fills the histogram with the results of the query. If h is nil, a (100-bins, xmin, xmax+ULP) (100-bins, ymin, ymax+ULP) 2d-histogram is created, where xmin, xmax and ymin,ymax are inferred from the content of the underlying database.

          Example
          Output:
          
          entries: 4
          x-axis: (min=1, max=4.000000000000001)
          x-mean: 2.5
          x-std-dev: 1.2909944487358056
          x-std-err: 0.6454972243679028
          y-axis: (min=1.1, max=4.400000000000001)
          y-mean: 2.75
          y-std-dev: 1.4200938936093859
          y-std-err: 0.7100469468046929
          
          Example (WithH2D)
          Output:
          
          entries: 4
          x-axis: (min=0, max=10)
          x-mean: 2.5
          x-std-dev: 1.2909944487358056
          x-std-err: 0.6454972243679028
          y-axis: (min=0, max=10)
          y-mean: 2.75
          y-std-dev: 1.4200938936093859
          y-std-err: 0.7100469468046929
          

          Types

          This section is empty.

          Source Files

          Directories

          Path Synopsis
          Package rsqldrv registers a database/sql/driver.Driver implementation for ROOT files.
          Package rsqldrv registers a database/sql/driver.Driver implementation for ROOT files.