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

Log of /trunk/tree/tree/src/TChain.cxx

Parent Directory Parent Directory


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

Revision 47982 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 11 23:09:22 2012 UTC (2 years, 1 month ago) by pcanal
File length: 92222 byte(s)
Diff to previous 46324
More FLT_MAX to DBL_MAX updates

Revision 46324 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 4 21:03:48 2012 UTC (2 years, 3 months ago) by pcanal
File length: 92222 byte(s)
Diff to previous 46069
From 'Will E. Coyote', make ESetBranchAddressStatus public and have TChain::SetBranchAddress return kMissingBranch when it can tell

Revision 46069 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:55:20 2012 UTC (2 years, 4 months ago) by pcanal
File length: 92108 byte(s)
Diff to previous 45931
Implement TChain::RemoveFriend to avoid leaving the chain (or more exactly its underlying TTree)
is an unstable state.   This correct the problem reported in <http://root.cern.ch/phpBB3/viewtopic.php?t=15206>.

Revision 45931 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 11 14:39:57 2012 UTC (2 years, 4 months ago) by pcanal
File length: 91439 byte(s)
Diff to previous 45033
Cleanup TChain::SetCacheSize to avoid redundant operation and avoid creating a TTreeCache when no TTree is available.  Remove obsolete comment.

Revision 45033 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 12 16:47:42 2012 UTC (2 years, 6 months ago) by pcanal
File length: 91444 byte(s)
Diff to previous 44761
Prevent the inadvertent re-use of a TTreeCache that has been deleted

Revision 44761 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 27 13:41:06 2012 UTC (2 years, 6 months ago) by pcanal
File length: 90942 byte(s)
Diff to previous 43162
From Elvin (and Brian):

I looked over the optimisation suggestions that you sent me and I implemented 4/5 of them. Below is the summary.

1) 60% of the time spent in TFileCacheRead::ReadBuffer is from TStorage::ReAllocChar.  ReAllocChar spends 86% of its time in memcpy, 8% in alloc, and 6% in memset.  It appears that, when a buffer is recycled, the contents of the old buffer (which are then overwritten) are
 copied over.

I modified the call to ReAllocChar not to copy the old contents. 
Unfortunately, in my testing, this wasn't enough - later on in ReAllocChar, it zeros out the contents of the array, which has basically the same overhead as copying.
There is no version of TStorage:ReAlloc that would satisfy the current requirements so I'm using the classic realloc for the TFPBlock buffer.

2) There are a few function calls that could be inlined which aren't inlined by the compiler (GCC 4.6.2).  Particularly, TFPBlock::GetLen, TFPBlock::GetBuffer, TFPBlock::GetNoElem, and TFPBlock::GetPos.

Done - I in-lined them explicitly, this should do the trick.

3) TTreeCache and TFilePrefetch both keep a sorted list of buffers that TFilePrefetch maintains.  When TFileCacheRead::ReadBuffer is called, a binary search is called on both.  We can eliminate one of the binary searches and save 3%.

This would require some major changes and it would also affect the normal reading pattern (i.e. when reading without the prefetching enabled). I suggest to keep it as it is for the time being so that we maintain the compatibility with the normal reading without prefetching.

4) TFilePrefetch::ReadBuffer calculates the offset into the block's buffer (ptrInt) on-demand.  You could probably win a few more percent here by pre-calculating these offsets for the TFPBlock.

Done - added a new vector of relative offsets of the pieces in the buffer (in TFPBlock).

5) The deadlock issue.

Done - I moved to a cleaner and simpler way to kill the thread by using cancellation. The deadlock situation was introduced in the last patch that I sent you when I was dealing with the TChain issue. The mutex locking was not related to the condition variable, but with the synchronisation with TChain.

Brian: Thread cancellation scares the heck out of me - it's much harder to get correct than condition variables, and goes against most best practices.  I'd much rather fixing the usage of conditions and have an explicit synchronization for killing the helpers.

Elvin also reverted to classic condition variables and semaphores when killing the worker thread.

Revision 43162 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 28 17:58:47 2012 UTC (2 years, 10 months ago) by pcanal
File length: 91005 byte(s)
Diff to previous 43144
From Peter:

Index: io/io/src/TFile.cxx
* Have TFile SetCacheRead() disassociate itself from cache, when cache is set to 0.

Index: tree/tree/src/TTreeCache.cxx 
* Let TFile handle association between file and cache.

Index: tree/tree/src/TChain.cxx
* Let TFile handle association between file and cache.

Revision 43144 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 27 16:36:34 2012 UTC (2 years, 10 months ago) by pcanal
File length: 90963 byte(s)
Diff to previous 42754
remove uncessary/redundant calls

Revision 42754 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 20 20:13:07 2012 UTC (3 years ago) by pcanal
File length: 91035 byte(s)
Diff to previous 42752
From Peter van Gemmeren:

Allow multiple read caches per file by adding a fCacheReadMap member and owner arguments to GetCacheRead() and SetCacheRead()
to TFile.

Index: io/io/inc/TFileCacheRead.h
Index: io/io/src/TFileCacheRead.cxx
* Adding new argument for constructor to specify TTree owner
* whitespace indents

Index: tree/tree/inc/TBasket.h
Index: tree/tree/src/TBasket.cxx
* Add optional tree owner argument to LoadBasketBuffers() to retrieve cache.
* In LoadBasketBuffers() and ReadBuffers() check the cache first than call TFile::ReadBuffer only if needed.

Index: tree/tree/inc/TChain.h
Index: tree/tree/src/TChain.cxx
* Override SetCacheSize() function to update TTree owner on the current cache.
* whitespace indents

Index: tree/tree/src/TTree.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() calls
* Always delete owned cache

Index: tree/tree/src/TTreeCache.cxx
* Adding new argument for constructor for TFileCacheRead to specify TTree owner

Index: tree/treeplayer/src/TTreePlayer.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() calls

Index: tree/tree/src/TTreeCloner.cxx
* Call TBasket::LoadBasketBuffers() with current TTree as owner of cache

Index: proof/proofplayer/src/TEventIter.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() and SetCacheRead() calls

Revision 42752 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 20 18:03:01 2012 UTC (3 years ago) by pcanal
File length: 90697 byte(s)
Diff to previous 42751
Repair the support for chain->GetTree()->CloneTree(0) in LoadTree (broken in previous revision and failing roottest/root/tree/cloning)

Revision 42751 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 20 16:54:43 2012 UTC (3 years ago) by pcanal
File length: 90165 byte(s)
Diff to previous 41698
Add TChain::InvalidateCurrentTree to centralize the invalidation of the tree
(needed when adding a friend) and to correctly set both fTreeNumber and fTree
so that all routine properly detect the need to reload the Tree.
This fixes <http://savannah.cern.ch/bugs/?90222>

Revision 41698 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 1 21:22:54 2011 UTC (3 years, 2 months ago) by pcanal
File length: 89612 byte(s)
Diff to previous 41111
From Elvin:
Last week Martin Vala from ALICE came to me with a problem that he had
while using the asynchronous prefetching. There were basically two
main problems:

1. Trying to read a root file from an archive. Here the problem was
that when reading from an archive there is an offset of the file which
was not taken into consideration when the file was saved in the cache.
And this lead to a miss when reading the file from cache. I fixed it,
but I had to expose the value of fArchiveOffset from TFile.

2. The second problem was when reading using a TChain. There were some
synchronization issues concerned to the asynchronous thread that
actually does the reading. All this was happening because in the case
of TChain there is only one file cache which is re-utilized as we move
from one file to another. This was a pretty tricky issue.

I attached a patch made against the current trunk which fixes both
this problems. I gave the patch first to Martin to test it, and he was
satisfied with it. There is a small delay when the TChain moves from
one file to another because I have to wait for the async thread to
finish it's worked but over all Martin said that the performance is
way better than before. When I initially did the asyn pre-fetching I
had no idea about these two use cases, so that's why they popped up
now.



Revision 41111 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 4 09:44:40 2011 UTC (3 years, 3 months ago) by pcanal
File length: 89172 byte(s)
Diff to previous 40993
Document the return values of TChain::LoadTree in case of error ; now returns -1 in case of empty chain

Revision 40993 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 23 18:54:14 2011 UTC (3 years, 4 months ago) by pcanal
File length: 88746 byte(s)
Diff to previous 40792
Introduce GetLeaf(branchname,leafname) used in TTreeFormula to avoid ambiguity in the syntax introduced by too many slashes

Revision 40792 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 1 18:42:08 2011 UTC (3 years, 4 months ago) by pcanal
File length: 88110 byte(s)
Diff to previous 40791
From Matthew Strait: update the documentation of the return value of TChain::AddFile

Revision 40791 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 1 18:38:16 2011 UTC (3 years, 4 months ago) by pcanal
File length: 87636 byte(s)
Diff to previous 39696
From Matthew Strait: TChain::AddFile segfaults on strlcpy if name=NULL.  It should check for NULL
rathern than crash.

Revision 39696 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 13 21:35:34 2011 UTC (3 years, 7 months ago) by pcanal
File length: 87521 byte(s)
Diff to previous 39611
From David Dagenhart:

Implement an option to allow ROOT to use the LZMA compression
algorithm to compress data instead of the ZLIB compression algorithm.
LZMA compression typically results in smaller files, but takes more
CPU time to compress data. To use the new feature, the external XZ
package must be installed when ROOT is configured and built:

Download 5.0.3 from here http://tukaani.org/xz/
and make sure to configure with fPIC:
   ./configure CFLAGS='-fPIC'

Then the client C++ code must call routines to explicitly request LZMA
compression.

ZLIB compression is still the default.

Setting the Compression Level and Algorithm:

There are three equivalent ways to set the compression level and 
algorithm. For example, to set the compression to the LZMA algorithm
and compression level 5.

1. TFile f(filename, option, title);
   f.SetCompressionSettings(ROOT::CompressionSettings(ROOT::kLZMA, 5));

OR

2. TFile f(filename, option, title, ROOT::CompressionSettings(ROOT::kLZMA, 5));

OR

3. TFile f(filename, option, title);
   f.SetCompressionAlgorithm(ROOT::kLZMA);
   f.SetCompressionLevel(5);

These methods work for TFile, TBranch, TMessage, TSocket, and TBufferXML. 
The compression algorithm and level settings only affect compression of
data after they have been set. TFile passes its settings to its branches 
only at the time the branches are created. This can be overidden by 
explicitly setting the level and algorithm for the branch. These classes 
also have the following methods to access the algorithm and level for 
compression.

   Int_t GetCompressionAlgorithm() const;
   Int_t GetCompressionLevel() const;
   Int_t GetCompressionSettings() const;

If the compression level is set to 0, then no compression will be
done. All of the currently supported algorithms allow the level to be
set to any value from 1 to 9. The higher the level, the larger the
compression factors will be (smaller compressed data size). The
tradeoff is that for higher levels more CPU time is used for
compression and possibly more memory. The ZLIB algorithm takes less
CPU time during compression than the LZMA algorithm, but the LZMA
algorithm usually delivers higher compression factors.

The header file core/zip/inc/Compression.h declares the function
"CompressionSettings" and the enumeration for the algorithms.
Currently the following selections can be made for the algorithm:
kZLIB (1), kLZMA (2), kOldCompressionAlgo (3), and kUseGlobalSetting
(0). The last option refers to an older interface used to control the
algorithm that is maintained for backward compatibility. The following
function is defined in core/zip/inc/Bits.h and it set the global
variable.

   R__SetZipMode(int algorithm)

If the algorithm is set to kUseGlobalSetting (0), the global variable
controls the algorithm for compression operations.  This is the
default and the default value for the global variable is kZLIB.

Note that the LZMA algorithm will only be available if the LZMA
libraries from the XZ package were available when the ROOT executable
being used was configured and built. If you are building ROOT and want
LZMA then you must do something similar to the following if XZ is not
already installed on your system.

  Download XZ version 5.0.3 from http://tukaani.org/xz/
  unwind the tarball
  cd xz-5.0.3
  ./configure CFLAGS='-fPIC'
  make

ROOT was tested with version 5.0.3 of XZ.  It might work with earlier
versions and will probably work with later versions of XZ.

