[root] / trunk / tree / treeplayer / src / TTreeIndex.cxx Repository:
ViewVC logotype

Log of /trunk/tree/treeplayer/src/TTreeIndex.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 38501 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 18 11:44:33 2011 UTC (3 years, 10 months ago) by pcanal
File length: 19353 byte(s)
Diff to previous 38496
Prevent T[Chain|Tree]Index from finding the branches from the friend tree when looking up the value in the master/parent TTree.  This fixes <https://savannah.cern.ch/bugs/?79166>.

Revision 38496 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 18 10:04:01 2011 UTC (3 years, 10 months ago) by pcanal
File length: 18830 byte(s)
Diff to previous 38495
Update GetEntryNumberFriend to retun a Long64_t as needed (and as the other methods)

Revision 38495 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 18 09:56:36 2011 UTC (3 years, 10 months ago) by pcanal
File length: 18831 byte(s)
Diff to previous 35344
Minor clarification in documentation

Revision 35344 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 16 21:34:21 2010 UTC (4 years, 4 months ago) by pcanal
File length: 18608 byte(s)
Diff to previous 32894
Fix Coverity reports

G__ci.h: #11161 missing initialization
common.h: #11161 missing initialization
error.cxx: #20793 Array compared against 0
init.cxx: #11712 explicit null derefence
macro.cxx: #10192 missing initialization
shl.cxx: #10626,10627 constant expression result

TBranchProxy.h: #10047 unchecked return value
TTreeProxyGenerator.cxx: #10059,#10060 enum as boolean
TClassEdit.cxx: #11546,#11734 forward null pointer
TStreamerInfoWriteBuffer.cxx: #11572, #11573 forward null pointer
TTreeFormula.cxx: #11587,#11588,#11592 forward null pointer
   #11618,#11619 unckecked dynamic cast
TTreePlayer.cxx:  #11984,#11985,#11986 dereference after null check
TTreeIndex.cxx: #11596  unckecked dynamic cast
TChainIndex.cxx: #11597,#11988 unckecked dynamic cast
TOracleServer.cxx: #11898 dereference after null check
TH1.cxx: #11983 dereference after null check
TFileDrawMap.cxx: $10896 copy into fixed size buffer

Revision 32894 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 7 15:00:21 2010 UTC (4 years, 9 months ago) by pcanal
File length: 18446 byte(s)
Diff to previous 22902
Merge near indentical code in TChain::Merge, TTree::Clone and TTree::CopyEntries
into TTree::CopyEntries (and call it from the other 2 places).  Some small behavior
changes:
   TChain::Merge: no longer disable TTreeCache in fast copy mode.
   TTree::CopyEntries: also copy the TTreeIndices if any; add proper support for TChain objects; add support for fast cloning.
   TTree::CloneTree: also copy the TTreeIndices if any.

Improve the output of TTree::Scan but insert blank space whenever a value is not available because there is no proper row in a friend.
(Previously it was re-printing the previous value).  This required changeis in TTree and TChain LoadTree where fReadEntry is now 
set to -1 in case of failure to find the proper row.

Revision 22902 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 31 09:48:42 2008 UTC (6 years, 9 months ago) by rdm
File length: 18447 byte(s)
Diff to previous 21731
move tree, treeplayer and treeviewer under tree meta directory.

