Skip to content
Snippets Groups Projects
  • Rene Brun's avatar
    32b8056e
    From Philippe: · 32b8056e
    Rene Brun authored
    This patch implements support for the accessing the collection object in
    TTreeFormula:
    
    //     Accessing collection objects
    //     ============================
    //
    //  TTree::Draw default's handling of collections is to assume that any
    //  request on a collection pertain to it content.  For example, if fTracks
    //  is a collection of Track objects, the following:
    //      tree->Draw("event.fTracks.fPx");
    //  will plot the value of fPx for each Track objects inside the collection.
    //  Also
    //     tree->Draw("event.fTracks.size()");
    //  would plot the result of the member function Track::size() for each
    //  Track object inside the collection.
    //  To access information about the collection itself, TTree::Draw support
    //  the '@' notation.  If a variable which points to a collection is
    prefixed
    //  or postfixed with '@', the next part of the expression will pertain to
    //  the collection object.  For example:
    //     tree->Draw("event.@fTracks.size()");
    //  will plot the size of the collection refered to by fTracks (i.e the
    number
    //  of Track objects).
    
    
    git-svn-id: http://root.cern.ch/svn/root/trunk@11309 27541ba8-7e3a-0410-8455-c3a389f83636
    32b8056e
    History
    From Philippe:
    Rene Brun authored
    This patch implements support for the accessing the collection object in
    TTreeFormula:
    
    //     Accessing collection objects
    //     ============================
    //
    //  TTree::Draw default's handling of collections is to assume that any
    //  request on a collection pertain to it content.  For example, if fTracks
    //  is a collection of Track objects, the following:
    //      tree->Draw("event.fTracks.fPx");
    //  will plot the value of fPx for each Track objects inside the collection.
    //  Also
    //     tree->Draw("event.fTracks.size()");
    //  would plot the result of the member function Track::size() for each
    //  Track object inside the collection.
    //  To access information about the collection itself, TTree::Draw support
    //  the '@' notation.  If a variable which points to a collection is
    prefixed
    //  or postfixed with '@', the next part of the expression will pertain to
    //  the collection object.  For example:
    //     tree->Draw("event.@fTracks.size()");
    //  will plot the size of the collection refered to by fTracks (i.e the
    number
    //  of Track objects).
    
    
    git-svn-id: http://root.cern.ch/svn/root/trunk@11309 27541ba8-7e3a-0410-8455-c3a389f83636
dt_MakeRef.C 11.72 KiB