Then either use "make install" to put the library and headers into
/usr/local/* so the scripts building ROOT can find them or use
arguments to the ROOT configure script to point to the proper
directories containing the XZ library and headers. These are the
library and the included header (lzma.h includes other headers in the
lzma subdirectory).

  src/liblzma/.libs/liblzma.a
  src/liblzma/api/lzma.h

WARNING: Data compressed with the LZMA algorithm cannot be read by
ROOT executables that were not built with LZMA support.

Revision 39611 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 8 19:35:17 2011 UTC (3 years, 7 months ago) by pcanal
File length: 87515 byte(s)
Diff to previous 39588
Introduce TMemFile and update TFileMerger to support incremental merges.

Add new tutorials ( net/treeClient.C + net/fastMergeServer.C )
demonstrating how a TMemFile can be used to do parallel merge
from many client. ( TMemFile still needs to be better integrated
with TMessage and TSocket).

The new TMemFile class support the TFile interface but only store
the information in memory.   This version is limited to 32MB.

   TMessage mess;
   ... 
   mess->ReadFastArray(scratch,length);
   transient = new TMemFile("hsimple.memroot",scratch,length);

will copy the content of 'scratch' into the in-memory buffer
created by/for the TMemFile.

   TMemFile *file = new TMemFile("hsimple.memroot","RECREATE");

Will create an empty in-memory of (currently fixed) size 32MB.

   file->ResetAfterMerge(0);

Will reset the objects in the TDirectory list of objects
so that they are ready for more data accumulations (i.e.
returns the data to 0 but keep the customizations).

Introduce the new function TFileMerger::IncrementalMerge will
will Merge the list of file _with_ the content of the output
file (if any).   This allows make several successive Merge
into the same TFile object.

Introduce non-static version of TFile::Cp allows the copy of
an existing TFile object.

Introduce new explicit interface for providing reseting 
capability after a merge.  If a class has a method with 
the name and signature:

   void ResetAfterMerge(TFileMergeInfo*);

it will be used by a TMemFile to reset its objects after
a merge operation has been done.

If this method does not exist, the TClass will use
a method with the name and signature:
  
   void Reset(Optiont_t *);

TClass now provides a quick access to these merging 
function via TClass::GetResetAfterMerge.   The wrapper function
is automatically created by rootcint and can be installed
via TClass::SetResetAfterMerge.   The wrapper function should have
the signature/type ROOT::ResetAfterMergeFunc_t:

   void (*)(void *thisobj, TFileMergeInfo*);

ResetAfterMerge functions were added to the following classes:
TDirectoryFile, TMemFile, TTree, TChain, TBranch, TBranhcElement, 
TBranchClones, TBranchObject and TBranchRef.

Revision 39588 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 7 21:16:47 2011 UTC (3 years, 7 months ago) by pcanal
File length: 87095 byte(s)
Diff to previous 39365
Do no assume that there is a least one '.root' in the filename passed to TChain::Add

Revision 39365 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 24 19:53:19 2011 UTC (3 years, 8 months ago) by pcanal
File length: 87077 byte(s)
Diff to previous 39059
Remove hard dependencies of TFileMerger on TH1 and TTree.
(Soft dependencies still exist to be able to disable the
merging of TTrees and to be able to disable the AutoAdd
behavior of TH1).

Introduce new explicit interface for providing merging 
capability.  If a class has a method with the name and 
signature:

   Long64_t Merge(TCollection *input, TFileMergeInfo*);

it will be used by a TFileMerger to merge one or more
other objects into the current object.   Merge should
return a negative value if the merging failed.

If this method does not exist, the TFileMerger will use
a method with the name and signature:

   Long64_t Merge(TColletion *input);

TClass now provides a quick access to these merging 
function via TClass::GetMerge.   The wrapper function
is automatically created by rootcint and can be installed
via TClass::SetMerge.   The wrapper function should have
the signature/type ROOT::MergeFunc_t:

   Long64_t (*)(void *thisobj, TCollection *input, TFileMergeInfo*);

Added the new Merge function to TTree and THStack.
Also add the new Merge function to TQCommand as the
existing TQCommand::Merge does _not_ have the right
semantic (in part because TQCommand is a collection). 
Fix the return value of TEfficiency::Merge

In TFileMerger, add a PrintLevel to allow hadd to request
more output than regular TFileMerger.

The object TFileMergeInfo can be used inside the Merge
function to pass information between runs of the Merge
(see below).  In particular it contains:

   TDirectory  *fOutputDirectory;  // Target directory where the merged object will be written.
   Bool_t       fIsFirst;          // True if this is the first call to Merge for this series of object.
   TString      fOptions;          // Additional text based option being passed down to customize the merge.
   TObject     *fUserData;         // Place holder to pass extra information.  This object will be deleted at the end of each series of objects.
   
The default in TFileMerger is to call Merge for every object
in the series (i.e the collection has exactly one element) in
order to save memory (by not having all the object in memory 
at the same time).

However for histograms, the default is to first load all the
objects and then merge them in one go ; this is customizable
when creating the TFileMerger object.

Revision 39059 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 30 20:28:06 2011 UTC (3 years, 8 months ago) by pcanal
File length: 86808 byte(s)
Diff to previous 39038
Introduce support for TTree with variable cluster size (i.e. value of fAutoFlush).
The information is kept in the new data members: fNClusterRange, fMaxClusterRange, fClusterRangeEnd, fClusterSize.
(See TTree::SetAutoFlush for more details).

Iterating through the cluster should be done via the new class TTree::TClusterIterator (i.e. this replaces += fAutoFlush):
   TTree::TClusterIterator clusterIter = tree->GetClusterIterator(which_entry_to_start_from);
   Long64_t clusterStart;
   while( (clusterStart = clusterIter()) < tree->GetEntries()) {
      printf("The cluster starts at %lld and ends at %lld\n",clusterStart,clusterIter.GetNextEntry()-1);
   }
See TTreeCache::FillBuffer for a concrete usage example.

Revision 39038 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 27 13:00:40 2011 UTC (3 years, 8 months ago) by pcanal
File length: 86385 byte(s)
Diff to previous 39026
Make sure the TChain can be found (and thus removed) from the list of cleanups even when its name is 'changed' by the Streamer

Revision 39026 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 26 03:36:35 2011 UTC (3 years, 8 months ago) by pcanal
File length: 86183 byte(s)
Diff to previous 38595
Remove unnecessary dependency

Revision 38595 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 24 00:40:37 2011 UTC (3 years, 10 months ago) by pcanal
File length: 86208 byte(s)
Diff to previous 37836
In TChain::ls, print the name of the chain and indent the list
of files (this fixes https://savannah.cern.ch/bugs/?79909).

In TObject::ls, add support for the option 'noaddr' which 
prevents the printing of the address of the object.   This
is useful in particular in roottest.   Use this in hadd
and TFileMerger

Revision 37836 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 21 16:47:43 2011 UTC (4 years ago) by pcanal
File length: 85858 byte(s)
Diff to previous 35831
Fix the problem reported at <http://root.cern.ch/phpBB3/viewtopic.php?t=11890>
Make sure that TChain::ResetBranchAddress(TBranch*) also record the reset in the 
chain's meta information about branches.

Revision 35831 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 28 10:07:11 2010 UTC (4 years, 3 months ago) by brun
File length: 85716 byte(s)
Diff to previous 35527
In TChain::Add pass the nentries argument (instead of kBigNumber) to TChain::AddFile.
see: http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=11291

Revision 35527 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 21 12:27:01 2010 UTC (4 years, 4 months ago) by brun
File length: 85720 byte(s)
Diff to previous 35505
do not include snprintf.h

Revision 35505 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 21 08:18:20 2010 UTC (4 years, 4 months ago) by brun
File length: 85742 byte(s)
Diff to previous 35476
Fix strlcpy calls

Revision 35476 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 18:12:10 2010 UTC (4 years, 4 months ago) by brun
File length: 85758 byte(s)
Diff to previous 35466
Replace strncpy by strlcpy

Revision 35466 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 14:32:04 2010 UTC (4 years, 4 months ago) by brun
File length: 85758 byte(s)
Diff to previous 35454
Fix calls to strncpy

Revision 35454 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 13:16:31 2010 UTC (4 years, 4 months ago) by brun
File length: 85756 byte(s)
Diff to previous 35431
Fix strncpy calls

Revision 35431 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 08:55:31 2010 UTC (4 years, 4 months ago) by brun
File length: 85739 byte(s)
Diff to previous 35416
Replace calls to strcpy by strncpy

Revision 35416 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 07:14:13 2010 UTC (4 years, 4 months ago) by brun
File length: 85734 byte(s)
Diff to previous 34832
fix coverity CID 13326

Revision 34832 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 17 14:47:30 2010 UTC (4 years, 5 months ago) by pcanal
File length: 85707 byte(s)
Diff to previous 33940
Fix TChain::GetListOfBranches documentation and add documentation to TBranch::GetClassName

Revision 33940 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 16 09:45:02 2010 UTC (4 years, 7 months ago) by rdm
File length: 85655 byte(s)
Diff to previous 33847
From Axel:
fix indentation.

Revision 33847 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 11 12:01:23 2010 UTC (4 years, 7 months ago) by pcanal
File length: 85329 byte(s)
Diff to previous 33592
Fix coverity reports:
Avoid potential use of null pointer.
Remove resource leak.

Revision 33592 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 20 15:49:41 2010 UTC (4 years, 8 months ago) by brun
File length: 85318 byte(s)
Diff to previous 33354
Remove a memory leak in TChain::Add. The char* returned by gSystem->ExpandPathName
was never deleted (thanks Eddy).

Revision 33354 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 3 19:46:03 2010 UTC (4 years, 8 months ago) by pcanal
File length: 85269 byte(s)
Diff to previous 33073
Make sure that a TChain object is informed if its current TFile object is deleted externally (for example at shutdown) ; this should help fixing Savannah #66448

Revision 33073 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 16 17:53:12 2010 UTC (4 years, 9 months ago) by pcanal
File length: 84535 byte(s)
Diff to previous 32952
In TTree::CloneTree, TChain::Merge and TTree::CopyEntries introduces more flexibility
in the handling of the case where an index is 'missing' index in one or more of the 
TTree being collated.

   // If the tree or any of the underlying tree of the chain has an index, that index and any
   // index in the subsequent underlying TTree objects will be merged.
   //
   // There are currently three 'options' to control this merging:
   //    NoIndex             : all the TTreeIndex object are dropped.
   //    DropIndexOnError    : if any of the underlying TTree object do no have a TTreeIndex,
   //                          they are all dropped.
   //    AsIsIndexOnError [default]: In case of missing TTreeIndex, the resulting TTree index has gaps.
   //    BuildIndexOnError : If any of the underlying TTree object do no have a TTreeIndex,
   //                          all TTreeIndex are 'ignored' and the mising piece are rebuilt.

The default (AsIsIndexOnError) is the same as before except that the 'first' TTree 
of a chain is no longer the deciding factor on whether the indexed are kept or dropped:
 
the default is to collate all existing indexes (with 'gaps' if there are missing indexes).

Revision 32952 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 13 11:44:56 2010 UTC (4 years, 9 months ago) by pcanal
File length: 84534 byte(s)
Diff to previous 32930
Fix shadow variable warning

Revision 32930 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 9 16:18:32 2010 UTC (4 years, 9 months ago) by pcanal
File length: 84530 byte(s)
Diff to previous 32908
Prefer the use of InheritsFrom(TClass*) over InheritsFrom(const char*) as long as 
it does not increase the library dependencies.

Revision 32908 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 8 19:27:43 2010 UTC (4 years, 9 months ago) by pcanal
File length: 84523 byte(s)
Diff to previous 32894
Properly re-update the friend branch address when the friend is a chain composed of 'smaller' trees than the main chain is.  This fixes savannah #65431

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: 83578 byte(s)
Diff to previous 32032
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 32032 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 15 22:00:18 2010 UTC (5 years ago) by pcanal
File length: 85891 byte(s)
Diff to previous 31605
In TChain::SetEntryList use only the treename to lookup the (sub)entryList (instead subdir/treename)

Revision 31605 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 7 19:50:39 2009 UTC (5 years, 1 month ago) by pcanal
File length: 85869 byte(s)
Diff to previous 31372
Fix 'reverse_inull' errors found by coverity

Revision 31372 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Nov 22 22:55:38 2009 UTC (5 years, 2 months ago) by pcanal
File length: 85868 byte(s)
Diff to previous 30825
Fix inaccurate documentation (GetEntryWithIndex)

Revision 30825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 22 08:51:03 2009 UTC (5 years, 3 months ago) by brun
File length: 85912 byte(s)
Diff to previous 30509
Disable the read and write cache when merging Trees in the "fastclone" mode.

Revision 30509 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 28 16:24:19 2009 UTC (5 years, 3 months ago) by brun
File length: 85767 byte(s)
Diff to previous 30139
Fix for https://savannah.cern.ch/bugs/index.php?56151
When connecting a TChain to a TChain, one must call TChain::GetEntries
to force the computation of the entries in all the Trees of the added TChain,
otherwise, a call to chaintop.GetEntries() will not be able to scan recursively
the added TChains.

Revision 30139 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 14 10:51:15 2009 UTC (5 years, 4 months ago) by rdm
File length: 85679 byte(s)
Diff to previous 30121
in Lookup() assume TUrl arguments to be files and not web links.
Fixes issue #54758.

Revision 30121 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 11 16:43:51 2009 UTC (5 years, 4 months ago) by pcanal
File length: 85675 byte(s)
Diff to previous 28842
Add a return value to SetBranchAddress, a return value greater or equal to zero indicate success, a negative value indicates failure (in both case, the address is still updated). Example:

if (tree->SetBranchAddress(mybranch,&myvar) < 0 ) {
   cerr << "Something went wrong\n";
   return;
}
The possible return values are:

kMissingBranch (-5) : Missing branch
kInternalError (-4) : Internal error (could not find the type corresponding to a data type number.
kMissingCompiledCollectionProxy (-3) : Missing compiled collection proxy for a compiled collection.
kMismatch (-2) : Non-Class Pointer type given does not match the type expected by the branch.
kClassMismatch (-1) : Class Pointer type given does not match the type expected by the branch.
kMatch (0) : perfect match.
kMatchConversion (1) : match with (I/O) conversion.
kMatchConversionCollection (2) : match with (I/O) conversion of the content of a collection.
kMakeClass (3) : MakeClass mode so we can not check.
kVoidPtr (4) : void* passed so no check was made.
kNoCheck (5) : Underlying TBranch not yet available so no check was made.

Revision 28842 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 7 14:20:07 2009 UTC (5 years, 7 months ago) by pcanal
File length: 85387 byte(s)
Diff to previous 28385
In the case where a TEntryList is created by TEventList:

TTree::GetEntryList no longer transfer the ownership to the TTree's directory
(This was not working properly because RecursiveRemove is not called on the
content of the currently delete TDirectory).

TTree::GetEntryList no longer relinquish ownership of the fEntryList
(Note that prior to r28831, even when the TTree 'owned' the EntryList,
the EntryList was delete 'only' if the TTree was also cloned via CloneTree
(due to a typo in ~TTree).

Update TChain to also reflect this changes and the change in r28831)

Revision 28385 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 29 10:28:43 2009 UTC (5 years, 8 months ago) by rdm
File length: 84894 byte(s)
Diff to previous 28355
From Gerri:
fix warning about shadowed index introduced in patch 28355.

Revision 28355 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 24 19:53:11 2009 UTC (5 years, 9 months ago) by pcanal
File length: 84890 byte(s)
Diff to previous 28277
TTree::CloneTree and TChain::Merge in fast mode now can recover from some mismatch errors between
the input and output TTrees by falling back to using the 'slow' mode.  In particular this allow
a 'fast cloning' to handle files that requires schema evolution (albeit it is of course much slower).

The TTreeCloner constructor takes an additional argument to indicate whether the TTreeCloner should
directly print the mismatch error/warning or if the caller we handle them.  The message of the
warning can be retriever via TTreeCloner::GetWarning.   TTreeCloner::NeedConversion return true
if there is a mismatch but the TTree will/should be able to be process properly in slow mode.

This fixes the issue #33743 in savannah

Revision 28277 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 17 20:20:58 2009 UTC (5 years, 9 months ago) by pcanal
File length: 84255 byte(s)
Diff to previous 27600
Since a TChain is not attached to the current directory and that in almost all cases the current directory will not be part of the chain, let's set fFile and fDirectory to zero in the constructor (Leading chain->GetCurrentFile() to properly return 0 until a valid file in the chain is opened

Revision 27600 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 25 08:17:22 2009 UTC (5 years, 10 months ago) by brun
File length: 84189 byte(s)
Diff to previous 27539
From Matthew Strait:
* Fix spelling and grammar errors
* Fold long lines so they don't spill off the right side
* Add spaces for readability
* Standardize notation and style within sections.

Revision 27539 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 20 08:17:45 2009 UTC (5 years, 11 months ago) by brun
File length: 84138 byte(s)
Diff to previous 26399
From Thiemo Nagel:
the wildcard behaviour of TChain::Add() caused me a bit of a headache,
so I thought I'd send in a patch to clarify its documentation a bit.

Revision 26399 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 24 01:44:18 2008 UTC (6 years, 2 months ago) by rdm
File length: 84069 byte(s)
Diff to previous 26390
From Gerri:
- huge simplification for PROOF-Lite, as the chain is local there is no need
  to set special arguments in SetProof() to get the Tree header. The client
  can just use the TChain directly to get the tree header and GetEntries().
- fix for TChain::Draw() on PROOF-Lite when doing repeated Draw() queries.

Revision 26390 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Nov 22 23:45:13 2008 UTC (6 years, 2 months ago) by rdm
File length: 83699 byte(s)
Diff to previous 25654
From Gerri:
The retrieval of the tree header in PROOF (which enables calls like
TChain::GetEntries) is broken. At a certain point we disabled retrieval
by default (it was too heavy in some cases) and we added the third argument
to TChain::SetProof() to control it. But this argument is never used to
get the tree. Infact we need to change the main constructor of TProofChain
(done already) and the related plug-in handler.

Revision 25654 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 1 14:21:26 2008 UTC (6 years, 3 months ago) by brun
File length: 83686 byte(s)
Diff to previous 24602
Add a protection suggested by Yuri Shitov
see: http://savannah.cern.ch/bugs/?42384

Revision 24602 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 30 05:16:06 2008 UTC (6 years, 6 months ago) by pcanal
File length: 83677 byte(s)
Diff to previous 24522
allow .root in the name of directory in TChain::Add and TChain::AddFile (however in this case the root file must be ending .root)

Revision 24522 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 24 17:51:06 2008 UTC (6 years, 7 months ago) by brun
File length: 83106 byte(s)
Diff to previous 23685
Documemt the return value of the TChain::Add functions.

Revision 23685 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 7 15:18:39 2008 UTC (6 years, 8 months ago) by brun
File length: 82830 byte(s)
Diff to previous 23466
Introducing a parallel unzipping algorithm for pre-fetched buffers. Since we already know what buffers are going to be read, we can decompress a few of them in advance in an additional thread and give the impression that the data decompression comes for free (we gain up to 30% in reading intensive jobs).

The size of this unzipping cache is 20% the size of the TTreeCache and can be modified with TTreeCache::SetUnzipBufferSize(Long64_t bufferSize). Theoretically, we only need one buffer in advance but in practice we might fall short if the unzipping cache is too small (synchronization costs).

This experimental feature is disabled by default, to activate it use the static function TTreeCache::SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode option = TTreeCacheUnzip::kEnable). The possible values to pass are: TTreeCacheUnzip::kEnable to enable it,TTreeCacheUnzip::kDisable to disable it and TTreeCacheUnzip::kForce to force it. Since it will only work if you have more than one core, the TTreeCacheUnzip::kForce option is useful to run it even if you have only one cpu (to measure the overhead, for example).

Revision 23466 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 23 13:52:45 2008 UTC (6 years, 9 months ago) by brun
File length: 82774 byte(s)
Diff to previous 22992
Fix shadowed variables

Revision 22992 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 5 09:43:01 2008 UTC (6 years, 9 months ago) by pcanal
File length: 82769 byte(s)
Diff to previous 22972
Use the DirectoryAutoAdd facility for the classes:
        TTree, TH1, TEventList, TEntryList, TGraph2D
(and hence their derived classes).

The instances of those classes are now added automatically 
to the current directory only when Constructe'd with arguments or Clone'd
and to the directory they are read from when their are stored
directly in a TKey. [Note: the default constructor never adds
the object to the current directory]

The directory auto add can still be disabled for instance
of TH1 and TGraph2D by setting TH1::AddDirectory.

Additionally one can disable the directory auto add for
a specific class by doing:

    TClass::GetClass("myclass")->SetDirectoryAutoAdd(0)

However you might want to also be able to restore the
behavior in which case you ought to do:

    TClass *cl = TClass::GetClass("myclass");
    ROOT::DirAutoAdd_t func = cl->GetDirectoryAutoAdd();
    cl->SetDirectoryAutoAdd(0);

TROOT::ReadingObject is marked as deprecated.. It is still
set (as it was) but is no longer used by the above mention
classes.

NOTE:  One side effect of this change, is that instnace 
of TTree, TH1, TEventList, TEntryList, TGraph2D that are
retrieved from a TMessage (i.e. from a socket) no longer
auto register themselves to the current ROOT directory.

Add a new optional parameter to TDirectory::Append: 'replace'
If replace is true (the default is false), the Append will
first remove from the directory any existing object and
print the message:

   Replacing existing OldClass: thename (Potential memory leak).

Add a new option parameter to TDirectory::CloneObject: 'autoadd'
If autoadd is true (the default), CloneObject will call the
object 'DirectoryAutoAdd' function (if any)

In TDirectory::CloneObject add support for multiple inheritance
from TObject where TObject is not the left most base class.

Fix memory leak in TGraph2D::operator= (and add TGraph2D::Clear)

Cleanup some documentation

Revision 22972 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 3 19:58:33 2008 UTC (6 years, 9 months ago) by pcanal
File length: 81877 byte(s)
Diff to previous 22902
Introduce a new member function TDirectory::Remove which is the reverse of
TDirectory::Append.  This allows more 'hiding' of the internal list as
well as simplifying code (now) using Append/Remove.

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: 81918 byte(s)
Diff to previous 22805
move tree, treeplayer and treeviewer under tree meta directory.

Revision 22805 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 20 22:04:03 2008 UTC (6 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 81918 byte(s)
Diff to previous 21444
Remove unnecessary change of the current ROOT directory
and reduce the span of those that are still compulsory
(hence aiding threadsafety)

Revision 21444 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 18 11:58:21 2007 UTC (7 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 81799 byte(s)
Diff to previous 21065
Fix an oddity in the default TChain constructor.
The TChain object was registered twice to gROOT->GetListOfDataSets() !!

Revision 21065 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 27 15:13:22 2007 UTC (7 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 81871 byte(s)
Diff to previous 20882
From Anna:
fixes an issue with a seg. fault in SetEventList() ==> SetEntryList(), another issue with full entry lists, with correct resetting of "current" indices and with printing of empty entry lists.

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/tree/src/TChain.cxx
File length: 82343 byte(s)
Diff to previous 20390
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 20390 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 17 14:35:56 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 82343 byte(s)
Diff to previous 19987
Following a suggestion by Philip Rodrigues (p.rodrigues1@physics.ox.ac.uk)
add more comments to explain how to get the list of files of a TChain.

Revision 19987 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 20 15:43:29 2007 UTC (7 years, 4 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 80716 byte(s)
Diff to previous 19826
From Mihaela:
A TChain created with the default constructor and having an entry list cannot be processed with a TSelector. This was due to some missing settings in the default constructor.

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/tree/src/TChain.cxx
File length: 80477 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/tree/src/TChain.cxx
File length: 80529 byte(s)
Diff to previous 19785
remove :$ from tag line

Revision 19785 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 11 09:45:03 2007 UTC (7 years, 4 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 80539 byte(s)
Diff to previous 19666
From Anna:
Remember the bug #28505 about dcache and entry lists? After lots of communication with dcache guys, it looks like I've fixed it. The attached patch has the following changes:

1. TEntryList::GetEntryList() now performs all the necessary changes to the file names, such as extending to full path for local files, and using TUrl::GetUrl() for not local. This, hopefully, solves the problem of dcache:/// being added to dcache files and the same possible problem for other protocols.
2. TEntryList::SetTree(TTree *tree) does the same changes to the file name. TEntryList::SetEntryList(const char *treename, const char *filename), however, takes the names "as is".
3. in TChain::SetEntryList() function, most of the code has been replaced with calls to TEntryList::GetEntryList(). Because of this, option parameter, previously in TChain::SetEntryList() had to be added to TEntryList::GetEntryList().
4. TChain::SetEventList() function now doesn't call TChain::LoadTree() if all the tree offsets are already known.
5. TChain::GetEntryNumber() function now doesn't load the current tree, if all the tree offsets are already known.
6. TEntryList::Print() function is fixed for the case of empty sub-lists (didn't print anything for them before)
Special thanks to Dmitry Ozerov for his help.

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/tree/src/TChain.cxx
File length: 82650 byte(s)
Diff to previous 19571
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 19571 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 8 14:58:35 2007 UTC (7 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 82505 byte(s)
Diff to previous 19551
From Anna:
fix the issue of TEntryList and TEventList for remote files in the bug #28505 in Savannah.

Revision 19551 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 3 19:19:40 2007 UTC (7 years, 5 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 82256 byte(s)
Diff to previous 19274
In fast merging and cloning, we now check after each input file whether
the output file is over TTree::GetMaxTreeSize() and apply the
automatic file overflow if needed.

Revision 19274 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 9 08:16:23 2007 UTC (7 years, 6 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 81837 byte(s)
Diff to previous 19220
From Anna Kreshuk:
Preparation for entry-list support in PROOF.

Revision 19220 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 2 14:28:39 2007 UTC (7 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 81442 byte(s)
Diff to previous 19116
From Anna:
In TTree::SetEventList() and TChain::SetEventList() functions:
- The name of the automatically created TEntryList is now not the same as the name of the TEventList argument
- Set the ReapplyCut flag of the automatically created TEntryList to the same value as that of the TEventList argument
In TTree::SetEventList():
- Properly delete the old automatically created TEntryList when a new one is set

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/tree/src/TChain.cxx
File length: 80440 byte(s)
Diff to previous 19112
Add new method TVirtualIndex::Append
Use it to insurge that the existing indexes are properly concatenated
when doing a TTree or TChain Merge.

Revision 19112 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 21 15:42:50 2007 UTC (7 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 79793 byte(s)
Diff to previous 18679
Modify TChain::GetReadEntry to now returns the current entry of the chain
instead of the underlying tree. (To get the previous value do
mychain->GetTree()->GetReadEntry()).  Thus Entry$ nows returns/draws/scans
the value of the entry number in the chain.

Revision 18679 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun May 6 14:44:17 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 79675 byte(s)
Diff to previous 18648
fix coding convention

Revision 18648 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 3 15:27:40 2007 UTC (7 years, 8 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 79665 byte(s)
Diff to previous 18449
From Gerri:
This is the last patch to synchronize with the CAF:

TDSet.h, .cxx
   - Use TCollection instead of TList
   - Support thre object types in TDSet::Add(TCollection *): TFileInfo, TUrl
     and TObjString .
   - Conserve the looked-up status of TChainElements when instantiating
     from a TChain.

TChainElement.h, .cxx
   - Use BIT(15) to flag the looked-up status

TChain.h, .cxx
   - Use TCollection instead of TList
   - Support thre object types in TDSet::Add(TCollection *): TFileInfo, TUrl
     and TObjString .
   - Save / Test the looked-up status of elements to avoid multiple lookup;
     an option is available in TChain::Lookup(Bool_t force = kFALSE) to
     force a new lookup.

Revision 18449 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 30 16:44:34 2007 UTC (7 years, 9 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 78544 byte(s)
Diff to previous 18282
From Gerri:
Anna reported to me the following problem:
TChain::Lookup (and TDSet::Lookup) makes now use of TFileStager::Locate
to locate the files. But for local URLs TFileStager is not defined, so
the lookup fails.
This patch adds default functionality (based on TSystem::AccessPathName)
to the base TFileStager, so that it works trasparently for local files.

Revision 18282 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 16 08:15:29 2007 UTC (7 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 78417 byte(s)
Diff to previous 18277
To avoid overloading ambiguities (eg calling chain.SetEntryList(0), rename function
   virtual void      SetEntryList(const char *filename="", Option_t *opt="");
to
   virtual void      SetEntryListFile(const char *filename="", Option_t *opt="");

Revision 18277 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 15 11:33:00 2007 UTC (7 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 78415 byte(s)
Diff to previous 18272
From Anna:
Add new functionlity to the TEntryList class to support automatically
multiple TEntryList (one per TChain file). A new class TEntryListFromFile
has been developed. It is a utility class called by TChain when a TEntryList
is set.
// TEntryListFromFile
//
// Manages entry lists from different files, when they are not loaded
// in memory at the same time.
//
// This entry list should only be used when processing a TChain (see
// TChain::SetEntryList() function). File naming convention:
// - by default, filename_elist.root is used, where filename is the
//   name of the chain element.
// - xxx$xxx.root - $ sign is replaced by the name of the chain element
// If the list name is not specified (by passing filename_elist.root/listname to
// the TChain::SetEntryList() function, the first object of class TEntryList
// in the file is taken.
// It is assumed that there are as many lists, as there are chain elements,
// and they are in the same order.
//
// If one of the list files can't be opened, or there is an error reading a list
// from the file, this list is skipped and the entry loop continues on the next
// list.

Revision 18272 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 14 19:00:14 2007 UTC (7 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 75916 byte(s)
Diff to previous 18257
Update to properly handle the fact that internally we use theBigNumber instead of kBigNumber

Revision 18257 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 14 09:17:19 2007 UTC (7 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 75833 byte(s)
Diff to previous 18256
Still keeping the current definition of kBigNumber, fix problems like
in TChain::GetEntries such that chains with more than kBigNumber of entries
can be created.

Revision 18256 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 14 08:30:04 2007 UTC (7 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 75763 byte(s)
Diff to previous 18255
Undo previous changes with kBigNumber. Cannot work on Windows.

Revision 18255 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 14 07:24:11 2007 UTC (7 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 75816 byte(s)
Diff to previous 18194
From Philippe:
Change the definition of kBigNumber from 1234567890 to 1<<63 -1
The previous definition was in an enum. The new one is a static variable of type Long64_t.
This fixes a problem when calling TChain::GetEntries with chains containing more than 1 billion entries.

Revision 18194 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 8 12:09:09 2007 UTC (7 years, 10 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 75763 byte(s)
Diff to previous 18086
From Gerri:
This patch introduces TFileStager::Locate and uses it to improve lookup
performances in TDSetElement::Lookup and TChain::Lookup.

There is a further optimization to be done in XrdClientAdmin under discussion
with Fabrizio. But that should have no (or very little) impact on this
implementation.

Revision 18086 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 26 15:01:24 2007 UTC (7 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 75465 byte(s)
Diff to previous 17731
From Anna:
Because of my TEntryList connected changes, TEventLists stopped working on proof. This fix should solve this problem.
So, now for proof everything should be the same way it was before TEntryList introduction.

Revision 17731 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 6 15:30:25 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 75431 byte(s)
Diff to previous 17591
In the Streamer functions replace the lines like
         TPad::Class()->ReadBuffer(b, this, v, R__s, R__c);
         TPad::Class()->WriteBuffer(b,this);
by
         b.ReadClassBuffer(TPad::Class(), this, v, R__s, R__c);
         b.WriteClassBuffer(TPad::Class(),this);

Revision 17591 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 31 07:33:31 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 75423 byte(s)
Diff to previous 17579
Fix by Philippe and Stephan Otto for a problem reported at: https://savannah.cern.ch/bugs/?23353
Use TDirectory::TContext to save/restore the current directory.

Revision 17579 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 30 11:24:32 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 75659 byte(s)
Diff to previous 17522
-Replace calls to gROOT->GetClass by TClass::GetClass
-Remove unused references to TROOT.h

Revision 17522 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 25 22:53:05 2007 UTC (7 years, 11 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 75656 byte(s)
Diff to previous 17422
When the master tree of a tree 'clone' relationship is deleted, we need
to reset the address of the branches of the clone ... however we need to
reset the address only for the cloned branches.  In particular this means
that calling ResetBranchAddresses on the clone tree is over-zealous (it
reset branches that may have been added by the user after the cloning).
Also in the reseting of the branch depends (because of TNtuple and TNtupleD)
not only of the type of the branch object but also on the type of the TTree.
(See TNtuple::ResetBranchAddress(TBranch*) for the explanation why).

Revision 17422 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 22 07:57:14 2007 UTC (8 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 75413 byte(s)
Diff to previous 17306
From Anna:

Extend the functionality of TEntryList and add the following info in TTree::Draw

   //     Saving the result of Draw to a TEventList or a TEntryList
   //     =========================================================
   //  TTree::Draw can be used to fill a TEventList object (list of entry numbers)
   //  instead of histogramming one variable.
   //  If varexp0 has the form >>elist , a TEventList object named "elist"
   //  is created in the current directory. elist will contain the list
   //  of entry numbers satisfying the current selection.
   //  If option "entrylist" is used, a TEntryList object is created
   //  Example:
   //    tree.Draw(">>yplus","y>0")
   //    will create a TEventList object named "yplus" in the current directory.
   //    In an interactive session, one can type (after TTree::Draw)
   //       yplus.Print("all")
   //    to print the list of entry numbers in the list.
   //    tree.Draw(">>yplus", "y>0", "entrylist")
   //    will create a TEntryList object names "yplus" in the current directory
   //
   //  By default, the specified entry list is reset.
   //  To continue to append data to an existing list, use "+" in front
   //  of the list name;
   //    tree.Draw(">>+yplus","y>0")
   //      will not reset yplus, but will enter the selected entries at the end
   //      of the existing list.
   //
   //      Using a TEventList or a TEntryList as Input
   //      ===========================
   //  Once a TEventList or a TEntryList object has been generated, it can be used as input
   //  for TTree::Draw. Use TTree::SetEventList or TTree::SetEntryList to set the
   //  current event list
   //  Example1:
   //     TEventList *elist = (TEventList*)gDirectory->Get("yplus");
   //     tree->SetEventList(elist);
   //     tree->Draw("py");
   //  Example2:
   //     TEntryList *elist = (TEntryList*)gDirectory->Get("yplus");
   //     tree->SetEntryList(elist);
   //     tree->Draw("py");
   //  If a TEventList object is used as input, a new TEntryList object is created
   //  inside the SetEventList function. In case of a TChain, all tree headers are loaded
   //  for this transformation. This new object is owned by the chain and is deleted
   //  with it, unless the user extracts it by calling GetEntryList() function.
   //  See also comments to SetEventList() function of TTree and TChain.
   //
   //  If arrays are used in the selection critera, the entry entered in the
   //  list are all the entries that have at least one element of the array that
   //  satisfy the selection.
   //  Example:
   //      tree.Draw(">>pyplus","fTracks.fPy>0");
   //      tree->SetEventList(pyplus);
   //      tree->Draw("fTracks.fPy");
   //  will draw the fPy of ALL tracks in event with at least one track with
   //  a positive fPy.
   //
   //  To select only the elements that did match the original selection
   //  use TEventList::SetReapplyCut or TEntryList::SetReapplyCut.
   //  Example:
   //      tree.Draw(">>pyplus","fTracks.fPy>0");
   //      pyplus->SetReapplyCut(kTRUE);
   //      tree->SetEventList(pyplus);
   //      tree->Draw("fTracks.fPy");
   //  will draw the fPy of only the tracks that have a positive fPy.
   //
   //  Note: Use tree->SetEventList(0) if you do not want use the list as input.

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/tree/src/TChain.cxx
File length: 68380 byte(s)
Diff to previous 16967
   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 16967 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 28 07:38:18 2006 UTC (8 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 68360 byte(s)
Diff to previous 16955
Fix coding convention

Revision 16955 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 27 14:14:24 2006 UTC (8 years, 1 month ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 68359 byte(s)
Diff to previous 16686
From Gerri:
This is the patch to move TDSet and TChainProof in 'proof' and remove
any dependence on PROOF in 'tree'. I have renamed TChainProof as TProofChain,
for consistency. TProofChain is now deriving from TChain and overrides only
the required methods. It is loaded via PluginManager by TChain in SetProof.
TQueryResult stores now all the input-related objects in fInputList. There
is a new method
   TObject *TQueryResult::GetInputObject(const char *classname)
to retrieve the first  instance of a class from the input list, so for the
TDSet:
   TQueryResult *qr;
   TDSet *dset = (TDSet *) qr->GetInputObject("TDSet")
The changes in TSessionViewer are needed to adapt to this new way of
accessing TDSets.

Revision 16686 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 6 00:10:07 2006 UTC (8 years, 2 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 68945 byte(s)
Diff to previous 16468
typo in comment.

Revision 16468 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 6 16:45:41 2006 UTC (8 years, 3 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 68955 byte(s)
Diff to previous 15935
Add more explicit comment on the various baskets sorting option currently available in the Fast CloneTree method

Revision 15935 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 6 07:15:01 2006 UTC (8 years, 5 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 67971 byte(s)
Diff to previous 15856
Handle several issues related to the TTree::Process() and TTree::Draw()
return values:
- TSelector: fStatus increased from Int_t to Long64_t. It is used to
  return the number of selected events by TTree::Draw() which returns
  a Long64_t.
- TVirtualProof, TProof, TDSet, TProofPlayer: Process() and Draw() were
  returning an Int_t, now a Long64_t to be consistent with TTree/TChain.
  Actually returning of TSelector::GetStatus() from the workers to be
  done tomorrow.
  Also added proper comments describing the return values for Draw()
  (number of selected events), and Process() (value returned by
  TSelector::GetStatus()).
- TTree, TChain, TSelectorDraw: added proper comments describing the
  return values of Draw() and Process().

Revision 15856 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 26 14:18:37 2006 UTC (8 years, 6 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 67606 byte(s)
Diff to previous 15849
From Gerri:
Fix a problem in Lookup affecting archive files (the anchor got lost after
lookup).

Revision 15849 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 26 13:36:44 2006 UTC (8 years, 6 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 67251 byte(s)
Diff to previous 15816
Instead of providing default implementations for copy ctor's and assignment
operators we better make them private (and not implemented) to avoid people
from accidentally using them. Especially the collections classes and the
TQObject derived classes. In these classes the default implementations would
cause havoc due to multiple deletions of the same objects and other
potential memory corruptions.

Revision 15816 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 17 18:38:51 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 68205 byte(s)
Diff to previous 15809
If one of the files in the chain is missing
we have no place to hold the pointer to the TTreeCache object.

Revision 15809 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 14 19:50:48 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 67972 byte(s)
Diff to previous 15795
avoid using a null pointer

Revision 15795 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 13 05:41:37 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 67942 byte(s)
Diff to previous 15680
From Paul Russo:
     o (LoadTree) We no longer delete clones from the trees in
       the chain, those trees still need to be able to synchronize
       their clones' branch addresses.  We now copy the chain's
       clone list into the newly fetched tree's clone list because
       it is the tree's destructor (which is called when we switch
       to the next file in the chain) that is responsible for
       resetting the addresses of the branches of the clone trees.
       If this is not done, the branches of the clone trees will
       be pointing at memory which was deallocated when the master
       tree was destroyed at the file switch.

     o (Merge) Improve documentation.

Revision 15680 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 4 10:23:53 2006 UTC (8 years, 6 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 62482 byte(s)
Diff to previous 15572
From Gerri:
 Attached is the patch to  improve the default speed of TChain::SetProof.

I have added two flags:
  - to control whether the tree header has to be retrieved or not
   (default kFALSE).
  - to force refreshing of the associated fChainProof; default is kFALSE;
    this is used internally by the "Add..." methods if fChainProof is defined,
    so that the new additions to the chain are automatically taken into account
    in the associated data set (this was one of the problems Jan-Fiete had).

TChainProof::StartViewer now checks if the tree header is available and,
if not, tries to get it from PROOF; so the behaviour is always the same,
except that now one waits only when the viewer is started, and not for
normal processing.

Revision 15572 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 27 14:36:28 2006 UTC (8 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 61548 byte(s)
Diff to previous 15536
-Rename class TFilePrefetch -> TFileCacheRead
-Rename class TTreeFilePrefetch -> TTreeCache
-Add new class TFileCacheWrite that implements automatic caching
 when writing network files. This class replaces the previous class TCache.
-old TCache class deleted.
-TFileCacheRead can read buffers from the wite cache in TFileCacheWrite.
-As a result TFile::UseCache is obsolete. The function is kept for
  backward compatibility.
-Remove references to TCache from TXMLFile, TSQLFile, TwebFile, TNetFile
-remove pointer TFile::fCache
-Add pointers TFile::fCacheRead and TFile::fCacheWrite
-Remove members fMaxCacheSize and fPageSize from TChain

NOTE that it is recommended to
  rm -f base/src/*.d base/src/*.o
  rm -f net/src/*.d  net/src/*.o
  rm -f tree/src/*.d tree/src/*.o

Revision 15536 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 25 14:14:11 2006 UTC (8 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 62214 byte(s)
Diff to previous 15476
Enhance SetBranchAddress so that the curent recommended code:
    chain->SetBranchAddres(branchname,&userdata); // once per chain
    ....
    branchptr = chain->GetBranch(branchname); // once per tree in the chain
can be replaced by:
    chain->SetBranchAddres(branchname,&userdata,&branchptr); // once per chain
As a result, branchptr will be either set to 0 when the branch does
not exist or the tree is not loaded yet and will be 'refreshed'
automatically everytime the chain loads a new tree.

MakeClass and MakeSelector have been updated to take advantage of
this new feature.  This removed most the code from the Notify
method.

Revision 15476 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 20 06:46:04 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 61496 byte(s)
Diff to previous 15468
Add a protection in TChain::LoadTree when looping over the list of friends.

Revision 15468 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 19 09:34:41 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 61428 byte(s)
Diff to previous 15455
The same variable t was used both as a Int_t and a TTree* inside LoadTree.
Results were OK, but change the second use of "t" to "at" for clarity.

Revision 15455 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 16 11:01:17 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 61406 byte(s)
Diff to previous 15421
Introduce two new major optimizations for the Tree cache.
  -in case of a TChain, the list of branches computed during the
   training phase of the first file is reused for all the other files.

 -add support for TEventlist. Only the baskets referenced by the list
  are added to the cache. This has requested a new function in TEventlist
    Bool_t TEventList::ContainsRange(Long64_t entrymin, Long64_t entrymax)
       // Return TRUE if list contains entries from entrymin to entrymax included.

Revision 15421 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 13:15:55 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 61443 byte(s)
Diff to previous 15381
mprove the prefetching algorithm in case of Trees.
A learning phase is introduced (by default one percent of
all entries) to find the list of branches referenced.
The learning fraction can be changed via TTreeFilePrefetch::SetLearnRatio

Revision 15381 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 8 16:59:02 2006 UTC (8 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 61436 byte(s)
Diff to previous 15369
Implement a proper TChain::ResetBranchAddresses

Revision 15369 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 8 12:46:45 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 61088 byte(s)
Diff to previous 15332
Several enhancements in the Tree file cache
  -support for TChain
  -Reuse the same cache when loading a new Tree

WARNING!!!!
==============================================
The TTree File cache is now set ON by default
==============================================

You can test the effect of the cache by setting
  mytree.SetCacheSize(0);  //default is 10000000 bytes
  mychain.SetCacheSize(0);

The cache has no negative impact on the performnace when reading
local files. It improves drastically the performance when reading
a remote file through a high latency network.

Revision 15332 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 5 20:30:28 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 60757 byte(s)
Diff to previous 15168
New class TTreeFilePrefetch:
//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TTreeFilePrefetch                                                    //
//                                                                      //
//  A specialized TFilePrefetch object for a TTree                      //
//  This class acts as a file cache, registering automatically the      //
//  baskets from the branches being processed (TTree::Draw or           //
//  TTree::Process and TSelectors.                                      //
//  This cache speeds-up considerably the performance, in particular    //
//  when the Tree is accessed remotely via a high latency network.      //
//                                                                      //
//  The default cache size (10 Mbytes) may be changed via the function  //
//      TTreeFilePrefetch::SetCacheSize                                 //
//                                                                      //
//  Only the baskets for the requested entry range are put in the cache //
//                                                                      //
//  For each Tree being processed a TTreeFilePrefetch object is created.//
//  This object is automatically deleted when the Tree is deleted or    //
//  when the file is deleted.
//                                                                      //
//////////////////////////////////////////////////////////////////////////

For the time being activate this cache with
   mytree.SetCacheSize();

New transient member fCacheSize added to TTree and the corresponding
Get/Set function.

Revision 15168 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 24 15:10:47 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 60687 byte(s)
Diff to previous 15159
Fix coding conventions violations

Revision 15159 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 22:57:36 2006 UTC (8 years, 8 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 60607 byte(s)
Diff to previous 15134
From Gerri:
TChain::Lookup() screws up a set of local files (general purpose macros may do
this for local files too), and the reason is a substitution which is not needed
after the fixes in TUrl.

Revision 15134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 60657 byte(s)
Diff to previous 14745
From Federico Carminati:

"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."

Revision 14745 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 19 08:22:26 2006 UTC (8 years, 9 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 59645 byte(s)
Diff to previous 14336
Change the TError.h macros:
Assert   ->  R__ASSERT
Check    ->  R__CHECK
Change the TCollection.h macro:
ForEach  ->  R__FOR_EACH
This to avoid potential problems due too trivial macro names.
The old macros will be removed in the next release. Currently
they will print out warning messages with the advice to move
to the new macro names.

Revision 14336 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 20 21:43:44 2006 UTC (8 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 59637 byte(s)
Diff to previous 14037
Reduce direct dependencies on TClass.h, TROOT.h and TStreamerInfo.h.
Warning:  This means that some file that relied on the indirect
inclusion of these header file might now fail to compile with
an error message mention that gROOT is no known or that TClass,
TROOT or TStreamerInfo is incompletely defined.  Simply add the
proper include directive.

Revision 14037 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 10 23:43:51 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 59617 byte(s)
Diff to previous 13987
Insure that there is a way to detect that some file where skipped when merging with the 'fast' option (see doc for details)

Revision 13987 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 3 21:55:39 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 59145 byte(s)
Diff to previous 13390
Update of spacing and documentation to match the coding rule

Revision 13390 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 29 10:43:54 2005 UTC (9 years, 1 month ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 59181 byte(s)
Diff to previous 13386
From Andreas:
initialize dir correctly.

Revision 13386 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 29 06:01:20 2005 UTC (9 years, 1 month ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 59204 byte(s)
Diff to previous 13265
Enable and document a variation of the 'fast' tree cloning method
where the baskets can be sorted by branches (SortBasketsByBranch).

Revision 13265 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 16 20:25:59 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 58640 byte(s)
Diff to previous 13207
Add an 'option' argument to the Merge method
Implement support for an option "fast" to TChain::Merge.
When using the "fast" option, TChain::Merge do not unzip nor unstream
the content of the TTress but copy directly the raw bytes of the baskets
from one file to another.

Revision 13207 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 11 22:16:04 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 58065 byte(s)
Diff to previous 12957
Update the spacing and documentation to match the coding rule

Revision 12957 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 14 10:50:22 2005 UTC (9 years, 3 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 57668 byte(s)
Diff to previous 12955
Implement possibility to reset the circularity in a TTree.
in function : void TTree::SetCircular(Long64_t maxEntries)

   // Enable/Disable circularity with this Tree
   // if maxEntries > 0 a maximum of maxEntries is kept in one buffer/basket
   // per branch in memory.
   //   Note that when this function is called (maxEntries>0) the Tree
   //   must be empty or having only one basket per branch.
   // if maxEntries <= 0 the tree circularity is disabled.
   //
   // NOTE 1:
   //  Circular Trees are interesting in online real time environments
   //  to store the results of the last maxEntries events.
   // NOTE 2:
   //  Calling SetCircular with maxEntries <= 0 is necessary before
   //  merging circular Trees that have been saved on files.
   // NOTE 3:
   //  SetCircular with maxEntries <= 0 is automatically called
   //  by TChain::Merge
   // NOTE 4:
   //  A circular Tree can still be saved in a file. When read back,
   //  it is still a circular Tree and can be filled again.

Also added the following functionality:
   //in case the Tree was originally created in gROOT, the branch
   //compression level was set to -1. If the Tree is now associated to
   //a file, reset the compression level to the file compression level

In TChain::Merge, the Tree circularity is automatically reset
to permit the merge of circular TTrees saved to a file.

Revision 12955 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 13 19:58:27 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 57589 byte(s)
Diff to previous 12911
TChain::FindBranch and TChain::FindLeaf now properly call their
counterpart in the interlying TTree object (fTree) instead of the
inherited version.
This results in TTree::Draw properly looking at the friend of
both the underlying TTree object and the TChain object (instead
of just the TChain object).

Revision 12911 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 6 19:20:42 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 57504 byte(s)
Diff to previous 12846
The name of the new tree created in TChain::Merge is now set to the name of the chain
__without__ the potential directory name.  Added comments on how to reproduce
the directory structure of the input files.

Revision 12846 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Sep 25 23:01:27 2005 UTC (9 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 56431 byte(s)
Diff to previous 12825
From Andreas:
some small corrections for the AliEn interface and the handling of TFileInfo.

Revision 12825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 23 13:04:53 2005 UTC (9 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 56427 byte(s)
Diff to previous 12812
From Andreas:
here are my modifications to interface the Grid file catalog
(AliEn in this case) with TChain data sets. Some changes are just
one-liner changes to make some base class things virtual or to set
some members. With these changes one can do:

// connect
TGrid::Connect("alien://");

// query
TGridResult* result = gGrid->Query("/alice/cern.ch/user/p/peters/analysis/miniesd/","*.root","","");

or

TGridResult* result = gGrid->Query("/alice/cern.ch/user/p/peters/analysis/miniesd/","*.root","","-l 50");  // to query maximum 50 files

result->Print(""); // or result->Print("l") or result->Print("all"); => Tells you also the complete size of the TDSet (the ALICE one is 68 GB)

// build chain for ALICE files
TChain* mychain = new TChain("esdTree","AliceSession");

// Get a list of FileInfo Objects
// -> I cannot use directly a list of FileInfo objects in TGridResult,
//    because TGridResult can be also a list of jobs etc ....

TList* list = result->GetFileInfoList()

// add them to a chain
mychain->AddFileInfoList(list);    // adds all
mychain->AddFileInfoList(list,10); // adds only the first 10

// to use PROOF then, you need to do
mychain->Lookup();                 // open's all files via TAlienFile over
                                      the redirector and replaces the
                                      alien URL with the physical location
                                      of the file on the cluster
                                      (including the access token)

mychain->SetProof();
mychain->Draw("ESD.fTrigger");

Revision 12812 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 22 09:57:25 2005 UTC (9 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 54675 byte(s)
Diff to previous 12722
fix some typos in comments.

Revision 12722 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 16 08:48:39 2005 UTC (9 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 54677 byte(s)
Diff to previous 12284
From Gerri:
Big patch supporting query queueing on the PROOF master, interogation and
interaction with the queue. Retrieval, finalization and archival of query
results and multiple PROOF sessions. Some other fixes:
- TMacro.h, .cxx
  add method Checksum to get the MD5 of the current context
  (needed for optimized selector reinitialization)

- Changes needed to create and fill the list of data sets (TROOT,
  TDSet, TChain, TChainProof)

- A new method TSelector::IsStandardDraw() to check if a selector
  is for standard draw actions

- TEventIter: fix for the missing last update (see above)

- Few protections in TPacketizers destructors

- Fix for code conventions in TPerfStats (the other will follow)

- Occasional missing last update of the progress bar (systematically
  reproduced with SetParallel(1)): all this part is quite involved
  and I have found a solution which does not harm but perhaps is not
  the most elegant.

- SetParallel(0): the progress bar was not working at all in such a
  case, since no packetizer is involved. Still it is useful to see
  that things are not stuck, so I have added some progress messages
  there too. The problem is that I have not found a way to get the total
  number of entries from a data set without doing all the machinery
  done in the packetizer.

Revision 12284 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 9 04:03:23 2005 UTC (9 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 54453 byte(s)
Diff to previous 12043
From Marek:
 Add friend trees to PROOF.

Revision 12043 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 14 08:52:55 2005 UTC (9 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 51804 byte(s)
Diff to previous 12037
From Marek Biskup:
The name of the new tree created in TChain::Merge is now set to the name of the chain
(before the name of the first tree in the chain was used).

Revision 12037 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 13 19:21:04 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TChain.cxx
File length: 51773 byte(s)
Diff to previous 11786
From Marek:
Fixed tree friends of a chain in the case when the friend chain has an index

Revision 11786 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 13 16:26:40 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 51625 byte(s)
Diff to previous 11740
From Philippe:
This patch repairs the tutorials treefriend.C.
In particular it solves a problem introduced by the locking mechanism
preventing infinitie recursions in the treatement of the Tree Friend.

The previous implementation was used only one lock for all methods
recursing through the friend (thus 2 unrelated methods were locking
each other out).  The new implementation uses a different lock for
each methods.  This new implementation also solves Thomas Bretz's
issue (http://root.cern.ch/root/roottalk/roottalk05/1020.html).

Revision 11740 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 6 08:57:45 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 51595 byte(s)
Diff to previous 11715
From Philippe:
In TTree, improve the lookup of the alias of a leaf when we have a circular
list of friends.
In TChain, insure that the sub-tree of the chain which is a friend are
properly update in the current tree even if there was additional friends
added since the last TChain::LoadTree was executed.

Revision 11715 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 2 10:57:32 2005 UTC (9 years, 8 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 51322 byte(s)
Diff to previous 11681
Use TVirtualProof.h and not TProof.h.

Revision 11681 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 28 07:29:24 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 51340 byte(s)
Diff to previous 11590
From Philippe:
This patch solves a couple of issue with chains friends when the
chains were also manipulated on their own (some cached TTree pointers
were not refreshed properly).

We now fully support nested and recursive friends.

To support recursive friends, we introduced TTree::TFriendLock which
is used to set and reset the kFriendLock bit in the TTree (or TChain)
object once it has been seen during a recursion handling nested
friends.  Hence each objects is guaranteed to best used only once.
The current implementation is not yet thread safe but it would be
straightforward to add it (and then we should also use the same
lock in AddFriend).

Revision 11590 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 14 21:30:11 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 50851 byte(s)
Diff to previous 11589
From Philippe,
Replace previous poorly written code like
         nextTree = (TTree*)nextFriend->GetTree();
by a more modern and readable style
         nextTree = const_cast<TTree*>(nextFriend->GetTree());
::)

Revision 11589 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 14 16:42:41 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 50820 byte(s)
Diff to previous 11393
In TChain::GetEntries remove an obsolete cast to Stat_t

Revision 11393 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 21 16:20:56 2005 UTC (9 years, 10 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 50828 byte(s)
Diff to previous 11281
change name of TProofChain to TChainProof, this class does not directly
belong to PROOF but it provides a chain proxy that runs on PROOF.
To compile you need to clean *.d's that reference the old file. To find these
files do: rm `find . -name \*.d -exec grep -l TProofChain {} \;`

Revision 11281 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 10 17:57:05 2005 UTC (9 years, 10 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 50829 byte(s)
Diff to previous 11152
From Marek Biskup:
major new PROOF developments:
 - access to PROOF directly via the TChain interface (creating a TDSet
   in the background).
 - access to PROOF based trees via the TTreeViewer
 - fully implemented the TChain/TDSet::Draw() interface.
 - PROOF sessions can now be browsed via the TBrowser

Revision 11152 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Feb 20 10:31:57 2005 UTC (9 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 47511 byte(s)
Diff to previous 10983
Thanks to Axel for reporting a typo in the doc of TChain::Merge
"Input File" changed to "Output File"

Revision 10983 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 25 17:05:16 2005 UTC (10 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 47510 byte(s)
Diff to previous 10898
From Marco van Leeuwen:
I've made some small modifications (see attachment) to TChain::LoadTree(), which enables a TChain to skip corrupted files while looping to a chain. My modifications are in fact a simple extension of Philippe Canals fix for empty files,.

Revision 10898 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 12 07:50:03 2005 UTC (10 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 47317 byte(s)
Diff to previous 10757
From Philippe:
A) Support for top level STL Containers.  You can now do
   list<int> *ptr = new list<int>;
   tree->Branch("mystl","list<int>",&ptr);

B) Autodetection of the pointer type passed to the branch constructor.
So you can now do:
   list<int> *ptr = new list<int>;
   tree->Branch("mystl",&ptr);

C) Check of the type of the pointer type passed to the branch constructor.
So that you now get an error:
   list<int> *ptr = new list<int>;
   tree->Branch("mystl","list<float>",&ptr);

Error in <TTree::Branch>: The class requested (list<float>) for the branch
"mystl" is different from the type of the pointer passed (list<int>)

D) TTree's SetBranchAddress now also check its input address (unless the
user explicitly specify (char*) or (void*).

Test/Event and the tree tutorials have been updated to take advantage of the
new syntax.

Revision 10757 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Dec 11 08:26:45 2004 UTC (10 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 46412 byte(s)
Diff to previous 10438
Implement TChain::LoasBaskets
// This function overrides TTree::LoadBaskets and is dummy.
// It could be implemented and load all baskets of all trees in the chain.
// For the time being use TChain::Merge and TTree::LoadBasket
// on the resulting tree.

Revision 10438 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 31 09:28:06 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 45969 byte(s)
Diff to previous 9851
Add an optional argument to TChain::AddFile.
By default the chain loads a Tree from the file having the name
specified in the Tree constructor. If the argument is specified,
it will override the default.

Revision 9851 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 27 11:23:40 2004 UTC (10 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 45711 byte(s)
Diff to previous 9615
From Philippe:
this patch corrects the calculation of the TreeOffset when
adding a chain to a chain. The previous implementation
ended up adding kBigNumber together, resulting in incorrect
values for fEntryOffset (and thus for fEntries).

Revision 9615 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 29 10:54:55 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 45593 byte(s)
Diff to previous 9275

*****************WARNING*****************
With this mega patch, we introduce support for TTree/TChain  with more than
2 billion entries. Several class data members have been changed from
Int_t (or Stat_t) to Long64_t.
==>Trees written with this new version cannot be read with older versions
******************************************

TBranch:
========
 - replace the members with type Int_t or Stat_t by Long64_t
    Long64_t    fEntryNumber;     //  Current entry number (last one filled in this branch)
    Long64_t    fReadEntry;       //! Current entry number when reading
    Long64_t    fEntries;         //  Number of entries
    Long64_t    fTotBytes;        //  Total number of bytes in all leaves before compression
    Long64_t    fZipBytes;        //  Total number of bytes in all leaves after compression
    Long64_t   *fBasketEntry;     //[fMaxBaskets] Table of first entry in eack basket

 - corresponding changes in the member functions
    virtual Int_t     GetEntry(Long64_t entry=0, Int_t getall = 0);
    virtual Int_t     GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n);
            Int_t     GetEvent(Long64_t entry=0) {return GetEntry(entry);}
            Long64_t *GetBasketEntry() const {return fBasketEntry;}
            Long64_t  GetReadEntry()   const {return fReadEntry;}
            Long64_t  GetTotalSize()   const;
            Long64_t  GetTotBytes()    const {return fTotBytes;}
            Long64_t  GetZipBytes()    const {return fZipBytes;}
            Long64_t  GetEntryNumber() const {return fEntryNumber;}
            Long64_t  GetEntries()     const {return fEntries;}

TBranch::Streamer has been modified to read old files and automatically translate
the old types to the new types.
The new version of Streamer uses the TClass::ReadBuffer/WriteBuffer.

TBranch::Print has been modified to take into account the new data types.

ClassDef version increased to 10.

TBranchClones:
==============
    virtual Int_t    GetEntry(Long64_t entry=0, Int_t getall = 0);

TBranchElement:
===============
            Int_t    GetEntry(Long64_t entry=0, Int_t getall = 0);

TBranchObject:
==============
    virtual Int_t    GetEntry(Long64_t entry=0, Int_t getall = 0);

TChain:
=======
    Long64_t    *fTreeOffset;       //[fTreeOffsetLen]Array of variables

    virtual Int_t     Add(const char *name, Long64_t nentries=kBigNumber);
    virtual Int_t     AddFile(const char *name, Long64_t nentries=kBigNumber);
    virtual Long64_t  Draw(const char *varexp, const TCut &selection, Option_t *option=""
                       ,Long64_t nentries=kBigNumber, Long64_t firstentry=0);
    virtual Long64_t  Draw(const char *varexp, const char *selection, Option_t *option=""
                     ,Long64_t nentries=kBigNumber, Long64_t firstentry=0); // *MENU*
    virtual Long64_t  GetChainEntryNumber(Long64_t entry) const;
    virtual Long64_t  GetEntries() const;
    virtual Int_t     GetEntry(Long64_t entry=0, Int_t getall=0);
            Long64_t  LoadTree(Long64_t entry);
    virtual void      Loop(Option_t *option="",Long64_t nentries=kBigNumber, Long64_t firstentry=0); // *MENU*
    virtual Long64_t  Merge(const char *name);
    virtual Long64_t  Merge(TCollection *list);
    virtual Long64_t  Merge(TFile *file, Int_t basketsize, Option_t *option="");
    virtual Long64_t  Process(const char *filename,Option_t *option="", Long64_t nentries=kBigNumber, Long64_t firstentry=0); // *MENU*
    virtual Long64_t  Process(TSelector *selector,Option_t *option="",  Long64_t nentries=kBigNumber, Long64_t firstentry=0);

ClassDef version changed from 4 to 5

TSelector
=========
   virtual Bool_t      ProcessCut(Long64_t /*entry*/) { return kTRUE; }
   virtual void        ProcessFill(Long64_t /*entry*/) { }
   virtual Bool_t      Process(Long64_t /*entry*/) { return kFALSE; }