Revision 21731 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 16 15:16:53 2008 UTC (7 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 18447 byte(s)
Diff to previous 20882
Fix an unfortunate error in the documentation of the TTreeIndex constructor
reported by David Chamont at :http://root.cern.ch/phpBB2/viewtopic.php?t=6036

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 18429 byte(s)
Diff to previous 19826
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 18429 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 18484 byte(s)
Diff to previous 19666
remove :$ from tag line

Revision 19666 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 22 17:36:46 2007 UTC (7 years, 5 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 18494 byte(s)
Diff to previous 19116
If two chains are made friends and the files they contain do not have
the same number of entries, we need to informed the TTreeIndex of
the friend chain's tree when the main chain's tree is changed.
This correct the problem seen at http://root.cern.ch/phpBB2/viewtopic.php?p=21435

Revision 19116 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 21 19:14:21 2007 UTC (7 years, 7 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 18323 byte(s)
Diff to previous 17306
Add new method TVirtualIndex::Append
Use it to insurge that the existing indexes are properly concatenated
when doing a TTree or TChain Merge.

Revision 17306 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 12 16:03:17 2007 UTC (8 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15821 byte(s)
Diff to previous 13210
   TMath::Abs, TMath::Min, TMath::Max, TMath::Sign, TMath::Range
These functions are unfortunately not defined in a standard way in std::

This include is referenced by a new version of TMath.h.
As a result, TMath.h is back compatible with the previous version.

TMathBase.h is used in place of TMath.h in all the classes
that will go into the future miniCore library.
TMath.h and the TMath implementation will go into a new math sub-directory.

TString.h uses TMathBase.h instead of TMath.h.
As a result, it was necessary to include "TMath.h" in some classes
assuming that TMath was included via TString and using other functions
than the ones defined in TMathBase.h
 ----------------------------------------------------------------------

Revision 13210 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 11 23:21:43 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15802 byte(s)
Diff to previous 12036
Update the spacing and documentation to match the coding rule

Revision 12036 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 13 19:19:07 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15780 byte(s)
Diff to previous 11863
Add a hook to allow the refreshing of the formulas of the indices when needed

Revision 11863 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 24 20:52:33 2005 UTC (9 years, 8 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15429 byte(s)
Diff to previous 11562
Enabled the generation of the Tree index for a chain.

Revision 11562 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 12 09:26:27 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15176 byte(s)
Diff to previous 11259
From Marek Biskup:
- removed obsolete code from TTreeIndex::GetEntryNumberWithIndex and
fixed documentation.
- removed obsolete function TVirtualIndex::GetEntry(Long64_t /*entry*/)
  and TTreeIndex::GetEntry(Long64_t /*entry*/).
- cosmetics in TProofDraw

Revision 11259 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 8 05:33:30 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15844 byte(s)
Diff to previous 11046
From Philippe:
This patch solves a problem where the sizes of a collection
within a split-collection where not properly loaded (i.e.
TTreeFormula::LoadCurrentDim was not calling GetEntry on
the branch containing the collection within a collection).

Also (and independently):

To support for the cases where the user do
       tree->GetEntry(entry);
       // modify the event
       tree->GetEntry(entry);
       // User expect the event to have reverted to
       // the same state as after the first GetEntry
we insured that TBranch::GetEntry always re-stream the
data from the basket.  Similarly, TTreeFormula::EvalInstance
needs to also insure that it always re-stream the data
from the basket (Some developer uses TTreeFormula directly).

However in case, when we are guaranteed that the data pointed
to by the tree will not modified and we need to call GetEntry
several times on the same branch for the same entry,
this is a waste of time.

We are in this case for the TTreeFormula handled by
TProofDraw, TSelectorDraw and TTreeIndex.
The case where we currently have the inefficiencies are
the cases for the same branch is listed in several
distinct formulas (for example in the 1 dimension and
the selection or as an index) and the cases of
variable dimensions formulas (GetEntry called at least
once in LoadCurrentDim and once more in EvalInstance).

The attached patch solve the issue for TProofDraw,
TSelectorDraw and TTreeIndex by adding a new data member
to TTreeFormula (fQuickLoad), this can be set to tell
TTreeFormula to assume that the data is really read-only
(and hence it does not need to read the branch again is
br->GetReadEntry()==tree->GetReadEntry().

We can not solve the issue in the general case since we
can not guarantee that that data pointed will not be
modified between the call to GetNdata (hence LoadCurrentDim)
and EvalInstance.  The cost of not properly insuring is
high since it involves silently displaying incorrect data.
However LoadCurrentDim could still be improved since it does
not use the optimization used by EvalInstance which insures
that itself reads each branch only once (Fixing this for
LoadCurrentDim would no be trivial)
Note that without the fQuickLoad flag set to true, branches
that are used several time in the same formula are loaded
several times.  (With fQuickLoad set to true, they are loaded
only once).  Solving this inefficiency is a difficult tasks,
since we would need to insure that the branch is read exactly
once not matter what the value of branch->GetReadEntry is.
In addition, this could only take in consideration the formulas
within the same TTreeFormulaManager.  And this would have to
be done without any significant loss for the simple case and
for the case where we can do Boolean optimization (i.e. case
where the content of the branch is not needed to know the
final result of the formula).

Revision 11046 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 7 17:23:31 2005 UTC (9 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15612 byte(s)
Diff to previous 10714
From Philippe:
This patch insures that TTreeFormula only call GetEntry once per branch
per entry (This speeds up evaluating formula where the same branch is use
several times).

Update TTreeIndex (and hence TTree::BuildIndex) to be able to
work correctly independently of the state of the TTree object (It previously
__required__ TTree::fReadEntry to be equal to -1).

Make TTreeIndex::Print platform independent (it was not
printing correctly on windows).

Revision 10714 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 8 10:15:30 2004 UTC (10 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15541 byte(s)
Diff to previous 9551
Allow array elements in the major or/and minorname

Revision 9551 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 19 19:48:47 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15487 byte(s)
Diff to previous 9479
From Philippe:
With the attached patch, TTree::Draw now treat a Tree Friend with
an index the same way it treats an variable size array.  In particular,
if not elements can be found, the formula is invalid.

Revision 9479 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 9 16:19:28 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15574 byte(s)
Diff to previous 9473
Add additional protections in TTreeIndex constructor against impossible cases.
When such cases are detected, the TreeIndex is MakeZombie. The object will be
deleted by TTree::BuildIndex.

Revision 9473 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 9 10:55:05 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 15109 byte(s)
Diff to previous 9466
Extend the functionality of TTreeIndex::GetEntryNumberFriend to support additional
cases like a Tree Index in the friend disconnected from the parent Tree.
Add more comments in this key function explaining the steps and decisions.

Revision 9466 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 9 07:54:59 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 14252 byte(s)
Diff to previous 9465
Add an additional protection in TTreeIndex constructor in case one
of the variables in the expression is not valid.

Revision 9465 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 9 07:41:43 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 14053 byte(s)
Diff to previous 9430
Rename the FormulaP to FormulaParent (members and functions)

Revision 9430 - (view) (download) (as text) (annotate) - [select for diffs]
Added Thu Jul 8 08:08:28 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeIndex.cxx
File length: 13804 byte(s)
This new class replaces the previous Tree index code.

The class derives from the abstract interface TVirtualIndex.
It provides the same functionality as the previous code, but
in addition, it supports more complex cases.

When a Tree friend has a TTreeIndex (created as before via
TTree::BuildIndex), the friend tree and the parent Tree do not
need to have the same serial numbers.
The friend tree may have less or more events.

When getting an entry in the parent tree, the corresponding entry
in the friend will be computed via the index. Note that to support
this new feature, the parent Tree does not need an index. Only the
friend Tree must have an index. see comments in the TTreeIndex
constructor.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9