ROOT  6.06/09
Reference Guide
Macros | Functions | Variables
TTreeFormula.cxx File Reference
#include "TROOT.h"
#include "TTreeFormula.h"
#include "TTree.h"
#include "TBranch.h"
#include "TBranchObject.h"
#include "TFunction.h"
#include "TClonesArray.h"
#include "TLeafB.h"
#include "TLeafC.h"
#include "TLeafObject.h"
#include "TDataMember.h"
#include "TMethodCall.h"
#include "TCutG.h"
#include "TRandom.h"
#include "TInterpreter.h"
#include "TDataType.h"
#include "TStreamerInfo.h"
#include "TStreamerElement.h"
#include "TBranchElement.h"
#include "TLeafElement.h"
#include "TArrayI.h"
#include "TAxis.h"
#include "TError.h"
#include "TVirtualCollectionProxy.h"
#include "TString.h"
#include "TTimeStamp.h"
#include "TMath.h"
#include "TVirtualRefProxy.h"
#include "TTreeFormulaManager.h"
#include "TFormLeafInfo.h"
#include "TMethod.h"
#include "TBaseClass.h"
#include "TFormLeafInfoReference.h"
#include "TEntryList.h"
#include <ctype.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <typeinfo>
#include <algorithm>
+ Include dependency graph for TTreeFormula.cxx:

Go to the source code of this file.

Macros

#define TT_EVAL_INIT
 
#define TREE_EVAL_INIT
 
#define TT_EVAL_INIT_LOOP
 
#define TREE_EVAL_INIT_LOOP
 