TSelectorCint
=============
   virtual Bool_t      ProcessCut(Long64_t entry);
   virtual void        ProcessFill(Long64_t entry);
   virtual Bool_t      Process(Long64_t entry);

TSelectorDraw
=============
    Long64_t       fDraw;           //! Last entry loop number when object was drawn
    Long64_t       fSelectedRows;   //  Number of selected entries
    Long64_t       fOldEstimate;    //  value of Tree fEstimate when selector is called
    Double_t      *fV1;             //![fSelectedRows]Local buffer for variable 1
    Double_t      *fV2;             //![fSelectedRows]Local buffer for variable 2
    Double_t      *fV3;             //![fSelectedRows]Local buffer for variable 3
    Double_t      *fV4;             //![fSelectedRows]Local buffer for variable 4
    Double_t      *fW;              //![fSelectedRows]Local buffer for weights

    virtual Long64_t  GetSelectedRows() const {return fSelectedRows;}
    virtual Bool_t    Process(Long64_t /*entry*/) { return kFALSE; }
    virtual void      ProcessFill(Long64_t entry);
    virtual void      ProcessFillMultiple(Long64_t entry);
    virtual void      ProcessFillObject(Long64_t entry);
    virtual void      SetEstimate(Long64_t n);

TTree
=====
Modified data types
    Long64_t       fEntries;           //  Number of entries
    Long64_t       fTotBytes;          //  Total number of bytes in all branches before compression
    Long64_t       fZipBytes;          //  Total number of bytes in all branches after compression
    Long64_t       fSavedBytes;        //  Number of autosaved bytes
    Long64_t       fMaxEntryLoop;      //  Maximum number of entries to process
    Long64_t       fMaxVirtualSize;    //  Maximum total size of buffers kept in memory
    Long64_t       fAutoSave;          //  Autosave tree when fAutoSave bytes produced
    Long64_t       fEstimate;          //  Number of entries to estimate histogram limits
    Long64_t       fChainOffset;       //! Offset of 1st entry of this Tree in a TChain
    Long64_t       fReadEntry;         //! Number of the entry being processed
    Long64_t       fTotalBuffers;      //! Total number of bytes in branch buffers
    Long64_t       fDebugMin;          //! First entry number to debug
    Long64_t       fDebugMax;          //! Last entry number to debug

