[root] / trunk / tree / tree / inc / TChain.h Repository:
ViewVC logotype

Log of /trunk/tree/tree/inc/TChain.h

Parent Directory Parent Directory


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

Revision 47992 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 12 20:11:56 2012 UTC (2 years, 1 month ago) by pcanal
File length: 9115 byte(s)
Diff to previous 46368
C++ standard requires the default parameter of a virtual function to be restated in the derived class otherwise the function, when accessed via a pointer to the derived class, will require the parameter to be explicitly stated (CINT was getting this wrong)

Revision 46368 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Oct 6 01:07:31 2012 UTC (2 years, 3 months ago) by pcanal
File length: 9110 byte(s)
Diff to previous 46069
From Will E. Coyote: Add the templated overload explicitly in TChain as they are hidden by the non templated version

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: 8610 byte(s)
Diff to previous 42754
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 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: 8567 byte(s)
Diff to previous 42751
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 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: 8512 byte(s)
Diff to previous 40993
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 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: 8479 byte(s)
Diff to previous 39611
Introduce GetLeaf(branchname,leafname) used in TTreeFormula to avoid ambiguity in the syntax introduced by too many slashes

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: 8403 byte(s)
Diff to previous 39365
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 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: 8347 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: 8278 byte(s)
Diff to previous 37957
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 37957 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 2 21:17:37 2011 UTC (3 years, 11 months ago) by pcanal
File length: 8209 byte(s)
Diff to previous 33354
Add a dictionary entry for the version of TChain::Process that take a pointer to a TSelector.

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: 8032 byte(s)
Diff to previous 30121
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 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: 7980 byte(s)
Diff to previous 26399
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 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: 7980 byte(s)
Diff to previous 22992
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 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: 7947 byte(s)
Diff to previous 22902
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 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: 7894 byte(s)
Diff to previous 20898
move tree, treeplayer and treeviewer under tree meta directory.

Revision 20898 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 14:18:54 2007 UTC (7 years, 2 months ago) by brun
Original Path: trunk/tree/inc/TChain.h
File length: 7894 byte(s)
Diff to previous 20882
From Leandro:
Don't redefine default parameters.

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/inc/TChain.h
File length: 7889 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/inc/TChain.h
File length: 7889 byte(s)
Diff to previous 19826
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 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/inc/TChain.h
File length: 7694 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/inc/TChain.h
File length: 7740 byte(s)
Diff to previous 18815
remove :$ from tag line

Revision 18815 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 17 22:21:52 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/tree/inc/TChain.h
File length: 7750 byte(s)
Diff to previous 18648
Extend TTree::Process(TSelector *sel, ....) so it can handle the case where the selector is interpreted

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/inc/TChain.h
File length: 7727 byte(s)
Diff to previous 18282
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 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/inc/TChain.h
File length: 7682 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/inc/TChain.h
File length: 7678 byte(s)
Diff to previous 18256
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 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/inc/TChain.h
File length: 7582 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/inc/TChain.h
File length: 7579 byte(s)
Diff to previous 17522
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 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/inc/TChain.h
File length: 7582 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/inc/TChain.h
File length: 7529 byte(s)
Diff to previous 16955
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 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/inc/TChain.h
File length: 7327 byte(s)
Diff to previous 16290
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 16290 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 18 15:13:51 2006 UTC (8 years, 4 months ago) by pcanal
Original Path: trunk/tree/inc/TChain.h
File length: 7513 byte(s)
Diff to previous 15849
Remove warnings following the introduction of TTree::GetEntries(const char*).  Fix code conventions violations

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/inc/TChain.h
File length: 7432 byte(s)
Diff to previous 15795
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 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/inc/TChain.h
File length: 7382 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/inc/TChain.h
File length: 7308 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/inc/TChain.h
File length: 7224 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/inc/TChain.h
File length: 7436 byte(s)
Diff to previous 15381
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 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/inc/TChain.h
File length: 7277 byte(s)
Diff to previous 15134
Implement a proper TChain::ResetBranchAddresses

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/inc/TChain.h
File length: 7232 byte(s)
Diff to previous 15010
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 15010 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 12 12:24:27 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/tree/inc/TChain.h
File length: 7245 byte(s)
Diff to previous 13264
From Federico Carminati
More changes in view of a full support for effc++ option