Functions

 ClassImp (TTreeFormula) inline static void R__LoadBranch(TBranch *br
 
Long64_t Bool_t quickLoad if (!quickLoad||(br->GetReadEntry()!=entry))
 
template<typename T >
Summing (TTreeFormula *sum)
 
template<typename T >
FindMin (TTreeFormula *arr)
 
template<typename T >
FindMax (TTreeFormula *arr)
 
template<typename T >
FindMin (TTreeFormula *arr, TTreeFormula *condition)
 
template<typename T >
FindMax (TTreeFormula *arr, TTreeFormula *condition)
 

Variables

const Int_t kMaxLen = 1024
 
Long64_t entry
 

Macro Definition Documentation

#define TREE_EVAL_INIT
Value:
const Int_t real_instance = GetRealInstance(instance,0); \
if (real_instance>=fNdata[0]) return 0; \
\
if (fAxis) { \
char * label; \
/* This portion is a duplicate (for speed reason) of the code \
located in the main for loop at "a tree string" (and in EvalStringInstance) */ \
label = (char*)GetLeafInfo(0)->GetValuePointer((TLeaf*)0x0,instance); \
Int_t bin = fAxis->FindBin(label); \
return bin-0.5; \
}
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:37
int Int_t
Definition: RtypesCore.h:41
Long64_t Bool_t quickLoad if(!quickLoad||(br->GetReadEntry()!=entry))
return
Definition: TBase64.cxx:62

Definition at line 3738 of file TTreeFormula.cxx.

Referenced by TTreeFormula::EvalInstance().

#define TREE_EVAL_INIT_LOOP
Value:
/* Now let calculate what physical instance we really need. */ \
const Int_t real_instance = GetRealInstance(instance,code); \
if (real_instance>=fNdata[code]) return 0;
int Int_t
Definition: RtypesCore.h:41
Long64_t Bool_t quickLoad if(!quickLoad||(br->GetReadEntry()!=entry))

Definition at line 3780 of file TTreeFormula.cxx.

Referenced by TTreeFormula::EvalInstance().

#define TT_EVAL_INIT
Value:
TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(0); \
\
const Int_t real_instance = GetRealInstance(instance,0); \
if (instance==0) fNeedLoading = kTRUE; \
if (real_instance>=fNdata[0]) return 0; \
\
/* Since the only operation in this formula is reading this branch, \
we are guaranteed that this function is first called with instance==0 and \
hence we are guaranteed that the branch is always properly read */ \
\
if (fNeedLoading) { \
fNeedLoading = kFALSE; \
TBranch *br = leaf->GetBranch(); \
Long64_t tentry = br->GetTree()->GetReadEntry(); \
R__LoadBranch(br,tentry,fQuickLoad); \
} \
if (fAxis) { \
char * label; \
/* This portion is a duplicate (for speed reason) of the code \
located in the main for loop at "a tree string" (and in EvalStringInstance) */ \
if (fLookupType[0]==kDirect) { \
label = (char*)leaf->GetValuePointer(); \
} else { \
label = (char*)GetLeafInfo(0)->GetValuePointer(leaf,instance); \
} \
Int_t bin = fAxis->FindBin(label); \
return bin-0.5; \
}
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:37
long long Long64_t
Definition: RtypesCore.h:69
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: Rtypes.h:92
TBranch * GetBranch() const
Definition: TLeaf.h:70
Long64_t Bool_t quickLoad if(!quickLoad||(br->GetReadEntry()!=entry))
return
Definition: TBase64.cxx:62
virtual void * GetValuePointer() const
Definition: TLeaf.h:80
const Bool_t kTRUE
Definition: Rtypes.h:91

Definition at line 3706 of file TTreeFormula.cxx.

Referenced by TTreeFormula::EvalInstance().

#define TT_EVAL_INIT_LOOP
Value:
TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(code); \
\
/* Now let calculate what physical instance we really need. */ \
const Int_t real_instance = GetRealInstance(instance,code); \
if (willLoad) { \
TBranch *branch = (TBranch*)fBranches.UncheckedAt(code); \
if (branch) { \
Long64_t treeEntry = branch->GetTree()->GetReadEntry(); \
R__LoadBranch(branch,treeEntry,fQuickLoad); \
} else if (fDidBooleanOptimization) { \
branch = leaf->GetBranch(); \
Long64_t treeEntry = branch->GetTree()->GetReadEntry(); \
if (branch->GetReadEntry() != treeEntry) branch->GetEntry( treeEntry ); \
} \
} else { \
/* In the cases where we are behind (i.e. right of) a potential boolean optimization \
this tree variable reading may have not been executed with instance==0 which would \
result in the branch being potentially not read in. */ \
if (fDidBooleanOptimization) { \
TBranch *br = leaf->GetBranch(); \
Long64_t treeEntry = br->GetTree()->GetReadEntry(); \
if (br->GetReadEntry() != treeEntry) br->GetEntry( treeEntry ); \
} \
} \
if (real_instance>=fNdata[code]) return 0;
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:37
long long Long64_t
Definition: RtypesCore.h:69
int Int_t
Definition: RtypesCore.h:41
TBranch * GetBranch() const
Definition: TLeaf.h:70
Long64_t Bool_t quickLoad if(!quickLoad||(br->GetReadEntry()!=entry))
A TTree is a list of TBranches.
Definition: TBranch.h:58

Definition at line 3752 of file TTreeFormula.cxx.

Referenced by TTreeFormula::EvalInstance().

Function Documentation

ClassImp ( TTreeFormula  )
template<typename T >
T FindMax ( TTreeFormula arr)

Definition at line 3809 of file TTreeFormula.cxx.

template<typename T >
T FindMax ( TTreeFormula arr,
TTreeFormula condition 
)

Definition at line 3856 of file TTreeFormula.cxx.

template<typename T >
T FindMin ( TTreeFormula arr)

Definition at line 3794 of file TTreeFormula.cxx.

template<typename T >
T FindMin ( TTreeFormula arr,
TTreeFormula condition 
)

Definition at line 3824 of file TTreeFormula.cxx.

Long64_t Bool_t quickLoad if ( !quickLoad||  br->GetReadEntry()!=entry)

Definition at line 102 of file TTreeFormula.cxx.

template<typename T >
T Summing ( TTreeFormula sum)

Definition at line 3787 of file TTreeFormula.cxx.

Variable Documentation

Long64_t entry

Definition at line 100 of file TTreeFormula.cxx.

Referenced by TGPopupMenu::Activate(), RooStats::MarkovChain::Add(), TUploadDataSetDlg::AddFiles(), TSpider::AddVariable(), RooStats::MarkovChain::AddWithBurnIn(), TFileDrawMap::AnimateTree(), TChainIndex::Append(), TGHtmlBrowser::Back(), TTreeViewer::BuildInterface(), TEveProjection::ChangePreScaleEntry(), ClassImp(), TParallelCoordEditor::CleanUpSelections(), TTreePlayer::CopyTree(), TRootContextMenu::CreateMenu(), TLegend::DeleteEntry(), TDocDirective::DeleteOutputFiles(), drr_func_cache_init(), drr_func_cache_push(), drr_generic_method(), drr_method_missing(), TFileDrawMap::DumpObject(), TLegend::EditEntryAttFill(), TLegend::EditEntryAttLine(), TLegend::EditEntryAttMarker(), TLegend::EditEntryAttText(), TEventList::Enter(), TMemStatShow::EventInfo1(), TMemStatShow::EventInfo2(), TTreePerfStats::FileReadEvent(), Roo1DTable::fill(), TBranchElement::Fill(), TTreeCache::FillBuffer(), TTreeCacheUnzip::FillBuffer(), TFitEditor::FillDataSetList(), RooStats::FillTree(), TGHtmlBrowser::Forward(), RooStats::MarkovChain::GetAsSparseHist(), TTree::GetChainEntryNumber(), THbookTree::GetEntry(), TLegend::GetEntry(), TEntryListBlock::GetEntry(), TBranch::GetEntry(), TBranchElement::GetEntry(), TTree::GetEntry(), THbookFile::GetEntryBranch(), TBranch::GetEntryExport(), TAlienResult::GetEntryList(), TEventIter::GetEntryNumber(), TChain::GetEntryNumber(), TTree::GetEntryNumber(), TBasket::GetEntryPointer(), TBranch::GetEvent(), TTree::GetEvent(), TAlienResult::GetFileName(), TGLiteResult::GetFileName(), THtml::TPathDefinition::GetFileNameFromInclude(), TAlienResult::GetFileNamePath(), TGLiteResult::GetFileNamePath(), TAlienResult::GetKey(), TGLiteResult::GetKey(), TGMenuBar::GetLastOnLeft(), TGNumberEntry::GetLayoutManager(), TGLVContainer::GetMaxSubnameWidth(), TLDAPServer::GetNamingContexts(), TLDAPResult::GetNext(), TFileDrawMap::GetObjectInfoDir(), TAlienResult::GetPath(), TGLiteResult::GetPath(), TLDAPServer::GetSubschemaSubentry(), TBranchElement::GetTypedValue(), TTreeTableInterface::GetValue(), TTreeTableInterface::GetValueAsString(), TBranchElement::GetValuePointer(), TGSplitButton::HandleButton(), TRootDialog::HandleKey(), TGSplitButton::HandleKey(), TGSplitButton::HandleMenu(), TGSplitButton::HandleSButton(), TTreeTableInterface::InitEntries(), TSpider::InitVariables(), TBranchElement::IsMissingCollection(), TGComboBoxPopup::KeyPressed(), TGMenuBar::Layout(), TTreeSQL::LoadTree(), TChain::LoadTree(), TTree::LoadTree(), TChain::Loop(), TGeoManager::MakeAlignablePN(), TTreeViewer::MapBranch(), TTreeViewer::NewExpression(), TSessionFrame::OnBtnAddClicked(), TWinNTSystem::OpenDirectory(), TPolyMarker3D::PaintH3(), TLegend::PaintPrimitives(), TTreeFormula::ParseWithLeaf(), TTreeSQL::PrepEntry(), TTreePlayer::Principal(), TEntryListArray::Print(), TCollection::PrintCollectionEntry(), TQUndoManager::PrintCollectionEntry(), Roo1DTable::printMultiline(), Roo1DTable::printValue(), TTreePlayer::Process(), TProofPlayer::Process(), TDocOutput::ProcessDocInDir(), TGHtmlBrowser::ProcessMessage(), TGListView::ProcessMessage(), TGListBox::ProcessMessage(), TTreePlayer::Query(), TLeafD::ReadBasket(), TLeafF::ReadBasket(), TLeafB::ReadBasket(), TLeafO::ReadBasket(), TLeafS::ReadBasket(), TLeafC::ReadBasket(), TLeafI::ReadBasket(), TLeafL::ReadBasket(), THtml::TFileSysDir::Recurse(), TLegend::RecursiveRemove(), TRootBrowser::RecursiveReparent(), XrdProofdAux::RmDir(), TFastCgi::run_func(), TLegend::SavePrimitive(), TTreePlayer::Scan(), TGeoManager::SetAlignableEntry(), TSpider::SetCurrentEntries(), TEntryListArray::SetEntry(), TGSelectBox::SetEntry(), TTreeReader::SetEntryBase(), TLegend::SetEntryLabel(), TLegend::SetEntryOption(), TTree::SetEventList(), TBranch::SetFirstEntry(), TGL5DDataSetEditor::SetIsoTabWidgets(), TAlienResult::SetKey(), TGLiteResult::SetKey(), TTreeReader::SetLastEntry(), TProofServ::SetLastEntry(), TGSplitButton::SetMenuState(), ROOT::Internal::TBranchProxyDirector::SetReadEntry(), TBranchRef::SetRequestedEntry(), TGSplitButton::SetSplit(), TSPlot::SetTreeSelection(), TMemStatShow::Show(), TFitEditor::ShowObjectName(), TEntryListArray::Subtract(), TEntryList::Subtract(), TRootDialog::TabPressed(), TSelectorDraw::TakeEstimate(), TChainIndex::TChainIndex(), TGSplitButton::TGSplitButton(), TTreeViewer::UpdateCombo(), TSessionFrame::UpdatePackages(), and TUploadDataSetDlg::UploadDataSet().

const Int_t kMaxLen = 1024