New function signatures
    virtual Long64_t     AutoSave(Option_t *option="");
    virtual TTree       *CloneTree(Long64_t nentries=-1, Option_t *option="");
    virtual Long64_t     CopyEntries(TTree *tree, Long64_t nentries=-1);
    virtual TTree       *CopyTree(const char *selection, Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Draw(const char *varexp, const TCut &selection, Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Draw(const char *varexp, const char *selection, Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    virtual Long64_t     Fit(const char *funcname ,const char *varexp, const char *selection="",Option_t *option="" ,Option_t *goption=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    virtual Long64_t     GetChainEntryNumber(Long64_t entry) const {return entry;}
    virtual Long64_t     GetChainOffset() const { return fChainOffset; }
            Long64_t     GetDebugMax()  const {return fDebugMax;}
            Long64_t     GetDebugMin()  const {return fDebugMin;}
    virtual Long64_t     GetEntries() const   {return fEntries;}
    virtual Long64_t     GetEntriesFast() const   {return fEntries;}
    virtual Long64_t     GetEntriesFriend() const;
    virtual Long64_t     GetEstimate() const { return fEstimate; }
    virtual Int_t        GetEntry(Long64_t entry=0, Int_t getall=0);
            Int_t        GetEvent(Long64_t entry=0, Int_t getall=0) {return GetEntry(entry,getall);}
    virtual Long64_t     GetEntryNumberWithBestIndex(Int_t major, Int_t minor=0) const;
    virtual Long64_t     GetEntryNumberWithIndex(Int_t major, Int_t minor=0) const;
    virtual Long64_t     GetEntryNumber(Long64_t entry) const;
    virtual Long64_t     GetMaxEntryLoop() const {return fMaxEntryLoop;}
    static  Long64_t     GetMaxTreeSize();
    virtual Long64_t     GetMaxVirtualSize() const {return fMaxVirtualSize;}
    virtual Long64_t     GetReadEntry()  const {return fReadEntry;}
    virtual Long64_t     GetReadEvent()  const {return fReadEntry;}
    virtual Long64_t     GetSelectedRows() {return GetPlayer()->GetSelectedRows();}
    virtual Long64_t     GetTotBytes() const {return fTotBytes;}
    virtual Long64_t     GetZipBytes() const {return fZipBytes;}
    virtual Long64_t     LoadTree(Long64_t entry);
    virtual Long64_t     LoadTreeFriend(Long64_t entry, TTree *T);
    virtual Long64_t     Merge(TCollection *list);
    TPrincipal          *Principal(const char *varexp="", const char *selection="", Option_t *option="np"
                                   ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Process(const char *filename,Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    virtual Long64_t     Process(TSelector *selector, Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Project(const char *hname, const char *varexp, const char *selection="", Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual TSQLResult  *Query(const char *varexp="", const char *selection="", Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Scan(const char *varexp="", const char *selection="", Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    virtual void         SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999); // *MENU*
    virtual void         SetEntries(Long64_t n);
    virtual void         SetEstimate(Long64_t nentries=10000);
    virtual void         SetMaxEntryLoop(Long64_t maxev=1000000000) {fMaxEntryLoop = maxev;} // *MENU*
    static  void         SetMaxTreeSize(Long64_t maxsize=1900000000);
    virtual void         SetMaxVirtualSize(Long64_t size=0) {fMaxVirtualSize = size;} // *MENU*
    virtual void         Show(Long64_t entry=-1, Int_t lenmax=20);
    virtual Long64_t     UnbinnedFit(const char *funcname ,const char *varexp, const char *selection="",Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);

TTree::Streamer has been modified to real old files.
TTree::Print has been modified to take into account the new data types.

ClassDef version number incremented to 13.

TVirtualTreePlayer
==================
    virtual TTree         *CopyTree(const char *selection, Option_t *option=""
                            ,Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
    virtual Long64_t       DrawScript(const char* wrapperPrefix,
                                      const char *macrofilename, const char *cutfilename,
                                      Option_t *option, Long64_t nentries, Long64_t firstentry) = 0;
    virtual Long64_t       DrawSelect(const char *varexp, const char *selection, Option_t *option
                            ,Long64_t nentries, Long64_t firstentry) = 0;
    virtual Long64_t       Fit(const char *formula ,const char *varexp, const char *selection,Option_t *option ,Option_t *goption
                            ,Long64_t nentries, Long64_t firstentry) = 0;
    virtual Long64_t       GetSelectedRows() const = 0;
    virtual TPrincipal    *Principal(const char *varexp="", const char *selection="", Option_t *option="np"
                           ,Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
    virtual Long64_t       Process(const char *filename,Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
    virtual Long64_t       Process(TSelector *selector,Option_t *option="",  Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
    virtual Long64_t       Scan(const char *varexp, const char *selection, Option_t *option
                            ,Long64_t nentries, Long64_t firstentry) = 0;
    virtual TSQLResult    *Query(const char *varexp, const char *selection, Option_t *option
                            ,Long64_t nentries, Long64_t firstentry) = 0;
    virtual void           SetEstimate(Long64_t n) = 0;
    virtual Long64_t       UnbinnedFit(const char *formula ,const char *varexp, const char *selection,Option_t *option
                            ,Long64_t nentries, Long64_t firstentry) = 0;

TTreeFormula
============
   TLeaf*      GetLeafWithDatamember(const char* topchoice, const char* nextchice, Long64_t readentry) const;
   Bool_t      BranchHasMethod(TLeaf* leaf, TBranch* branch,
                               const char* method,const char* params,
                               Long64_t readentry) const;

TTreePlayer
===========
    Long64_t       fSelectedRows;    //  Number of selected entries

    virtual TTree    *CopyTree(const char *selection, Option_t *option
                       ,Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  DrawScript(const char* wrapperPrefix,
                                 const char *macrofilename, const char *cutfilename,
                                 Option_t *option, Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  DrawSelect(const char *varexp, const char *selection, Option_t *option
                                 ,Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  Fit(const char *formula ,const char *varexp, const char *selection,Option_t *option ,
                          Option_t *goption ,Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  GetSelectedRows() const {return fSelectedRows;}
    TPrincipal       *Principal(const char *varexp, const char *selection, Option_t *option
                       ,Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  Process(const char *filename,Option_t *option, Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  Process(TSelector *selector,Option_t *option,  Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  Scan(const char *varexp, const char *selection, Option_t *option
                       ,Long64_t nentries, Long64_t firstentry);
    virtual TSQLResult *Query(const char *varexp, const char *selection, Option_t *option
                         ,Long64_t nentries, Long64_t firstentry);
    virtual void      SetEstimate(Long64_t n);
    virtual Long64_t  UnbinnedFit(const char *formula ,const char *varexp, const char *selection,Option_t *option
                       ,Long64_t nentries, Long64_t firstentry);

The generated code by TTreePlayer::MakeCode, MakeClass, MakeProxy
uses Long64_t instead of Int_t

TTreeViewer
===========
    Long64_t      Process(const char* filename, Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    void          SetCurrentRecord(Long64_t entry);

THbookBranch
============
    virtual Int_t    GetEntry(Long64_t entry=0, Int_t getall=0);
    virtual void     SetEntries(Long64_t n) {fEntries=n;}

THbookTree
==========
    virtual Int_t    GetEntry(Long64_t entry=0, Int_t getall=0);
    virtual void     InitBranches(Long64_t entry);
    virtual void     SetEntries(Long64_t n);

TProofDraw
==========
    virtual Bool_t   Process(Long64_t /*entry*/);

TProofPlayer
============
    virtual Long64_t  Process(TDSet *set,
    virtual Long64_t  DrawSelect(TDSet *set, const char *varexp,
    Long64_t          Process(TDSet *set, const char *selector,
    Long64_t          DrawSelect(TDSet *set, const char *varexp,

Revision 9275 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 22 06:42:11 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 45505 byte(s)
Diff to previous 9202
Implement function TChain::GetEntryWithIndex.
The function in the base class TTree cannot work for TChain.

Revision 9202 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 15 08:19:09 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 44878 byte(s)
Diff to previous 9190
Add important remarks in TChain::SetBranchAddress and SetBranchStatus:
// IMPORTANT REMARK:
// In case TChain::SetBranchStatus is called, it must be called
// BEFORE calling this function.

Revision 9190 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 14 09:38:35 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 44725 byte(s)
Diff to previous 9131
Change an ambiguous test in TChain::GetEntry, replacing:
   if (LoadTree(entry) < 0 || fTree==0) return 0;
to
   if (LoadTree(entry) < 0) return 0;
   if (fTree==0) return 0;

Revision 9131 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 5 05:19:36 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 44709 byte(s)
Diff to previous 8747
From Maarten:
Here is the patch with the PROOF style merge function.
It seems a protection is need to not call CopyAddresses()
for a TTree with zero entries.

Revision 8747 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 30 00:27:46 2004 UTC (10 years, 8 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 44487 byte(s)
Diff to previous 8353
From Victor:
TFile::Open() can return 0, adjust tests accordingly.

Revision 8353 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 9 21:17:06 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 44488 byte(s)
Diff to previous 8340
From Philippe:
With this updates, TChain handles more elegantly the case where
one of the tree is 'missing' (i.e. could not open the file, TTree
not present in the file, etc.).

Instead of just failing (and doing a bad job at error recovery),
we set up the TreeOffset in such a way that the missing tree is
counted as an empty tree.

In particular, this allows the perfect usage of a chain with a
missing tree.

Revision 8340 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 8 17:06:10 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 44127 byte(s)
Diff to previous 7572
In TChain::LoadTree add support for the special case where all Trees
in the chain have 0 entries. The first Tree in the chain is loaded
such that TTree::CloneTree can still work.

Revision 7572 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 12 07:23:08 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 43908 byte(s)
Diff to previous 7507
Protect TChain::GetEntry in case of an empty chain.
Add a comment in the function indicating that 0 bytes are returned
in this case.

Revision 7507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Nov 1 10:48:18 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 43859 byte(s)
Diff to previous 7281
In TChain::Merge, implement a new option "keep" to not close the file
after Merging.

Revision 7281 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 15 15:49:57 2003 UTC (11 years, 4 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 43652 byte(s)
Diff to previous 7273
Add a protection in TChain::LoadTree

Revision 7273 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 12 15:54:16 2003 UTC (11 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 43651 byte(s)
Diff to previous 7153
new TString::MaybeWildcard() that returns true if a filename contains
a wildcard character: []*?
Use MaybeWildcard() in TChain::Add() instead of TString::MaybeRegexp()
which tested if a file contained any regexp character: ^$.[]*+?

Revision 7153 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 25 17:31:42 2003 UTC (11 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 43665 byte(s)
Diff to previous 7111
From Philippe:

This patch solves 2 problems.

If a simple tree was made the friend of a chain, the simple tree was loaded using the 'entry in the tree (inside the
chain)' instead of the 'entry in the chain'.  This resulted in ONLY the first part of the simple tree to be used (over
and over again)!

TTree::Scan (Query and CopyTree) could not handle the case where a TChain was made a friend of a TTree (and problably
more cases of uneven length chain friends).  This was
because, it never detected that a new file was open since it only looked a the main Tree (and none of its friend).  In
consequence the formula were not updated when they should.

Revision 7111 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 20 06:53:16 2003 UTC (11 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 43187 byte(s)
Diff to previous 7086
In TChain::Add, sort the files in alphanumeric order in case of wildcarding.

Revision 7086 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 14 04:44:20 2003 UTC (11 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 42882 byte(s)
Diff to previous 7016
From Philippe:

This patch update SetBranchStatus so that it also search TTree Friends for matching branches.

Revision 7016 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 29 16:38:06 2003 UTC (11 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 42650 byte(s)
Diff to previous 7007
From Philippe:
If the filename points to a directory it looks like TFile::Open returns 0.
This patch makes TChain::LoadTree react properly to this case.

Revision 7007 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 27 05:16:01 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 42622 byte(s)
Diff to previous 7005
From Philippe:
Fix a bug introduced in the previous change to TChain::Add preventing to use
a tree name of more than one letter when the
filename provided to AddFile contains a regular expression.

Revision 7005 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 25 17:41:37 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 42576 byte(s)
Diff to previous 6990
m Philippe:

TChain::Add was broken since the latest improvement to the
regular expression.  Now it seems that:
    c = new TChain("T2");
    c->Add("event.root/T");
is taken has a regular expression.  This would have been 'okay' if it was
not for the fact that the regular expression par of TChain::Add never
supported the '/treename' syntax.  In addition, if (and only if) a path was
specified then the filename had to end with '.root' (if the path was not
specified the filename could end in anything the user wanted!).

This patch fix those problems (and add support for any file name length!)

Revision 6990 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 22 16:12:32 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 42434 byte(s)
Diff to previous 6974
Implement a new function:
void TChain::CanDeleteRefs(Bool_t flag)
 when closing a file during the chain processing, the file
may be closed with option "R" if flag is set to kTRUE.
by default flag is kTRUE.
When closing a file with option "R", all TProcessIDs referenced by this
file are deleted.
Calling TFile::Close("R") might be necessary in case one reads a long list
of files having TRef, writing some of the referenced objects or TRef
to a new file. If the TRef or referenced objects of the file being closed
will not be referenced again, it is possible to minimize the size
of the TProcessID data structures in memory by forcing a delete of
the unused TProcessID.

Revision 6974 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 18 16:26:01 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 41629 byte(s)
Diff to previous 6964
Fix from Maarten in TChain::AddFile to support wildcarding and in particular
something like:
  TChain ch("T");
  ch.Add("file_[0-9].root");

Revision 6964 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 17 16:34:52 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 41622 byte(s)
Diff to previous 6848
Add important remarks in the doc of TTree::SetBranchStatus and TChain::SetBranchStatus

Revision 6848 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 7 21:08:24 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 41567 byte(s)
Diff to previous 6839
From Philippe;
This patch adds support in the new tree cloning scheme for
        TTree *clone = chain->GetTree()->CloneTree(0);
If chain is really a TChain, need to make sure that it keeps track of the clones even when the tree that was
actually cloned is deleted by LoadTree.

Revision 6839 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 6 19:44:31 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 41081 byte(s)
Diff to previous 6838
remove unused variable treeNumber

Revision 6838 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 6 19:41:49 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 41107 byte(s)
Diff to previous 6824
From Philippe:
This patch comments the fact after TTree::CloneTree and until the original is deleted, the addresses of the original
are passed on to all the clones.  Also the addresses of the clones are reset when the original is deleted.

This patch also simplify the implementation of TChain::Merge to take advantage of the new TTree::CloneTree feature.

Revision 6824 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 4 13:27:35 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 42684 byte(s)
Diff to previous 6805
From Philippe:
This update remove the need to set the addresses before calling CloneTree or CopyTree.  This is accomplished by
        - making sure that default addresses are created before passing it to the clone.
        - keep a list of cloned trees and inform them when an address change.

Also hard to trace memory errors due to the 'link' between the original and the cloned tree are removed by
making the original reset all the addresses of the cloned tree whenever the original tree/chain is deleted.

Revision 6805 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 30 15:45:52 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 41661 byte(s)
Diff to previous 6773
From Philippe:
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).

Revision 6773 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 24 14:00:59 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 41204 byte(s)
Diff to previous 6672
Move TChain::GetFile to the implementation file.
In case no file is connected, GetFile automatically loads the first file.

Revision 6672 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 2 10:36:05 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 40865 byte(s)
Diff to previous 6409
In TChain::LoadTree allways call fTree->SetBranchStatus independently
of teh value of the status in the chain element (thanks Gordon Watts).

Revision 6409 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 9 14:30:38 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 40881 byte(s)
Diff to previous 6329
From Philippe:
There is still a problem with TChains and StartViewer (In the call stack one of the TDirectory object stored is deleted then used).  This patch fixes the problem.

Revision 6329 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 19 17:25:09 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 40790 byte(s)
Diff to previous 6328
This patch from Philippe allos to set  the address of branch in a friend which is a TChain.

Revision 6328 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 19 14:01:51 2003 UTC (11 years, 10 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 40790 byte(s)
Diff to previous 6306
replace argument "TCut" by "const TCut&" in method Draw(). Allows replacement
of TCut.h by a simple forward declaration.

Revision 6306 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 14 19:21:19 2003 UTC (11 years, 10 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 40766 byte(s)
Diff to previous 6263
add method UseCache(). This allows the setting of file cache options for
the files opened by the chain. Same arguments and options as TFile::UseCache().

Revision 6263 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 6 23:07:06 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 39970 byte(s)
Diff to previous 5902
From Philippe;
This patch corrects 2 problems.
The first one is one where the list of friends of a tree of a chain was not properly updated if the friend was added after the tree was
loaded (i.e c->LoadTree(); c->AddFriend(); ).
The second one was a failure of TTreeFormula to request (sometime) the proper entry of a branch if this branch was part of a friends of a
chain where the tree where uneven in lenght(but the 2 chains were of the same length).

Revision 5902 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 13 20:18:33 2003 UTC (12 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 39424 byte(s)
Diff to previous 5719
Add comments in TChain::Merge to indicate that the input file is always closed and deleted.

Revision 5719 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 2 22:07:08 2002 UTC (12 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 39193 byte(s)
Diff to previous 5717
From Philippe:
The following patch allows TTree objects to properly treat TTreeFriends which are actually TChain objects.
Also adding a few protection in case of an empty chain.

Revision 5717 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 2 18:50:12 2002 UTC (12 years, 1 month ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 39097 byte(s)
Diff to previous 5544
mega patch to remove almost all compiler warnings on MacOS X where the
compiler is by default in pedantic mode (LHCb also like to use this option).
The following issues have been fixed:
- removal of unused arguments
- comparison between signed and unsigned integers
- not calling of base class copy ctor in copy ctor's
To be done, the TGeo classes where we get still many hundred warnings of
the above nature. List forwarded to Andrei.

Revision 5544 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 5 13:21:03 2002 UTC (12 years, 2 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 39096 byte(s)
Diff to previous 5149
Fix a problem in TChain::LoadTree in case one file has a Tree
with no entries.

Revision 5149 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 18 20:52:28 2002 UTC (12 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 39032 byte(s)
Diff to previous 5145
Fix portability problem in TChain::Merge

Revision 5145 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 17 21:41:13 2002 UTC (12 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 39006 byte(s)
Diff to previous 4899
Delete static member fgMaxMergeSize and corresponding getter/setter.
The logic for automatic file overflow is now implemented in TTree::Fill
and can be removed from TChain::Merge

Revision 4899 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 13 21:56:12 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 40851 byte(s)
Diff to previous 4893
Modify TChain::SetBranchAddress and TChain::SetBranchStatus to set
the address/status of the current Tree instead of forcing a reload
of the current Tree.

Revision 4893 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 13 11:35:52 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 40679 byte(s)
Diff to previous 4827
Add a new function
  TChain::SetAutoDelete(Bool_t autodelete=kTRUE).
This function can be called to set the branch AutoDelete flag
when a new Tree is loaded by LoadTree.

Add new comments in GetBranch, GetLeaf.

Revision 4827 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 6 06:54:35 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 41421 byte(s)
Diff to previous 4773
From Philippe
This patch solves an ownership problem (friend chains on the stack were
delete), it also fix a problem with refreshing the pointer to the leaf
when the leaf was accessed using a tree-alias name.  It also enables the
befriending of chains contains series of trees of unequal size (in
parallel).

It also re-enable using string (char*) store into a TClonesArray using a
TTree::Draw command (in the current version it was reading repetitively
the string of the 1st element).

Revision 4773 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 25 05:47:51 2002 UTC (12 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 39822 byte(s)
Diff to previous 4710
Fixes by Philippe to support Tree friends with TChains.
Still some limitations.The chains have to have a list of file
which have (in parallel) the same number of event.  (This is because
(for now) the length of each tree is compared with the other trees).
Also I did not test saving and reloading chains with friend.

Revision 4710 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 14 13:47:15 2002 UTC (12 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 38264 byte(s)
Diff to previous 4696
In TChain::LoadTree, update the number of entries in TChainElement
when reading a new Tree.

Revision 4696 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 12 20:29:47 2002 UTC (12 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 38221 byte(s)
Diff to previous 4589
Add a few protections in case the TChain default constructor is called,
then TChain::Add or TChain::Print are called.

Revision 4589 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 23 20:06:09 2002 UTC (12 years, 8 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 38187 byte(s)
Diff to previous 4520
Implement new logic in TChain for SetBranchStatus proposed by Nils.Krumnack@desy.de

Revision 4520 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 11 09:15:27 2002 UTC (12 years, 8 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 38087 byte(s)
Diff to previous 4512
Fix one more case in TChain::LoadTree when TChain::GetEntries is called after TChain::SetBranchAddress.

Revision 4512 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 10 09:59:00 2002 UTC (12 years, 8 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 38090 byte(s)
Diff to previous 4389
Fix a special case in TChain::LoadTree in case TChain::SetBranchAddress is called
followed directly by TChain::GetEntries.

Revision 4389 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Apr 21 21:55:14 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 38070 byte(s)
Diff to previous 4335
In the TChain constructor, do not create the TChainElement with name "*".
This has side effects with SetBranchStatus/SetBranchAddress in case
the top level branch of a Tree is disabled.

Revision 4335 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 9 15:29:13 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 38059 byte(s)
Diff to previous 4263
Add comments in TChain::Print

Revision 4263 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 28 15:34:51 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 37947 byte(s)
Diff to previous 4131
In TChain destructor, delete the current file as well

Revision 4131 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 28 17:07:07 2002 UTC (12 years, 10 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 37934 byte(s)
Diff to previous 4126
cast fEntries to int to remove warning in calling LoadTree() in GetEntries().
Also return Double_t instead of Stat_t (although equivalent) to be in sync
with TTree which returns a Double_t. Brought kBigNumber in TChain scope
(and is now automatically available via CINT).

Revision 4126 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 27 16:13:10 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 37950 byte(s)
Diff to previous 3914
Implement TChain::SetDirectory redefining TTree::SetDirectory.
Protect TChain::LoadTree against wrong assignement of fDirectory/fFile.

Revision 3914 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 7 08:42:59 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 37252 byte(s)
Diff to previous 3913
Fix typo in previous patch.

Revision 3913 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 7 08:41:13 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 37230 byte(s)
Diff to previous 3852
In TChain::AddFile, do not delete the tree before deleting the file.
In TChain::Add, when wildcarding is used, call TChain::AddFile with a default
second argument (nentries=kBigNumber)

Revision 3852 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Feb 3 17:32:27 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 37255 byte(s)
Diff to previous 3707
New functions GetWeight and SetWeight redefining the functions in TTree.
void TChain::SetWeight(Double_t w, Option_t *option)
{
//  Set chain weight.
//  The weight is used by TTree::Draw to automatically weight each
//  selected entry in the resulting histogram.
//  For example the equivalent of
//     chain.Draw("x","w")
//  is
//     chain.SetWeight(w,"global");
//     chain.Draw("x");
//
//  By default the weight used will be the weight
//  of each Tree in the TChain. However, one can force the individual
//  weights to be ignored by specifying the option "global".
//  In this case, the TChain global weight will be used for all Trees.


Double_t TChain::GetWeight() const
{
//  return the chain weight.
//  by default, the weight is the weight of the current Tree in the TChain.
//  However, if the weight has been set in TChain::SetWeight with
//  the option "global", each Tree will use the same weight stored
//  in TChain::fWeight.

Revision 3707 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 19 11:04:41 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 35944 byte(s)
Diff to previous 3702
Add a new function TTree::GetEntriesFast. In case of a Tree,
both GetEntries and GetEntriesFast return directly fEntries.
In case of a TChain, GetEntries will force the read of the Tree headers
in all the files to get the number of entries and set the table of offsets.

The new function GetEntriesFast is  used internally by TChain
or TTreePlayer to make sure that the TChain files are processed
only once in a given query.

TTreePlayer::MakeStats has been modified to call GetEntriesFast
instead of GetEntries.

These changes make the new functionality of TChain::Add backward compatible.

Revision 3702 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 18 15:06:07 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 36001 byte(s)
Diff to previous 3695
Replace constant 1000000000 by kBigNumber

Revision 3695 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 18 11:32:13 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 35995 byte(s)
Diff to previous 3664
Change the default option for nentries when calling TChain::Add
The previous default (-1) is changed to 1000000000.
TChain::Add modified to support the new default. By default
the file is not opened when calling TChain::Add
Int_t TChain::Add(const char *name, Int_t nentries)
//    A- if nentries <= 0, the file is connected and the tree header read
//       in memory to get the number of entries.
//
//    B- if (nentries > 0, the file is not connected, nentries is assumed to be
//       the number of entries in the file. In this case, no check is made that
//       the file exists and the Tree existing in the file. This second mode
//       is interesting in case the number of entries in the file is already stored
//       in a run data base for example.
//
//    C- if (nentries == 1000000000) (default), the file is not connected.
//       the number of entries in each file will be read only when the file
//       will need to be connected to read an entry.
//       This option is the default and very efficient if one process
//       the chain sequentially. Note that in case TChain::GetEntry(entry)
//       is called and entry refers to an entry in the 3rd file, for example,
//       this forces the Tree headers in the first and second file
//       to be read to find the number of entries in these files.
//       Note that if one calls TChain::GetEntries() after having created
//       a chain with this default, GetEntries will return 1000000000!
//       One can force the Tree headers of all the files to be read
//       by calling TChain::GetEntry(bigentry) with bigentry greater than
//       the first entry number of the last file, eg 999999999.
//       To compute the number of entries in a chain built with this option, do:
//            chain.GetEntry(999999999);
//            chain.GetEntries();

Revision 3664 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 15 07:47:36 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 33198 byte(s)
Diff to previous 3592
Patch by Philippe to prevent reads before the start of the
fTreeOffset array.

Revision 3592 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 7 09:10:20 2002 UTC (13 years ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 33171 byte(s)
Diff to previous 3475
fix typo in comment.

Revision 3475 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 14 13:29:44 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 33195 byte(s)
Diff to previous 3446
Fix a minor problem in TChain::LoadTree. The test:
   if (entry < 0 || entry > fEntries) return -2;
should be
   if (entry < 0 || entry >= fEntries) return -2;

Revision 3446 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 10 16:18:17 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 33194 byte(s)
Diff to previous 3408
Update the max value for fgMaxMergeSize

Revision 3408 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 6 13:37:41 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 33191 byte(s)
Diff to previous 3404
Implement TChain::Reset (overloading TTree::Reset).
All files eliminated from teh chain definition. The current file (if any)
is deleted.

Revision 3404 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 5 21:07:52 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 32708 byte(s)
Diff to previous 3384
in TChain::Merge, add support for automatic file overflow:

 When merging many files, it may happen that the resulting file
 reaches a size > fgMaxMergeSize (default = 1.9 GBytes). In this case
 the current file is automatically closed and a new file started.
 If the name of the merged file was "merged.root", the subsequent files
 will be named "merged_1.root", "merged_2.root", etc.
 fgMaxMergeSize may be modified via the static function SetMaxMergeSize.

The function Merge returns the total number of files generated.

Revision 3384 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 4 14:40:21 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 30134 byte(s)
Diff to previous 3377
delete #include <float.h>. Now included in Tmath.h

Revision 3377 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 3 16:47:46 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 30247 byte(s)
Diff to previous 3234
The #include <float.h> must be placed before the #include "TMath.h"
to avoid a redefinition of finite on win32.

Revision 3234 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Nov 17 16:00:21 2001 UTC (13 years, 2 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 30171 byte(s)
Diff to previous 2860
Take advantage of the mods in TTree::CloneTree in TChain::Merge.
When merging files, only the active branches in the input Trees
are copied to the merged file.

Revision 2860 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 26 09:43:08 2001 UTC (13 years, 4 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 30126 byte(s)
Diff to previous 2833
In TChain::Merge, remove the statement file->cd() to permit writing
to a subdirectory of file.
To write to a subdirectory, the user has to open the output file, create a subdir,
cd(subdir) and call TChain::Merge(TFile *file..

Revision 2833 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 22 10:43:34 2001 UTC (13 years, 4 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 30074 byte(s)
Diff to previous 2679
The TTree::AddFriend function with a TFile* must also be implemented in TChain
to avoid compiler warnings with gcc and compiler errors on Solaris and AIX5.

Revision 2679 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 14 08:30:00 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 29328 byte(s)
Diff to previous 2666
In TChain::Add, allocate more space to the local string used to store
the current directory. File names (eg with AFS) may be very long.

Revision 2666 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 11 08:27:40 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 29328 byte(s)
Diff to previous 2635
In the TChain destructor, do not delete fFile. The file will be delete by fFiles->Delete().
fFile might have been deleted already in some cases, eg by the code generated by MakeClass
when the objects are created on the stack.

Revision 2635 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 3 14:07:20 2001 UTC (13 years, 5 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 29356 byte(s)
Diff to previous 2633
change NULL to 0.

Revision 2633 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 3 11:53:26 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 29462 byte(s)
Diff to previous 2391
Fix by Andre Holzner to support wildcarding and the option with a treename
in TChain::Add.

Revision 2391 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 7 08:56:05 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 29190 byte(s)
Diff to previous 2058
In TChain::Addfile remove the limitation that the file name must contain
the string ".root". ".root" is necessary only in case one wants to specify
a Tree in a subdirectory of a Root file with eg, the format:
//machine/file_name.root/subdir/tree_name

Revision 2058 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 23 14:07:01 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 29066 byte(s)
Diff to previous 1947
Modify function LoadTree to call SetMakeClass for the loaded Tree.

Revision 1947 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 10 16:31:18 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 29030 byte(s)
Diff to previous 1926
Add empty, but documented function TChain::AddFriend

Revision 1926 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 9 08:35:44 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 26385 byte(s)
Diff to previous 1664
In LoadTree calls TTreeFormula::UpdateFormulaLeaves for each active TTreeFormula.

Revision 1664 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 22 10:33:46 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 26258 byte(s)
Diff to previous 1524
Add new comments in the TChain constructor indicating how to proceed with Trees
in a subdirertory.
Remove obsolete code in TChain::AddFile.

Revision 1524 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 3 17:11:20 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 26334 byte(s)
Diff to previous 1447
Optimisation from Jiri Masik in TChain::GetEntry. The new algorithm
checks if the entry is in the current file first.

Revision 1447 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 23 12:28:38 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 26206 byte(s)
Diff to previous 1291
Protect TChain::Add in case the number of entries in the TTree is null.
Print a Warning message when this case happens.

Revision 1291 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 26 14:22:46 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 26070 byte(s)
Diff to previous 1205
Add new function TChain::Add(TChain *chain) to add an existing chain to
the chain.
Modify function TChain::Add(const char *name,..) to support wildcarding.
One can do:
  chain.Add("xxx*.root");
to add all files starting with xxx in the current directory.
The TChain::Add functions call internally a new function TChain::AddFile.
The TChain::Add functions return an Int_t with the number of files
effectively connected to the TChain.
Implement TChain::Fill() as a dummy function with an error message to prevent
filling an existing chain.
TChain::ls reports the number of entries for each chain element.
TChain::Print invokes TTree::Print for each chain element.

Revision 1205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 13 15:13:57 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 22771 byte(s)
Diff to previous 985
      W A R N I N G   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     ==================================================================
A very long list of changes in this pre-release of version 3.00.
We have modified the signature of many functions (in particular TObject)
to introduce more constness in the system.
You must change your code if your class derives from TObject and uses
one of the modified functions such as ls, Print, Compare, Hash, etc.
The modified functions in TObject have the following signature:
   virtual TObject    *Clone() const;
   virtual Int_t       Compare(const TObject *obj) const;
   virtual void        Delete(Option_t *option=""); // *MENU*
   virtual void        DrawClass() const; // *MENU*
   virtual void        DrawClone(Option_t *option="") const; // *MENU*
   virtual void        Dump() const; // *MENU*
   virtual TObject    *FindObject(const TObject *obj) const;
   virtual char       *GetObjectInfo(Int_t px, Int_t py) const;
   virtual ULong_t     Hash() const;
   virtual void        Inspect() const; // *MENU*
   virtual Bool_t      IsEqual(const TObject *obj) const;
   virtual void        ls(Option_t *option="") const;
   virtual void        Print(Option_t *option="") const;

A similar operation has been done with classes such as TH1, TVirtualPad,
TTree, etc.

Revision 985 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 21 20:51:23 2000 UTC (14 years, 2 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 22753 byte(s)
Diff to previous 732
Function Streamer now in the implementation file.
Add code for the new automatic schema evolution algorithm

Revision 732 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 9 13:56:40 2000 UTC (14 years, 3 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 22753 byte(s)
Diff to previous 467
Add a comment in TChain::LoadTree to describe the function return value.

Revision 467 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 15 08:56:00 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 22620 byte(s)
Diff to previous 382
Forgot to update TChain::Draw with const char* instead of TCut like in TTree::Draw.
The Sun compiler was complaining.

Revision 382 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 17 10:26:41 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 22624 byte(s)
Diff to previous 367
TTree.h, TChain
=======
New data member  TString fProcessOption in the class TTree
This string contains the option passed to TTree::Process.
The option can be queried by TTree::GetProcessOption.

New function Int_t TTree::GetChainEntryNumber(Int_t entry)
    This function returns directly entry
New function Int_t TChain::GetChainEntryNumber(Int_t entry)
    This function returns the absolute entry number in the chain
    corresponding to the local TTree entry number entry.

The TTree::Process functions have a new optional argument Option_t (option.
same for TChain::Process, TVirtualTreePlayer and TTreePlayer

TSelector, TSelectorCint
=========
Add new functions
   virtual Bool_t      ExecuteNotify();
   virtual Bool_t      Notify() {return kTRUE;}

ExecuteNotify calls the user class function Notify when
TTree::Process starts the first entry in a file of a chain.

TTreePlayer
===========
Implememt the logic to call the new functions TSelector::ExecuteNotify

Revision 367 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 12 17:13:01 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 22269 byte(s)
Diff to previous 346
 Must implement TChain::Process(TSelector *selector to avoid compiler
warnings on HP aCC. TChain::Process calls TTree::Process

Revision 346 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 10 06:17:57 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 21903 byte(s)
Diff to previous 318
Implement the new function TTree::Process and the corresponding function(s)
in TTreePlayer.
The main function in TTreePlayer is
 TTreePlayer::Process(TSelector *selector, Int_t nentries, Int_t firstentry)
This new function exploits the new class TSelector to initialize, select,
analyze and terminate the user code referenced by the selector.
This function is now called by
 TTreePlayer::Process(const char *filename, Int_t nentries, Int_t firstentry)

The code in the class derived from TSelector may be interpreted or compiled.

Revision 318 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 3 10:11:04 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 21927 byte(s)
Diff to previous 223
The following functions have their signature changed from void to Int_t
The TTree::Draw, Fit, Process, Project and Scan functions returns the number
of selected events.

    virtual Int_t     Draw(TCut varexp, TCut selection, Option_t *option=""
                       ,Int_t nentries=1000000000, Int_t firstentry=0);
    virtual Int_t     Draw(const char *varexp, const char *selection, Option_t *option=""
                       ,Int_t nentries=1000000000, Int_t firstentry=0); // *MENU*
    virtual Int_t     Fit(const char *funcname ,const char *varexp, const char *selection="",Option_t *option="" ,Option_t *goption=""
                       ,Int_t nentries=1000000000, Int_t firstentry=0); // *MENU*

    virtual Int_t     Process(const char *filename, Option_t *option=""
                       ,Int_t nentries=1000000000, Int_t firstentry=0); // *MENU*
    virtual Int_t     Project(const char *hname, const char *varexp, const char *selection="", Option_t *option=""
                       ,Int_t nentries=1000000000, Int_t firstentry=0);
    virtual Int_t     Scan(const char *varexp="", const char *selection="", Option_t *option=""
                       ,Int_t nentries=1000000000, Int_t firstentry=0); // *MENU*


The function TTree::Process is a new function:

//   The code in filename is loaded (interpreted or compiled , see below)
//   filename must contain a valid class implementation derived from TTreeProcess.
//   where TTreeProcess has the following member functions:
//     void TTreeProcess::Begin(). This function is called before looping on the
//          events in the Tree. The user can create his histograms in this function.
//
//     Bool_t TTreeProcess::Select(Int_t entry). This function is called
//          before processing entry. It is the user's responsability to read
//          the corresponding entry in memory (may be just a partial read).
//          The function returns kTRUE if the entry must be processed,
//          kFALSE otherwise.
//     void TTreeProcess::Analyze(Int_t entry). This function is called for
//          all selected events. User fills histograms in this function.
//     void TTreeProcess::Finish(). This function is called at the end of
//          the loop on all events.
//
//   if filename is of the form file.C, the file will be interpreted.
//   if filename is of the form file.C++, the file file.C will be compiled
//      and dynamically loaded. The corresponding binary file and shared library
//      will be deleted at the end of the function.
//   if filename is of the form file.C+, the file file.C will be compiled
//      and dynamically loaded. The corresponding binary file and shared library
//      will be kept at the end of the function. At next call, if file.C
//      is older than file.o and file.so, the file.C is not compiled, only
//      file.so is loaded.
//
//   The function returns the number of processed entries. It returns -1
//   in case of an error.

The correesponding modifications have been made in TChain, TVirtualTreePlayer
and TTreePlayer

Revision 223 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 16 07:34:45 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 21525 byte(s)
Diff to previous 122
Implement TChain::Streamer. A TChain can now be saved on a Root file.
The data member fNbranches has been removed.

Revision 122 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 13 09:27:08 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 21267 byte(s)
Diff to previous 91
- Mods in all the tree classes to reflect the changes from Float_t to Double_t
  in the graphics and histogram classes. The TLeaf::GetValue in particular
  are now of type Double_t.
  TTree::GetMaximum, GetMinimum return a Double_t.
  TChain::GetMaximum, GetMinimum return a Double_t.
  TTree::GetV1, GetV2 and GetV3 return a Double_t* instead of a Float_t*.

Revision 91 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 8 08:02:02 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/tree/src/TChain.cxx
File length: 21264 byte(s)
Diff to previous 3
- Fix a problem in TChain::LoadTree.
  When a entry is asked which is not available in all the trees of
  the chain (i.e. entryNumber > chain.GetEntries() ), the LoadTree() function
  deletes the currently file opened and returns an error code. That's perfect,
  but when deleting the file the "fFile" pointer is not set to 0, therefore
  in the destructor of the class
      if (fFile) delete fFile;
  calls the TFile destructor a second time generating a SEGV
  (Thanks Manuel Sanchez for reporting)

Revision 3 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: trunk/tree/src/TChain.cxx
File length: 21188 byte(s)
Copied from: branches/rdm/tree/src/TChain.cxx revision 2
Diff to previous 2
This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.

Revision 2 - (view) (download) (as text) (annotate) - [select for diffs]
Added Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: branches/rdm/tree/src/TChain.cxx
File length: 21188 byte(s)
Initial import of ROOT into CVS

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