Revision 13264 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 16 20:24:02 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/tree/inc/TChain.h
File length: 7172 byte(s)
Diff to previous 13207
Add an 'option' argument to the Merge method

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/inc/TChain.h
File length: 7123 byte(s)
Diff to previous 12825
Update the spacing and documentation to match the coding rule

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/inc/TChain.h
File length: 7111 byte(s)
Diff to previous 12722
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 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/inc/TChain.h
File length: 7001 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/inc/TChain.h
File length: 6980 byte(s)
Diff to previous 11681
From Marek:
 Add friend trees to PROOF.

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/inc/TChain.h
File length: 6873 byte(s)
Diff to previous 11393
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 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/inc/TChain.h
File length: 6687 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/inc/TChain.h
File length: 6814 byte(s)
Diff to previous 10898
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 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/inc/TChain.h
File length: 6327 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/inc/TChain.h
File length: 6207 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/inc/TChain.h
File length: 6152 byte(s)
Diff to previous 9615
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 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/inc/TChain.h
File length: 6130 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/inc/TChain.h
File length: 6085 byte(s)
Diff to previous 9131
Implement function TChain::GetEntryWithIndex.
The function in the base class TTree cannot work for TChain.

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/inc/TChain.h
File length: 6016 byte(s)
Diff to previous 7448
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 7448 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 20 06:32:28 2003 UTC (11 years, 3 months ago) by brun
Original Path: trunk/tree/inc/TChain.h
File length: 5968 byte(s)
Diff to previous 7086
make second argument of TChain::AddFile optional with the default value=kBigNumber

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/inc/TChain.h
File length: 5957 byte(s)
Diff to previous 6990
From Philippe:

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

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/inc/TChain.h
File length: 5940 byte(s)
Diff to previous 6805
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 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/inc/TChain.h
File length: 5791 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/inc/TChain.h
File length: 5729 byte(s)
Diff to previous 6328
Move TChain::GetFile to the implementation file.
In case no file is connected, GetFile automatically loads the first file.

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/inc/TChain.h
File length: 5744 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/inc/TChain.h
File length: 5726 byte(s)
Diff to previous 5917
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 5917 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 15 06:58:20 2003 UTC (12 years ago) by brun
Original Path: trunk/tree/inc/TChain.h
File length: 5435 byte(s)
Diff to previous 5145
from Philippe
Implement TChain::SetMakeClass

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/inc/TChain.h
File length: 5320 byte(s)
Diff to previous 4893
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 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/inc/TChain.h
File length: 5496 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/inc/TChain.h
File length: 5403 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/inc/TChain.h
File length: 5380 byte(s)
Diff to previous 4131
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 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/inc/TChain.h
File length: 5309 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/inc/TChain.h
File length: 5311 byte(s)
Diff to previous 3852
Implement TChain::SetDirectory redefining TTree::SetDirectory.
Protect TChain::LoadTree against wrong assignement of fDirectory/fFile.

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/inc/TChain.h
File length: 5258 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/inc/TChain.h
File length: 5072 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/inc/TChain.h
File length: 5030 byte(s)
Diff to previous 3694
Replace constant 1000000000 by kBigNumber

Revision 3694 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 18 11:29:25 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/inc/TChain.h
File length: 4992 byte(s)
Diff to previous 3408
Move member fNotify from TChain to TTree.
Same for functions SetNotiFy and GetNotify.
With this change SetNotify may be called on a TTree or TChain.
(Thanks Axel Naumann for the suggestion)

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/inc/TChain.h
File length: 5191 byte(s)
Diff to previous 3407
Implement TChain::Reset (overloading TTree::Reset).
All files eliminated from teh chain definition. The current file (if any)
is deleted.

Revision 3407 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 6 10:10:32 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/inc/TChain.h
File length: 5141 byte(s)
Diff to previous 3404
Correct a mistake (max merge size default was set to 1.9 Mbytes instead of GBytes)

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/inc/TChain.h
File length: 5138 byte(s)
Diff to previous 2833
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 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/inc/TChain.h
File length: 4964 byte(s)
Diff to previous 2439
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 2439 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 22 16:10:23 2001 UTC (13 years, 7 months ago) by rdm
Original Path: trunk/tree/inc/TChain.h
File length: 4889 byte(s)
Diff to previous 1947
make code more const char* correct (i.e. "strings" must be const char*) and
declare several functions extern "C". Mods by Dave Morrison.

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/inc/TChain.h
File length: 4897 byte(s)
Diff to previous 1291
Add empty, but documented function TChain::AddFriend

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/inc/TChain.h
File length: 4813 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/inc/TChain.h
File length: 4634 byte(s)
Diff to previous 978
      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 978 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 21 20:47:14 2000 UTC (14 years, 2 months ago) by brun
Original Path: trunk/tree/inc/TChain.h
File length: 4562 byte(s)
Diff to previous 467
Increment class version number from 2 to 3.
Declare not persistent members: fTreeNumber, fTree, fFile and fNotify.
Declare members fFiles and fStatus with "->" in the comment field.
Declare dimension of fTreeOffset in the comment field.

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/inc/TChain.h
File length: 4526 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/inc/TChain.h
File length: 4519 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/inc/TChain.h
File length: 4423 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/inc/TChain.h
File length: 4323 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/inc/TChain.h
File length: 4365 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/inc/TChain.h
File length: 4213 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/inc/TChain.h
File length: 4292 byte(s)
Diff to previous 3
- 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 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/inc/TChain.h
File length: 4240 byte(s)
Copied from: branches/rdm/tree/inc/TChain.h 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/inc/TChain.h
File length: 4240 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