Skip to content
Snippets Groups Projects
  • Rene Brun's avatar
    a657328d
    From Philippe: · a657328d
    Rene Brun authored
    The following patch implements TTree variable alias.
    
    To use them:
            mytree->SetAlias("mult","fPx*fPy");
            mytree->Draw("mult");
    
    Note that the aliases have been added to the TTree object so that they can be persistent (with the tree) if you choose.
    
    Also note that the alias are not checked for validity until they are used in a Draw or Scan command.
    
    Existing alias are silently replaced.
    
    The new functions are:
            TTree::SetAlias
            TTree::GetAlias
            TChain::GetAlias
            TTree::GetListOfAliases
    
    This patch also adds operator= for TFormula, TF1, TF2, TF3 (it calls the respective Copy member functions).  It makes TTreeFormula::operator= private (Copy has not been implemented yet).
    
    Also some of the TFormula and TTreeFormula codes (those stored in fOper) has been aliased to enums (this renders the code is little bit more readable and searchable).
    
    TFormula and TTreeFormula have been updated to handle strings in a more flexible (and for TTreeFormula to be able to return them).
    
    
    git-svn-id: http://root.cern.ch/svn/root/trunk@6805 27541ba8-7e3a-0410-8455-c3a389f83636
    a657328d
    History
    From Philippe:
    Rene Brun authored
    The following patch implements TTree variable alias.
    
    To use them:
            mytree->SetAlias("mult","fPx*fPy");
            mytree->Draw("mult");
    
    Note that the aliases have been added to the TTree object so that they can be persistent (with the tree) if you choose.
    
    Also note that the alias are not checked for validity until they are used in a Draw or Scan command.
    
    Existing alias are silently replaced.
    
    The new functions are:
            TTree::SetAlias
            TTree::GetAlias
            TChain::GetAlias
            TTree::GetListOfAliases
    
    This patch also adds operator= for TFormula, TF1, TF2, TF3 (it calls the respective Copy member functions).  It makes TTreeFormula::operator= private (Copy has not been implemented yet).
    
    Also some of the TFormula and TTreeFormula codes (those stored in fOper) has been aliased to enums (this renders the code is little bit more readable and searchable).
    
    TFormula and TTreeFormula have been updated to handle strings in a more flexible (and for TTreeFormula to be able to return them).
    
    
    git-svn-id: http://root.cern.ch/svn/root/trunk@6805 27541ba8-7e3a-0410-8455-c3a389f83636