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

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

Parent Directory Parent Directory


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

Revision 49305 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 24 09:39:20 2013 UTC (21 months ago) by rdm
File length: 123434 byte(s)
Diff to previous 48046
correct ROOT prompt in generated code examples.

Revision 48046 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 14 15:35:16 2012 UTC (2 years, 1 month ago) by rdm
File length: 123449 byte(s)
Diff to previous 47612
From Ioan:
Replace the trunk code that uses the deprecated TH1::kCanRebin bit with
the new methods TH1::CanExtendAllAxes() and TH1::SetCanExtend() - see r47909,
r48012 and r48031. The old TH1::kCanRebin bit did not really have much to
do with histogram rebinning, but rather with extending the limits of the
histogram's axes (which can cause a rebin, but only in some cases). As such,
the word "Rebin" has been replaced with "Extend" for the new methods.

Rename TH1::RebinAxis() to TH1::ExtendAxis() for the reasons stated above.
The TH1::RebinAxis() method will be kept in v6-00 for backward compatibility
with an obsolete warning and will be removed in v6-02. The current
implementation simply forwards the call to TH1::ExtendAxis().

Revision 47612 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Nov 24 17:41:18 2012 UTC (2 years, 1 month ago) by pcanal
File length: 123447 byte(s)
Diff to previous 46780
Fix the length of the header filename to be ignored (in MakeClass)

Revision 46780 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 24 15:56:31 2012 UTC (2 years, 2 months ago) by couet
File length: 123415 byte(s)
Diff to previous 46190
If a TTree::Draw ends up with an empty histogram, like in the command NTUPLE/PLOT in PAW, an empty box with "Empty" in the centre is drawn.
It was suggested here:
https://savannah.cern.ch/bugs/?98410

Revision 46190 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 25 20:24:14 2012 UTC (2 years, 3 months ago) by pcanal
File length: 122981 byte(s)
Diff to previous 45195
Add support for the filenames (platform dependent :() given by cling for STL collection and common structs [To be replaced by new interface/API in core/meta when available]

Revision 45195 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 25 03:45:14 2012 UTC (2 years, 6 months ago) by pcanal
File length: 122507 byte(s)
Diff to previous 44628
Disconnect the TTree and the selector at the end of Process

Revision 44628 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 8 12:27:44 2012 UTC (2 years, 7 months ago) by couet
File length: 122445 byte(s)
Diff to previous 44556
In the revision http://root.cern.ch/viewvc?view=rev&revision=31752 two lines were inverted and it produced the bug mentioned here https://savannah.cern.ch/bugs/?95185

Revision 44556 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 5 09:20:41 2012 UTC (2 years, 7 months ago) by axel
File length: 122445 byte(s)
Diff to previous 44507
Remaining fixes for AIX, Solaris after removal of using namespace std from Riostream.h

Revision 44507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by axel
File length: 122423 byte(s)
Diff to previous 43596
Remove
  using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.

Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.

Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.

Revision 43596 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Mar 31 13:40:40 2012 UTC (2 years, 9 months ago) by axel
File length: 122378 byte(s)
Diff to previous 42754
Enable Scan() format options for string columns

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: 122335 byte(s)
Diff to previous 41643
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 41643 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 28 18:24:36 2011 UTC (3 years, 2 months ago) by pcanal
File length: 122320 byte(s)
Diff to previous 41640
In MakeClass fix the insertion of the #include for ROOT classes (strip the include/ and insert only once)

Revision 41640 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 28 18:13:02 2011 UTC (3 years, 2 months ago) by pcanal
File length: 121607 byte(s)
Diff to previous 41318
Always initialize fChain

Revision 41318 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 11 08:48:03 2011 UTC (3 years, 3 months ago) by pcanal
File length: 121582 byte(s)
Diff to previous 41244
Fix Coverity issues:

TTreePlayer.cxx: another instance of 34037 Dereference null return value
TBranchElement.cxx: 2nd attempt for 34040,34042 Dereference null return (stat) 
TTabCom.cxx: another instance of 34168 Explicit null dereferenced

Revision 41244 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 6 19:42:35 2011 UTC (3 years, 3 months ago) by pcanal
File length: 121573 byte(s)
Diff to previous 40915
Fix Coverity issues:

TBranchSTL: cov 34339 Resource leak (false positive)
TTableDescriptor.cxx: cov 34219,34220 explicit null dereference
TSQLStructure.cxx: cov 34204,34205,34206 Explicit null dereferenced 
TTabCom.cxx: cov 34168 Explicit null dereferenced 
TClassRef.cxx: cove 34165 Explicit null dereferenced (false positive but still confusing coding).
TBufferXML.cxx: 34070 Explicit null dereferenced
TFriendProxyDescriptor.cxx: cov 34066 Uninitialized scalar field
TTreeCloner.cxx: cov 34034057 Dereference null return (stat) 63 Uninitialized scalar field 
TParallelCoordEditor.cxx: 34051,34059,34060,34061 Dereference null return value
TParallelCoord.cxx: 34050,34056, 34057 Dereference null return (stat) 
TBranchProxy.h: 34048 Dereference null return value 
TBranchProxy.cxx: 34043,34044,34045 Dereference null return value
TTree.cxx: 34039 Dereference null return value
TTreePlayer.cxx: 34037 Dereference null return value 
TLeafC.cxx: 34036 Dereference null return value

Revision 40915 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 17 20:36:56 2011 UTC (3 years, 4 months ago) by pcanal
File length: 121564 byte(s)
Diff to previous 40304
Remove uncessary use of gDirectory in MakeCode

Revision 40304 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 19 19:19:18 2011 UTC (3 years, 6 months ago) by pcanal
File length: 121437 byte(s)
Diff to previous 39073
In MakeClass/MakeSelector, make an effort to add the #include needed for the user classes if they are loaded

Revision 39073 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 2 19:07:42 2011 UTC (3 years, 8 months ago) by pcanal
File length: 120585 byte(s)
Diff to previous 38936
Issue an error message when MakeClass/MakeSelector detects that a branch address can not be properly set:
Error in <TTreePlayer::MakeClass>: The branch named E (full path name: E.E) is hidden by another branch of the same name and its data will not be loaded.

Revision 38936 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 19 21:06:30 2011 UTC (3 years, 9 months ago) by pcanal
File length: 120113 byte(s)
Diff to previous 38869
Merge the documentation that was duplicated in TTree and TTreePlayer and remove the duplicate from TTreePlayer.  Fix grammar in TLeaf/TBranch

Revision 38869 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 15 11:29:04 2011 UTC (3 years, 9 months ago) by pcanal
File length: 151834 byte(s)
Diff to previous 38784
Patch to correctly honour selector abort status settings in TTreePlayer::Process. Currently only
  the TSelector::kAbortProcess was handled by stopping processing. In particular
  TSelector::kAbortFile was ignored; this recently created some problems in ALICE
  with corrupted files, with repeated attempts to read events eventually leading to
  bad_alloc exceptions.

Revision 38784 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 8 20:26:27 2011 UTC (3 years, 9 months ago) by pcanal
File length: 151582 byte(s)
Diff to previous 38774
Avoid relying on gDirectory to be 'correct' when generating a MakeClass nor when executing it (in the case where the file is already open

Revision 38774 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 7 22:24:23 2011 UTC (3 years, 9 months ago) by pcanal
File length: 151405 byte(s)
Diff to previous 38741
In the genereated  TSelector::LoadTree do not unnecessarily check for the actual type of fChain (virtuality is just fine here)

Revision 38741 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 5 18:12:39 2011 UTC (3 years, 9 months ago) by pcanal
File length: 151548 byte(s)
Diff to previous 37839
Copy documentation explained the length of the array returned by TSelectorDraw::GetVal.  Add reference to this documentation in the other related function GetV1, etc. in TSelectorDraw, TTreePlayer and TTree.

Revision 37839 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 21 17:22:08 2011 UTC (4 years ago) by pcanal
File length: 151281 byte(s)
Diff to previous 37409
Allow the output name passed to MakeProxy to be either a classname (to which will be added .h to make the filename) or a filename (which already has an extension)

Revision 37409 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 8 17:18:21 2010 UTC (4 years, 1 month ago) by pcanal
File length: 151100 byte(s)
Diff to previous 36434
In MakeClass/MakeSelector consistently use the C++ symbol compliant version of the branchname

Revision 36434 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 27 13:35:38 2010 UTC (4 years, 2 months ago) by brun
File length: 151112 byte(s)
Diff to previous 36427
Fix a typo in TTreePlayer::Scan documentation

Revision 36427 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 26 18:44:30 2010 UTC (4 years, 2 months ago) by pcanal
File length: 151112 byte(s)
Diff to previous 36106
Fix TTree::Query with more than one column requested

Revision 36106 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 6 09:31:40 2010 UTC (4 years, 3 months ago) by brun
File length: 151115 byte(s)
Diff to previous 35809
remove #include "snprintf.h"

Revision 35809 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 27 19:33:42 2010 UTC (4 years, 3 months ago) by pcanal
File length: 151138 byte(s)
Diff to previous 35807
Fix coverity error 21755

Revision 35807 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 27 17:14:25 2010 UTC (4 years, 3 months ago) by brun
File length: 151325 byte(s)
Diff to previous 35682
Remove blanks in option. Fix https://savannah.cern.ch/bugs/index.php?72956

Revision 35682 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 23 16:07:59 2010 UTC (4 years, 4 months ago) by pcanal
File length: 151301 byte(s)
Diff to previous 35666
Fix Coverity reports about the use of strcpy, strcat and sprintf
#13133, #13318, #13421, #13422

Revision 35666 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 23 14:36:58 2010 UTC (4 years, 4 months ago) by pcanal
File length: 151338 byte(s)
Diff to previous 35613
Finish fixing cov #14172

Revision 35613 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 22 19:04:51 2010 UTC (4 years, 4 months ago) by brun
File length: 151328 byte(s)
Diff to previous 35565
Implement suggestion at https://savannah.cern.ch/bugs/?72956
When the draw option to TTree::Draw contains "norm" the output histogram is normalized to 1.

Revision 35565 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 22 07:01:20 2010 UTC (4 years, 4 months ago) by brun
File length: 150900 byte(s)
Diff to previous 35486
Remove dead code. coverity CID 11473

Revision 35486 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 19:31:26 2010 UTC (4 years, 4 months ago) by brun
File length: 150892 byte(s)
Diff to previous 35477
Clean up calls to strlcpy

Revision 35477 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 18:16:03 2010 UTC (4 years, 4 months ago) by brun
File length: 151249 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: 151249 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: 151270 byte(s)
Diff to previous 35450
Fix strncpy calls

Revision 35450 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 12:36:11 2010 UTC (4 years, 4 months ago) by pcanal
File length: 150830 byte(s)
Diff to previous 35427
Fix Coverity reports

TDatabasePDG.cxx: #11418 getc returns an int
TTree.cxx: #10577 unused variable
TTreeFormula.cxx: #10795,#10796,#13272,#13273,#13274,#14173 strcat -> strncat, strcpy -> strncpy
TTreePlayer.cxx: #10891,#10892,#14169,#14170,#14172 strcpy -> strncpy
TStreamerElement.cxx: #12537,#13200,#13318,#13586,#13587,#13588,#13589,#13590,#13591,#13596,#13597,#13598 strcpy,sprintf -> strncpy,snprintf (or TString)
TStreamerInfo.cxx: #13470,#13787,#13788 strcpy,sprintf -> strncpy,snprintf (or TString)
TBranchProxy.cxx: null pointer dereference.
TBranch.cxx: #10689 null pointer dereference.
loadfile.cxx: #10767,#12387.#12388,#12389,#12521,#12522,#13514,etc.. strcpy,sprintf -> strncpy,snprintf  (or TString)
TFileDrawMap.cxx: #10893,#10894,#10895,#13460,#14176,#14177,#14718,#14179 strcpy,sprintf -> strncpy,snprintf  (or TString)
TFile.cxx: #13789,#13193,#13450 strcpy,sprintf -> strncpy,snprintf  (or TString)
TMethod.cxx: #10802,#13310 strcpy,sprintf -> strncpy,snprintf  (or TString)
TClass.cxx: #10814,#13122,#13467,#13468,#13490 strcpy,sprintf -> strncpy,snprintf  (or TString)
TDataMember.cxx: #10825,#13241,#13329,#13330,#13584 strcpy,sprintf -> strncpy,snprintf  (or TString)
TFormula.cxx: #13263,#13783 sprintf -> snprintf or TString
stlLoader.cxx: #13599 static array -> G__FastAllocString

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

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

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

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

Revision 35189 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 7 18:31:13 2010 UTC (4 years, 4 months ago) by pcanal
File length: 150490 byte(s)
Diff to previous 34640
Fix coverity reports

Revision 34640 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 28 16:40:21 2010 UTC (4 years, 5 months ago) by pcanal
File length: 150475 byte(s)
Diff to previous 34286
Enable 'scan(*)' to work with data member that fixed length array

Revision 34286 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 1 20:38:57 2010 UTC (4 years, 6 months ago) by rdm
File length: 150394 byte(s)
Diff to previous 34260
fix format errors related to TString::Form(), TString::Format(), Form()
and Printf().

Revision 34260 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 1 06:57:49 2010 UTC (4 years, 6 months ago) by brun
File length: 150391 byte(s)
Diff to previous 33331
Fix format

Revision 33331 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 30 21:35:47 2010 UTC (4 years, 8 months ago) by pcanal
File length: 150386 byte(s)
Diff to previous 33330
Undo 33330 until the side effects are understood

Revision 33330 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 30 21:19:53 2010 UTC (4 years, 8 months ago) by pcanal
File length: 150410 byte(s)
Diff to previous 32930
Avoid attempting to print the content of empty TClonesArray even if this 'content' are strings (see roottest/root/treeformula/scan/execmissingString.C)

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: 150386 byte(s)
Diff to previous 32881
Prefer the use of InheritsFrom(TClass*) over InheritsFrom(const char*) as long as 
it does not increase the library dependencies.

Revision 32881 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 5 14:27:05 2010 UTC (4 years, 9 months ago) by pcanal
File length: 150365 byte(s)
Diff to previous 32346
Add support for 'array' formula in TTree::Query

Revision 32346 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 15 21:06:36 2010 UTC (4 years, 11 months ago) by pcanal
File length: 149266 byte(s)
Diff to previous 32028
Clarify that TTree::Draw can only call a non-static member function with fixed parameter

Revision 32028 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 15 10:24:33 2010 UTC (5 years ago) by pcanal
File length: 149133 byte(s)
Diff to previous 31752
In TTree::Draw: Avoid confusing '2000<var' with in a file name '2000' (due to IsFileInIncludePath stripping what it thinks to be an I/O indirection)

Revision 31752 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 10 07:50:15 2009 UTC (5 years, 1 month ago) by brun
File length: 148984 byte(s)
Diff to previous 31613
Fix a bug in the handling of parallel coordinates (still more fixes required)

Revision 31613 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 8 07:04:03 2009 UTC (5 years, 1 month ago) by brun
File length: 148904 byte(s)
Diff to previous 31606
Fix wrong use of "delete" instead of "delete []" (coverity)

Revision 31606 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 7 19:57:22 2009 UTC (5 years, 1 month ago) by pcanal
File length: 148898 byte(s)
Diff to previous 31601
Add missing 'break' in case statement (coverity)

Revision 31601 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 7 17:45:17 2009 UTC (5 years, 1 month ago) by pcanal
File length: 148843 byte(s)
Diff to previous 31561
In CopyTree, cancel the copy if the select is invalid rather than using a deleted object (found by Coverity in #8625)

Revision 31561 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 4 16:31:47 2009 UTC (5 years, 1 month ago) by brun
File length: 148785 byte(s)
Diff to previous 31496
From Lorenzo:
patch to revert back the changes in the fitting method in the TTree in order to not have the libHist dependency.

Revision 31496 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 1 19:20:05 2009 UTC (5 years, 1 month ago) by brun
File length: 148812 byte(s)
Diff to previous 30895
From Lorenzo:
return a  TFitResultPtr  for the TTree::Fit and TTree::UnbinnedFit methods

Revision 30895 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 27 23:03:41 2009 UTC (5 years, 2 months ago) by pcanal
File length: 148772 byte(s)
Diff to previous 30157
Fix TTree::Process for file with more than 2^31 entries when processed on 32bits architecture

Revision 30157 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 14 20:12:53 2009 UTC (5 years, 4 months ago) by pcanal
File length: 148770 byte(s)
Diff to previous 29656
In TFormula and TTreeFormula add support for the ternary condition operator ( c ? i : e )

In TSplot, TSpider, TSelectorDraw, TTreePlayer, TTreeTableInterface update the parsing
of colon separated line to properly handle the ternary condition operator, reduce 
code duplication and fix existing parsing bugs (due to the 'almost' duplicated code
syndrome):
  - Removed TSelectorDraw::MakeIndex and TSelectorDraw::GetNameByIndex
  - Added TSelectorDraw::SplitNames to replace those 2 function plus pre-processing code
      that was always used in conjunction with their calls.
  - Updated the calling points to use TSelectorDraw::SplitNames.
  - Removed the unused (and incorrect) TTree::MakeIndex and TTree::GetNameByIndex.

Revision 29656 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 31 16:14:49 2009 UTC (5 years, 5 months ago) by pcanal
File length: 149925 byte(s)
Diff to previous 29317
Add new special function in TTreeFormula (and hence TTree::Draw and TTree::Scan) to calculate the minimun and maximum with an entry:

Min$(formula),Max$(formula):
   return the minimun/maximum (within one TTree entry) of the value of the elements of the formula given as a parameter.

MinIf$(formula,condition),MaxIf$(formula,condition):
   return the minimum (maximum) (within one TTree entry) of the value of the elements of the formula given as a parameter if they match the condition. If not element match the condition, the result is zero. To avoid the the result is zero. To avoid the consequent peak a zero, use the pattern:

tree->Draw("MinIf$(formula,condition)","condition");

which will avoid calculation MinIf$ for the entries that have no match for the condition.

Revision 29317 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 2 16:10:01 2009 UTC (5 years, 6 months ago) by brun
File length: 148655 byte(s)
Diff to previous 29293
In TTreePlayer::DrawSelect fix problem reported at : http://savannah.cern.ch/bugs/?52681
TTree::Draw ignores "goff" option when the "TCut selection"
rejects all events.

Revision 29293 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 1 14:40:48 2009 UTC (5 years, 6 months ago) by brun
File length: 148647 byte(s)
Diff to previous 28533
From Lorenzo:
fix in TTreePlayer to fix the usage of option "D" when an histogram was not drawn before

Revision 28533 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 12 08:23:46 2009 UTC (5 years, 8 months ago) by brun
File length: 148323 byte(s)
Diff to previous 28530
From Timur:
By default, with "gl5d" 4 iso surfaces will be built for cloud
and cut box will be on.

Revision 28530 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 11 17:08:55 2009 UTC (5 years, 8 months ago) by brun
File length: 148324 byte(s)
Diff to previous 28527
Specify format llx instead of lx when invoking GL5D (required on 64 bits)

Revision 28527 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 11 15:13:32 2009 UTC (5 years, 8 months ago) by brun
File length: 148323 byte(s)
Diff to previous 28526
Adding documentation for "gl5d"

Revision 28526 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 11 15:10:59 2009 UTC (5 years, 8 months ago) by brun
File length: 148100 byte(s)
Diff to previous 27127
The logic to invoke TGl5D is moved to TTreePlayer.
TTree::SetEstimate is automatically cally when option "gl5d" is specified.
A GL canvas is automatically created when option "gl5d" is specified.

Revision 27127 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 13 05:54:09 2009 UTC (6 years ago) by pcanal
File length: 147544 byte(s)
Diff to previous 26241
Significantly improve performance of TTree Proxy by using an 'interface' base class instead of CINT to allow support optional within the user's script. (This brings TTree Proxy from being 50% slower than the optimal case (for h1analysis) to being within the measurement incertainty of this optimal).

Revision 26241 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 17 15:37:30 2008 UTC (6 years, 2 months ago) by brun
File length: 147472 byte(s)
Diff to previous 25572
From Lorenzo:
Now TTree::UnbinnedFit can also be used to fit an unlimited number of  variables (before was limited to 3).

Revision 25572 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 27 07:03:25 2008 UTC (6 years, 3 months ago) by pcanal
File length: 149463 byte(s)
Diff to previous 25365
Fix tree->Draw("s1.value"); when the top level branch does not have a trailing dot
(and hence the real branch name is only 'value').

TTreeFormula was properly parsing the string and finding the correct branch, however
it was recorded only the end branch name as the result of the parse (i.e. in the 
above case, just 'value') and hence UpdateFormulaLeaves was not restoring the leaf
correctly (and hence EvalInstance returned 0s).
To solve the issue we now record the 'full pathname' of the branch (i.e. including
the omitted top level branch names) and we upgrade TTree::FindBranch and
TBranchElement::FindBranch to be able to handle those path.

Fix TTree::Scan("*") to properly requested the distinct leaf even if the branch
name are ambiguous (previously it would repetively print the first match).

Revision 25365 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 5 02:06:52 2008 UTC (6 years, 4 months ago) by pcanal
File length: 148376 byte(s)
Diff to previous 24828
Do not let fNotify pointing to a dangling pointer

Revision 24828 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 14 23:51:40 2008 UTC (6 years, 6 months ago) by rdm
File length: 148328 byte(s)
Diff to previous 24722
change Info() to Error() if output files cannot be opened in MakeClass().

Revision 24722 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 9 08:35:32 2008 UTC (6 years, 6 months ago) by brun
File length: 148326 byte(s)
Diff to previous 24710
One case was forgetten when replacing the special character "," by "_" in TTreePlayer::GetBranchPointerName

Revision 24710 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 8 13:31:31 2008 UTC (6 years, 6 months ago) by brun
File length: 148289 byte(s)
Diff to previous 24317
Add "," in the list of special characters replaced by "_" in the TTree::MakeClass
and TTree::MakeCode functions.

Revision 24317 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 17 22:41:25 2008 UTC (6 years, 7 months ago) by rdm
File length: 147957 byte(s)
Diff to previous 24300
From Axel:
strangely enough Wndows does not support %p, use good old 0x%lx.

Revision 24300 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 17 10:48:01 2008 UTC (6 years, 7 months ago) by rdm
File length: 147954 byte(s)
Diff to previous 24018
From Axel:
using %p as format flag instead of 0x%x allows pointers to be passed
on 64bits, too.

Revision 24018 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 26 13:44:56 2008 UTC (6 years, 7 months ago) by brun
File length: 147956 byte(s)
Diff to previous 23676
Remove include <Api.h>

Revision 23676 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 7 10:31:07 2008 UTC (6 years, 8 months ago) by brun
File length: 147973 byte(s)
Diff to previous 23466
In TTreePlayer::DrawSelect reset the kcanRebin bit once the histogram has been drawn.
see: http://root.cern.ch/phpBB2/viewtopic.php?t=6648

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: 147916 byte(s)
Diff to previous 22902
Fix shadowed variables

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

Revision 21755 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 17 14:43:17 2008 UTC (7 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 147920 byte(s)
Diff to previous 21734
From Jan:
Fixed several typos in comments.

Revision 21734 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 16 16:23:48 2008 UTC (7 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 147912 byte(s)
Diff to previous 21670
From Jan:
Fixed 4 typos in comments in generated selectors.

Revision 21670 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 14 07:38:31 2008 UTC (7 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 147910 byte(s)
Diff to previous 21266
Fix documentation errors in TTreePlayer::DrawSelect

Revision 21266 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 7 11:37:19 2007 UTC (7 years, 1 month ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 147907 byte(s)
Diff to previous 20882
from Gerri:
remove limit on file name length and extend branch names
from 128 to 1024 in TTreePlayer::MakeClass() and TTreePlayer::MakeCode().

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

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

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

Revision 19589 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 10 10:09:52 2007 UTC (7 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 148084 byte(s)
Diff to previous 19580
From Bastien:
Fixed: TParallelCoordVar.cxx: The extreme bins of the axes histograms are now properly diplayed.
Fixed: TParallelCoordVar.cxx, TParallelCoordVar.h: The histograms, minimums, maximums, averages and quantiles are now updated when changing the entries to display.
Fixed: TParallelCoord.cxx, TParallelCoordVar.cxx, TParallelCoordRange.cxx, TParallelCoordEditor.cxx: Several not portable C++ expressions has been changed.
Added: TParallelCoordEditor.cxx, TParallelCoordEditor.h: Better interface to display or not bar histograms.
Added: TTreePlayer.cxx: Added documentation to TTreePlayer::DrawSelect.
Added: TTree.cxx: Added documentation to TTree::Draw.
Added: TSelectorDraw.cxx: Protection in TSelectorDraw::Begin if there is more than 4 dimensions and neither the option "para", "candle" or "goff" are activated.
Added: TParallelCoord.cxx: The "Apply to tree" button now also update the selected entries drawn on the TParallelCoord.
Added: TParallelCoord.cxx, TParallelCoord.h: An initial entry list is defined. Calling TParallelCoord::ResetTree will produce the same output as when first initialized.
Fixed: TParallelCoordEditor.cxx, TParallelCoordEditor.h: Fixed seg faults from bad management of the TGComboBox.
Fixed: TParallelCoordVar.cxx: Fixed seg fault when computing the quantiles.

Revision 19580 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 9 09:10:38 2007 UTC (7 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 147323 byte(s)
Diff to previous 19569
From Bastien:
 -add several protections
 -Move class descriptions from headers to implementation files
 -Simplify the user interface for TParallelCoord::BuildParallelCoord

Revision 19569 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 8 12:58:13 2007 UTC (7 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 147297 byte(s)
Diff to previous 19112
From Bastien DallaPiazza:
treeplayer/src/TTreePlayer.cxx:
Add the options "para" and "candle" to TTreePlayer::DrawSelect.
The option "para" brings a parallel coordinates plot.
The option "candle" brings a candle stick chart.

treeplayer/src/TSelectorDraw.cxx:
Add some code in TSelectorDraw::Begin, TSelectorDraw::TakeAction and
TSelectorDraw::TakeEstimate to draw parallel coordinates plots and candle
stick charts.

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/treeplayer/src/TTreePlayer.cxx
File length: 146760 byte(s)
Diff to previous 18934
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 18934 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 4 17:07:17 2007 UTC (7 years, 7 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 146537 byte(s)
Diff to previous 18637
Extend the support for multi dimensional arrays by replacing the T*Array2*Proxy
and T*Array3*Proxy by a completely generic T*Array*Proxy.
Add a few to retrive quickly the size of a (split) TClonesArray (by calling
GetEntries directly on the proxy object).

Revision 18637 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 2 20:18:39 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 145377 byte(s)
Diff to previous 18606
Add direct access to the TTree (or TChain) object from TTree::Draw by
using the keyword 'This':
  tree->Draw("This->GetReadEntry()");
  tree->Draw("This->GetUserInfo()->At(0)->GetName()");

Revision 18606 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 27 08:34:25 2007 UTC (7 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 144904 byte(s)
Diff to previous 18438
-Change the return type of TTree::Fit and TTree::UnbinnedFit from Long64_t to Int_t
to be consistent with the return type of TH1::Fit and TGraqph::Fit.
-TTree::Fit and TTree::UnbinnedFit have now the following return status:
   The function return the status of the fit in the following form
     fitResult = migradResult + 10*minosResult + 100*hesseResult + 1000*improveResult
   The fitResult is 0 is the fit is OK.
   The fitResult is negative in case of an error not connected with the fit.
   The number of entries used in the fit can be obtained via
     mytree.GetSelectedRows();
   If the number of selected entries is null the function returns -1

Revision 18438 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 30 09:58:01 2007 UTC (7 years, 9 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 144055 byte(s)
Diff to previous 18143
In process, handle the case where the TreeCache object is deleted/newed during the processing (because of a missing file for example)

Revision 18143 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Mar 3 15:07:33 2007 UTC (7 years, 10 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 143860 byte(s)
Diff to previous 17847
Add explicit note on the use of free standing function and method in TTree::Draw

Revision 17847 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 10 07:53:09 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 143429 byte(s)
Diff to previous 17846
With the type change (Bool_t to TSelector) the member fSelectorUpdate
must be initialized to 0 instead of kFALSE.

Revision 17846 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 10 07:36:56 2007 UTC (7 years, 11 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 143432 byte(s)
Diff to previous 17773
Change fSelectorUpdate from Bool_t to TSelector* to hold the value
of the selector being processed so that UpdateFormulaLeaves can update it
instead of blindly update the possibly
idle fSelector __and__ the possibly invalid (because of file reload)
fSelectorFromFile. (This resolves the crash in roottest/root/tree/selector)

Revision 17773 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 8 07:45:23 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 143400 byte(s)
Diff to previous 17591
Remove dependency on TView.h

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/treeplayer/src/TTreePlayer.cxx
File length: 143419 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/treeplayer/src/TTreePlayer.cxx
File length: 143451 byte(s)
Diff to previous 17422
-Replace calls to gROOT->GetClass by TClass::GetClass
-Remove unused references to TROOT.h

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/treeplayer/src/TTreePlayer.cxx
File length: 143443 byte(s)
Diff to previous 16877
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 16877 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 22 16:52:54 2006 UTC (8 years, 2 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 141243 byte(s)
Diff to previous 16618
Another bunch of Long64_t truncation warning fixes.

Revision 16618 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 25 11:59:45 2006 UTC (8 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 141251 byte(s)
Diff to previous 16532
In TTreePlayer::MakeClass, modify the code generated such that
a class deriving from TChain can also be used.

Revision 16532 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 15 20:08:33 2006 UTC (8 years, 3 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 141244 byte(s)
Diff to previous 16287
From Jason Detwiler:
Allow more formatting options for TTree::Scan.
In the option paramater (after col=), the format strings should
follow the printf format  specification.  The value given will
be prefixed by % and, if no conversion specifier is given, will
be suffixed by the letter g.

For example:

   tree->Scan("val:flag:flag:c:cstr", "", "col=::#x:c:");

where val is float, flag an int, c a char and cstr a char*
now prints:

************************************************************************
*    Row   *       val *      flag *      flag *         c *      cstr *
************************************************************************
*        0 *         0 *         1 *       0x1 *         a *       i00 *
*        1 *       1.1 *         2 *       0x2 *         b *       i01 *

Revision 16287 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Sep 17 19:08:13 2006 UTC (8 years, 4 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 140253 byte(s)
Diff to previous 16260
Implement TTree::GetEntries(const char *selection) which return the number of entries passing the selection

Revision 16260 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 14 05:27:45 2006 UTC (8 years, 4 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139467 byte(s)
Diff to previous 16245
Update MakeClass/MakeSelector so that the resulting skeleton initialize the array of pointers

Revision 16245 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 13 05:08:35 2006 UTC (8 years, 4 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138868 byte(s)
Diff to previous 16177
TTreeFormula (and hence TTree::Draw) is now able to plot objects of
any class which has either AsDouble or AsString (AsDouble has
priority).  So for such a class (for example TTimeStamp):
   tree->Draw("myTimeStamp");
will plot the same as:
   tree->Draw("myTimeStamp.AsDouble");

AsString can be returning either a char*, or a TString or an std::string

Revision 16177 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 31 11:09:10 2006 UTC (8 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138108 byte(s)
Diff to previous 16026
add some protections in the TTreeCache.
When resetting the cache use the number of entries in the current file
instead of the number of entries in the chain.

Revision 16026 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 16 16:54:31 2006 UTC (8 years, 5 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138123 byte(s)
Diff to previous 15935
properly reset a string when generating the branchname for MakeClass

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/treeplayer/src/TTreePlayer.cxx
File length: 138087 byte(s)
Diff to previous 15890
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 15890 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 2 05:23:49 2006 UTC (8 years, 5 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138490 byte(s)
Diff to previous 15794
Insure that in MakeClass/MakeSelector we consistently use the same name for the branch pointer variables

Revision 15794 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 13 05:36:31 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138345 byte(s)
Diff to previous 15715
From Paul Russo:

     o Cloned trees should not have ownership
       of branch-allocated objects.

Revision 15715 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 6 08:29:46 2006 UTC (8 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137986 byte(s)
Diff to previous 15710
Fix coding conventions violations.

Revision 15710 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 5 17:29:05 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137981 byte(s)
Diff to previous 15690
Backward compatibility patch.
Without this patch, TSelectorDraw can not longer detect parsing failure
and in case of parsing failure would return 0 instead of -1.
(as demonstrated by roottest failures in root/treeformula/array)

Revision 15690 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 4 23:35:37 2006 UTC (8 years, 6 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137845 byte(s)
Diff to previous 15591
Some new features in TSelector and derivatives:
- new method Abort() which allows Process() to be aborted by the user
  from within the selector. After Abort(), either the Process() is aborted
  or the current file is aborted and the next file in a chain will be
  processed. Abort() can also be called from Begin(), SlaveBegin(),
  Init() and Notify() to interrupt processing. In all cases SlaveTerminate()
  and Terminate() are still called.
- new method GetEntry() which is a wrapper around:
    fChain->GetTree()->GetEntry()
- GetStatus() now also implemented in TSelectorCint so the selector
  fStatus is correctly reported back by TTree::Process() also for
  interpreted selectors (also documented in the generated selector).
- documented in the generated selector code that the boolean return
  values of Notify() and Process() are not used.
- fixed a bug in TProofPlayer() that caused Init() and Notify() to be
  called for every packet and not once per file.

Revision 15591 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 28 10:03:14 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137504 byte(s)
Diff to previous 15572
From Markus Frank:
Implementation of a generic mechanism used to access
properties of objects linked using object references.
A proxy mechanism is used, which uses overloaded abstract
interfaces for concrete reference implementations.

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/treeplayer/src/TTreePlayer.cxx
File length: 137313 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/treeplayer/src/TTreePlayer.cxx
File length: 137345 byte(s)
Diff to previous 15455
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 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/treeplayer/src/TTreePlayer.cxx
File length: 139139 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/treeplayer/src/TTreePlayer.cxx
File length: 139140 byte(s)
Diff to previous 15396
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 15396 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 12 09:02:03 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138886 byte(s)
Diff to previous 15370
Introduce an optimisation in the algorithm of TTreeFilePrefetch
void TTreeFilePrefetch::SetThreshold(Double_t t)
   // Static function to set fgThreshold
   // A new basket will not be registered in the cache if
   // the current (Tree entry < fEntryMin) > 100*fgThreshold
   // so t is more or less the percentage of baskets read to be considered in the cache
   // This algorithm eliminates branches where only a few baskets are processed

Revision 15370 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 8 13:26:01 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138873 byte(s)
Diff to previous 15332
files forgotten in previous check-in

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/treeplayer/src/TTreePlayer.cxx
File length: 138837 byte(s)
Diff to previous 15186
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 15186 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 26 16:55:05 2006 UTC (8 years, 8 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138528 byte(s)
Diff to previous 15163
From Andreas Peters:
- new virtual monitoring interface which will the base class for the
  MonaLisa plugin.
- new TAlienSystem class
- updated TAlien class

Revision 15163 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 24 13:43:10 2006 UTC (8 years, 8 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138002 byte(s)
Diff to previous 14464
Avoid spurrious message like: Error in <TWinNTSystem::ExpandFileName>: input: Sum$(1), output: Sum$(1)

Revision 14464 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 29 10:36:27 2006 UTC (8 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137968 byte(s)
Diff to previous 14331
Add the following note in TTree::MakeClass and TTreePlayer::MakeXClass
//
//  NOTE: Do not use the code generated for one Tree in case of a TChain.
//        Maximum dimensions calculated on the basis of one TTree only
//        might be too small when processing all the TTrees in one TChain.
//        Instead of myTree.MakeClass(..,  use myChain.MakeClass(..

Revision 14331 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 20 21:34:22 2006 UTC (8 years, 10 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137677 byte(s)
Diff to previous 13987
Protect TTree::Draw agaist 0 value for the selection argument.

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/treeplayer/src/TTreePlayer.cxx
File length: 137661 byte(s)
Diff to previous 13356
Update of spacing and documentation to match the coding rule

Revision 13356 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 24 23:30:06 2005 UTC (9 years, 2 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137665 byte(s)
Diff to previous 13226
Remove code of obsolete win32old version. Cleanup source from the many
GDK_WIN32 ifdef's. Fixes also Gordon's problem of TInterpreter which
depended on GDK_WIN32.

Revision 13226 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 14 15:17:34 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137937 byte(s)
Diff to previous 13210
Fix spacing

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

Revision 13193 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 11 09:29:39 2005 UTC (9 years, 2 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137669 byte(s)
Diff to previous 12923
cosmetics.

Revision 12923 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 10 16:41:52 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137697 byte(s)
Diff to previous 12602
In Draw, do not look for a file when the function is name Sum$

Revision 12602 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 3 02:26:31 2005 UTC (9 years, 4 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137659 byte(s)
Diff to previous 12502
Fix to follow coding conventions

Revision 12502 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 18 10:22:24 2005 UTC (9 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137453 byte(s)
Diff to previous 12394
From Marek Biskup:
A 4D plot was drawn even if "goff" was specified. Fixed.

Revision 12394 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 27 16:09:22 2005 UTC (9 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137445 byte(s)
Diff to previous 12393
In TTreePlayer::MakeClass when generating the code for the event loop,
declare the variables nbytes and nb to be Long64_t instead of Int_t

Revision 12393 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 27 15:34:09 2005 UTC (9 years, 5 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137437 byte(s)
Diff to previous 12387
In case the Tree has been generated by a class template instantiation,
the branch name may contain '<','>'. In TTree::MakeClass, take
into account this special case and replace '<','>' by "_".

Revision 12387 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 27 08:17:41 2005 UTC (9 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136593 byte(s)
Diff to previous 12377
In case the Tree has been generated by a class in namespace,
the branch name may contain "::". In TTree::MakeClass, take
into account this special case and replace "::" by "__".

Revision 12377 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 25 07:45:29 2005 UTC (9 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 135877 byte(s)
Diff to previous 12332
Add more info in TTree::Process and TTreePlayer::Process
to show two workaround in case one needs to invoke
TTree::Process with the same file in the same script.

Revision 12332 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 18 13:35:39 2005 UTC (9 years, 6 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134938 byte(s)
Diff to previous 12269
In MakeClass/MakeSelector avoid generating fixed length array of size 0

Revision 12269 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 6 19:13:32 2005 UTC (9 years, 6 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134887 byte(s)
Diff to previous 12187
When using TTree;:Draw("file.C",cut,option);
Forward the option to the proxy generator

Revision 12187 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 24 20:25:11 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134883 byte(s)
Diff to previous 11901
From Marek:
hen a user creates a TChainIndex (by invoking e.g. TChain::BuildIndex())

1. The TChainIndex constructor reads all the trees one by one
and for each:

  a. checks if there is an index if not or if that one is built on
     different formaulae it builds an index and keeps it (can't leave an
     index in a tree because when the next tree is loaded the index
     will be deleted).
  b. takes the min and max values of the index (perhaps only min is
     needed - I'll see later on).

2. checks if the min and max values of all the tree indices are sorted.
   If not it turns itself into z Zombie.

When the index is accessed:
1. using the min and max values finds a tree which should be accessed
2. loads the tree using Load(the first entry number in that tree)
3. If there is no index in that tree (it means it was created inside
   TChainIndex constructor) the index is set to that tree.
4. the entry is loaded using the tree index.
5. if the tree didn't have an index before its index is set back to 0
   (needed because otherwise the index would have been deleted in the
   tree  destructor called when loading another tree in the chain).

Revision 11901 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 27 16:40:09 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134605 byte(s)
Diff to previous 11714
Renamed TTreeProxyGenerator::GetFilename as GetFileName

Revision 11714 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 2 09:38:15 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134605 byte(s)
Diff to previous 11629
From Philippe:
This parse avoid a core dump in TTree::Scan when the request
contains a scope operator(i.e. tree->Draw("edm::what");

Revision 11629 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 19 19:39:58 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134517 byte(s)
Diff to previous 11546
From Philippe:
This patch introduces a new special function in TTreeFormula Sum$
described as follow:

//  Sum$(formula): return the sum of the value of the elements of the
//  formula given  as a parameter.  For example the mean for all the
//  elements in  one entry can be calculated with:
//                Sum$(formula)/Length$(formula)

The idea comes from http://root.cern.ch/phpBB2/viewtopic.php?p=6943

Revision 11546 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 11 10:32:19 2005 UTC (9 years, 9 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134243 byte(s)
Diff to previous 11436
fix small typo in comment.

Revision 11436 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 28 21:17:39 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134274 byte(s)
Diff to previous 11333
From Philippe
The following problems were found while running roottest on MacOS.

rootcint: Insure that the dimensions of
        Int_t (*fArray)[3];
   are properly recorded by the ShowMembers function

TStreamerInfo: Insure that the wrapper template function see
        all modifications to the TStreamerInfo

TTreePlayer:  In Scan insures that the entry number is printed
        as a long long (aka with %lld).

Revision 11333 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 14 17:09:49 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 134272 byte(s)
Diff to previous 11316
From Philippe:

improved documentation for TTree::MakeProxy

Revision 11316 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 13 07:38:16 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 133611 byte(s)
Diff to previous 11309
From Philippe:
a first pass at some documentation for MakeProxy.
I also attached yet another (simplistic) example of usage (hsimpleProxy.C).
(Note that there is already tutorials/h1analysisProxy*)

Revision 11309 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 11 21:25:11 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 128374 byte(s)
Diff to previous 11256
From Philippe:
This patch implements support for the accessing the collection object in
TTreeFormula:

//     Accessing collection objects
//     ============================
//
//  TTree::Draw default's handling of collections is to assume that any
//  request on a collection pertain to it content.  For example, if fTracks
//  is a collection of Track objects, the following:
//      tree->Draw("event.fTracks.fPx");
//  will plot the value of fPx for each Track objects inside the collection.
//  Also
//     tree->Draw("event.fTracks.size()");
//  would plot the result of the member function Track::size() for each
//  Track object inside the collection.
//  To access information about the collection itself, TTree::Draw support
//  the '@' notation.  If a variable which points to a collection is
prefixed
//  or postfixed with '@', the next part of the expression will pertain to
//  the collection object.  For example:
//     tree->Draw("event.@fTracks.size()");
//  will plot the size of the collection refered to by fTracks (i.e the
number
//  of Track objects).

Revision 11256 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 7 18:48:27 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 127397 byte(s)
Diff to previous 11234
From Philippe:
In MakeClass/MakeSelector, update the code so that the
index of a split collection has its "BranchCount"'s
address properly set.
Also avoid generating a data member that we are not
going to use (Case of the top of a split object).
This object are not useable (since the TTree is in
MakeClass mode) and can actually be damageable
(the class name is possibly not known at the time
the MakeClass/MakeSelector is run).

This is needed to properly generate MakeClass/MakeSelector
on the new CMS data files.

Revision 11234 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 4 17:46:50 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 127181 byte(s)
Diff to previous 11061
From Philippe:
This patch insures that the data member generated by MakeProxy are (in more
cases)
valid C++ symbols.  The needed modifications made to the branch names are
now
expressed in the documentation of TTreePlayer::MakeProxy.

Revision 11061 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 8 14:34:33 2005 UTC (9 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 126850 byte(s)
Diff to previous 11000
Implement TTreePlayer::RecursiveRemove to cleanup pointers like fHistogram
in case fHistogram is deleted outside the TTreePlayer.

Revision 11000 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 27 20:43:30 2005 UTC (9 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 126536 byte(s)
Diff to previous 10917
From Maarten:
The attached patch seems correct, and fixes a problem for the Phobos
tree when generating selectors. But the code is difficult to understand
from scratch as a lot of internal Tree/Branch/Leaf details are involved.

Revision 10917 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 13 20:07:46 2005 UTC (10 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 126568 byte(s)
Diff to previous 10893
From Philippe:
TBranchElement: Insure that fSTLtype is always positive (was preventing the
reading of sets and maps in some case of split mode).
TTree, TTreePlayer: fix to TTree::Draw documentation
TTreeFormula: insures that TTree::Draw properly reads strings within a
collection

Revision 10893 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 11 13:06:36 2005 UTC (10 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 126568 byte(s)
Diff to previous 10878
Add a comment in TTreePlayer::Scan indicating that the return value
is the number of selected rows

Revision 10878 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 5 15:03:22 2005 UTC (10 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 126496 byte(s)
Diff to previous 10680
Fix a problem in TTreePlayer::MakeClass in case of a branch with a name
finishing with "."

Revision 10680 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Dec 4 19:47:00 2004 UTC (10 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 126288 byte(s)
Diff to previous 10589
From Philippe:

TTreeProxyGenerator now explicitly reject user's scripts that do not have an
extension.
TTree::Draw does not check for a user's scipt unless there is a period in
the expression.

Revision 10589 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 22 20:29:09 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 126213 byte(s)
Diff to previous 10532
Remove obsolete comments about "MakeAnal"

Revision 10532 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 15 15:17:16 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 126331 byte(s)
Diff to previous 10300
Add more comments to TTreePlayer::Scan to mention TTree::SetScanField
and give an example.

Revision 10300 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 13 10:06:02 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 125806 byte(s)
Diff to previous 10298
Add a new option in TTreePlayer::UnbinnedFit
//             = "D" Draw the projected histogram with the fitted function
//                   normalized to the number of selected rows
//                   and multiplied by the bin width

Revision 10298 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 13 05:36:23 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124553 byte(s)
Diff to previous 10231
From Philippe:
 revert to use Printf (now that we implemented %lld).

Revision 10231 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 6 11:20:03 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124583 byte(s)
Diff to previous 10193
From Philippe:
This patchs cleans up the output of a missing column/value in TTree::Scan
(properly alignment)

Revision 10193 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 1 09:18:29 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124495 byte(s)
Diff to previous 9980
From Philippe:
The correct printf format for Long64_t on unix in %lld while on vc7 it is
%I64d.
To avoid the problem, we can use std::cout instead of printf.

Revision 9980 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 10 19:36:19 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124339 byte(s)
Diff to previous 9975
In TTreePlayer::UnbinnedFit do not compute the sum of weights
and in the TreeUnbinnedLikelihood function do not divide by sum.
(thanks again to  Hajime Nanjyo)

Revision 9975 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 10 16:44:04 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124690 byte(s)
Diff to previous 9803
Thanks to Hajime Nanjyo <nanjyo@icepp.s.u-tokyo.ac.jp> for fixing a problem
in TTree::UnbinnedFit.
In the function TreeUnbinnedFitLikelihood, event weights were treated as
follows.
   prob = fitfunc->EvalPar(x,par) * weight[i]/sum;
it should be
   prob = TMath::Power(fitfunc->EvalPar(x,par),weight[i]/sum).

So the original code,

     prob = fitfunc->EvalPar(x,par) * weight[i]/sum;
     if(prob > 0) logL += TMath::Log(prob);
     else         logL += logEpsilon;

is changed to

     prob = fitfunc->EvalPar(x,par);
     if(prob > 0) logL += TMath::Log(prob) * weight[i]/sum;
     else         logL += logEpsilon * weight[i]/sum;

Revision 9803 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 20 21:02:10 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124674 byte(s)
Diff to previous 9753
From Philippe:
This patch is an important step toward the implementation of the member-wise
saving of stl containers.

Mainly, the code does not require anymore the collection proxy to be able
to provide a C-style array of pointer to its content.  This avoid the
problems of having to iterate twice through some collection and/or to have to
keep in memory a version of this array.  Concretely this also mean that the
I/O routine will now be able to recurse through stl containers.

Technically, this is done by templating TStreamerInfo::ReadBuffer and
TStreamerInfo::WriteBufferAux (as well as the ReadBufferSkip And
ReadBufferConv) so that you can use it directly with a char** or
with a TVirtualCollection (to which we added an operator [] and
removed the method GetPtrArray).

In addition, we added 2 new method to TVirtualCollectionProxy:
PushProxy and PopProxy that will allow to keep some state on
where we are in the iteration for a collection when we recurse.
(This is required for a reasonable implementation of the
TVirtualCollection for std::list).

Also (in an unrelated fix) we update TTreePlayer::Scan to
properly display the columns when they are more expressions
in the request than leaves in the tree.

Revision 9753 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 13 09:44:28 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124674 byte(s)
Diff to previous 9729
Add a new function;
Long64_t TTreePlayer::GetEntriesToProcess(Long64_t firstentry, Long64_t nentries) const
   // return the number of entries to be processed
   // this function checks that nentries is not bigger than the number
   // of entries in the Tree or in the associated TEventlist

This new function is called in:
   TTreePlayer::CopyTree
   TTreePlayer::Principal
   TTreePlayer::Process
   TTreePlayer::Scan
   TTreePlayer::Query

Revision 9729 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 12 04:33:45 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124772 byte(s)
Diff to previous 9661
From Philippe:
This enhance the support in TTreeFormula for (conceptual) array
with 2 varying dimensions in the case the 2nd dimensions has
some zero length and a fixed index is used.

This patch also add the ability to format the output of
TTree::Scan.  The option parameter can now contains the following
customization:

   //    colsize=ss
   //       Where 'ss' will be used as the default size for all the column
   //       If this options is not specified, the default column size is 9
   //    precision=pp
   //       Where 'pp' will be used as the default 'precision' for the
   //       printing format.
   //    col=xxx
   //       Where 'xxx' is colon (:) delimited list of printing format for
   //       each column if no format is specified for a column, the default is
   //       used.
   // For example:
   //   tree->Scan("a:b:c","","colsize=30 precision=3 col=::20.10");
   // Will print 3 columns, the first 2 columns will be 30 characters long,
   // the third columns will be 20 characters long.  The printing format used
   // for the columns (assuming they are numbers) will be respectively:
   //   %30.3g %30.3g %20.10g

Revision 9661 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 3 05:25:03 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 121112 byte(s)
Diff to previous 9625
From Philippe:
This patch add to TTreeFormula (and to TStreamerInfo::GetValue)
the ability to read the content of a data member defined as
        Int_t *arr[3]; //[n]
The data was properly wrote and read back from disk.  However
TTreeFormula (and StreamerInfo::GetValue) where ignoring the
size of the array of pointers.

+ a fix to the printout of TTree::Scan (for Long64_t)

Revision 9625 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 30 07:44:36 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 121110 byte(s)
Diff to previous 9615
In TTreePlayer::MakeClass generate code with the functions declared virtual.
In case of MakeSelector this is a redundant declaration because TSelector
has already declared all these functions virtual.

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/treeplayer/src/TTreePlayer.cxx
File length: 120942 byte(s)
Diff to previous 9556

*****************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 9556 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 20 09:40:19 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 120690 byte(s)
Diff to previous 9515
From Philippe:

This patch implements support for TTree Friend in the new TTree Proxy
mechanism (See releases notes of ROOT 4.00/08).

For example with the result of tutorials/treefriend.C and the macro print.C:

  void print() {
    cout << "Entry #" << fChain->GetReadEntry()
         << " and #" << TF.GetReadEntry() << "  \t"
         << x << " ";  // from the main tree
    if (TF.GetReadEntry()>=0) cout << TF.x; // from the friend tree
    else cout << "N/A";
    cout << endl;
  }

You can simply create a Proxy based TSelector with
  T->MakeProxy("withfriend","print.C","","nohist");
Then use the resulting file (withfriend.h) as anyother
TSelector script.  For example:
  T->Process("withfriend.h+","",20);

Or you can generate a simple histogram 2 files fill.C and fillCut.C
  root [5] .! cat fill.C
  double fill() {
    return x - TF.x;
  }
  root [6] .! cat fillCut.C
  Bool_t fillCut() {
    return TF.GetReadEntry()>=0;
  }
and you can just do:
  T->Draw("fill.C+","fillCut.C");

Revision 9515 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 14 00:19:12 2004 UTC (10 years, 6 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 120589 byte(s)
Diff to previous 9460
From Philippe:
fix of errorneous, harmless error message.

Revision 9460 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 9 04:40:49 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 120283 byte(s)
Diff to previous 9432
From Philippe:
The choice of allowing TTree::Draw to take a filename is having
an unplanned consequence.  We can call:
        tree->Draw("myfilename.C");
We can also call
        tree->Draw("$HOME/myfilename.C");
However this means that
      T->Draw("Entry$")
now issues
     Error in <TUnixSystem::ExpandFileName>: input: Entry$, output: Entry$
     Error in <TUnixSystem::ExpandFileName>: input: ...
     Error in <TUnixSystem::ExpandFileName>: ...

The attached patch fix this problem.
However if the user tree has a variable name var$var (well not nice but
legal), we still get:
     T->Draw("var$var");
     Error in <TUnixSystem::ExpandFileName>: input: var$var, output: var$var
     Error in <TUnixSystem::ExpandFileName>: input: ....

Revision 9432 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 8 08:09:06 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 120004 byte(s)
Diff to previous 9343
add new function BuildIndex (called from TTree::BuildIndex).
This new function craetes an instance of teh new TTreeIndex class.

TTreePlayer::UpdateFormulaLeaves also takes care of updating
the TTreeIndex TTreeFormula.

Revision 9343 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 29 17:39:02 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 119667 byte(s)
Diff to previous 9323
From Philippe:
This patch fixes a problem in the protection against empty files in
TTreePlayer::MakeProxy

Revision 9323 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 25 18:42:19 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 119662 byte(s)
Diff to previous 8337
From Philippe:
This introduces the implementation of MakeProxy and Draw of a C++ function which
is run in a context where the name of the branches can be used as a C++ variable.

In TTree, we added a method MakeProxy and modified the behavior of TTree::Draw
(by modifying TTreePlayer::DrawSelect).
In TTreePlayer we added TTreePlayer::MakeProxy and TTreePlayer::DrawScript

TTreeProxyGenerator is a new class implementing the generation of the skeleton.
(TBranchProxyDescriptor and TBranchProxyClassDescriptor are helper class).

A priori the tree parsing done by TTreeProxyGenerator could be used to
re-implement improved an improve MakeClass/MakeSelector.

TBranchProxy is the base class of a new hierarchy of classes implementing the
indirect access to the branch of a TTree.  The main features are
        - protection against array out-of-bound
        - on-demand loading of branches
        - ability to use the 'branchname' as if it was a data member.
For example with Event.root:
                Double_t somepx = fTracks.fPx[2];
somepx is updated with the current fPx of the 3rd track.

TTree::Draw as been updated so that upon seeing
        tree->Draw("h1analysis.C+","")
        tree->Draw("h1analysis.C+","h1analysisCut.C")

If h1analysis.C (and h1analysisCut.C in the 2nd case) are readable files,
the new MakeProxy will be used __instead of__ TTreeFormula.  Currently
TTreeFormula and 'TBranchProxy' can not be used together.

In which case the means of parameters to TTree::Draw are more like:
   Int_t TTree::Draw(const char *filename, const char *cutfilename,
                     Option_t *option="",
                     Int_t nentries=1000000000, Int_t firstentry=0);

Both files are expected to be source file which contains at least a free
standing function with the signature:
        x_t filename();
and
        y_t cutfilename();

x_t and y_t needs to be type that can convert respectively to a double
and a bool (because the code does; if(cutfilename()) htemp->Fill(filename());

The 2 free standing function are run in a context such that the branch names
are available as locally avaiable variable of the correct (read-only) type.

If 'filename' is suffixes with an ACLiC mode, the ACLiC mode is inforced
(Note that at this time, interpreted mode is not supported and if no ACLiC
mode is specified, a '+' is used by default).

The generated script file (currently generatedSel.h but subject to change in
a future release) is intentionally __not__ deleted at the end of the processing.
Also if the file already exist, it is updated if and only if the new version
is different.  In particular this means issues twice in a row:
        tree->Draw("Script.C+");
does __not__ result in a second (useless) compilation.

For example to draw px in hsimple.root just have a hsimple.C file:
        double hsimple() {
           return px;
        }
and do:
        new TFile("hsimple.root")
        tree = ntuple
        draw(tree,"hsimple.C");
or
        draw(tree,"hsimple.C+");

I attached a few examples, including a full port of the h1analysis tutorials.

To use the h1analysis do:
        TChain chain("h42");
      chain.Add("$H1/dstarmb.root");  //  21330730 bytes  21920 events
        chain.Add("$H1/dstarp1a.root"); //  71464503 bytes  73243 events
      chain.Add("$H1/dstarp1b.root"); //  83827959 bytes  85597 events
      chain.Add("$H1/dstarp2.root");  // 100675234 bytes 103053 events

      chain.Draw("h1analysis.C+","h1analysisCut.C");
      h1analysis_Terminate();

I also have an example working of all the new Event files:

        new TFile("Event.new.split9.root");
        TTree * tree = (TTree*)file->Get("T");
        tree->Draw("script.C");

script0.C needs to be used for Event.new.split0.root.

Also you can just generate the skeleton by doing:
  tree->MakeProxy("mysel",scriptfilename,cutfilename,splitLevel);

Where the non-split branches, will be made to look as if there were
split up to 'splitLevel'. (i.e mean that their data members will
be syntactically available as if they were split).

Revision 8337 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 8 14:54:31 2004 UTC (10 years, 10 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 115898 byte(s)
Diff to previous 7880
From Maarten:
README.SELECTOR provides description of TSelector framework. Also to be
put in the User Guide. TTreePlayer update to add more comments in generated
selector code reflecting the SlaveBegin and SlaveTerminate, etc.

Revision 7880 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 10 10:52:31 2004 UTC (11 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 114142 byte(s)
Diff to previous 7784
From Philippe:

This mega patch introduces a new implementation of the STL I/O
which is backward and forward compatible.  In addition this is more
exactly a new implementation or an extension of the container I/O.

We are introducing a new abstract interface:
"TVirtualContainerProxy", which can be implemented to present a
proxy to any collection which the I/O (and TTreeFormula) can use
then transparently.

The TVirtualContainerProxy interface allows to the I/O system to
request some information and to execute some essential function of
the container:
   what kind of object/data does it contain
   does it contain pointers
   how to insert data into the container
   how to retrieve an array of pointer to the elements inside
   how to create a collection object
   how to clear the collection
   how to resize the collection
   how to streamer the collection (if needed)
   how to calculate the sizeof the collection
   how to calculate the number of elements of the collection.

Using those primitives, the I/O and TTreeFormula should be able to
access any collection.   The I/O should also be able to handle the
splitting of collections that can be split (i.e. contains a single
type of object/data).

The current compromise selected between code duplication,
performance of the I/O of TClonesArray and vector of pointers and
the performance of the I/O of other containers, was to have on
function handle all collection as if they were a C-style array of
pointers to data.  This implies for example that the I/O of vector
of object current passes via the construction of temporary array
of pointer.  The cost of this construction is usually ~Qjust~R the
cost of calculating the addresses of the elements and assigning it
to an array element.

Registering a collection proxy will be similar to
     static int dummy = GenerateInitInstance((CollectType*)0x0)-
>AdoptCollectionProxy(new CollectTypeProxy));

Follows a few details on the modifications made to some of the
files and classes.

Bytes.h:
   Work around a problem in the MSVC++ 6.0 optimizer.  This should
not affect other compilers.

String:
   Included the std::string dictionary into G__Base2.cxx, this
insures its presence at all time.
   Added a new file string.cxx holding the streamer for
std::string.

RConfig.h
   Added proper ansi stream configuration for AIX, KCC
   Added template specialization defect for MSVC

TBrowser
   Start adding the ability to browser non TObject classes

TBuffer
   To handle the reading and writing array of objects, added:
     Int_t    CheckByteCount(UInt_t startpos, UInt_t bcnt, const
TClass *clss, const char* classname);
     Int_t    CheckByteCount(UInt_t startpos, UInt_t bcnt, const
char *classname);
     void     ReadFastArray(void  *start , TClass *cl, Int_t n=1,
TMemberStreamer *s=0);
     void     ReadFastArray(void **startp, TClass *cl, Int_t n=1,
Bool_t isPreAlloc=kFALSE, TMemberStreamer *s=0);
     void     WriteFastArray(void  *start,  TClass *cl, Int_t n=1,
TMemberStreamer *s=0);
     Int_t    WriteFastArray(void **startp, TClass *cl, Int_t n=1,
Bool_t isPreAlloc=kFALSE, TMemberStreamer *s=0);

TROOT
   Enhancement to make the access to gROOT not dependent for the
library loading order.  In particular we added:
      ROOT::GetROOT()
   which should be used instead of gROOT.

   Improve support for STL.  In particular, now STL containers do
have a corresponding TClass object


TRealData
   Replace SetStreamer by AdoptStreamer that allow to use not only
a streamer function but also streamer object (allowing streamer
with a state for Foreign classes)

TString:
   Improve streamer performance

TSystem:
   More consistency of the return value of TSystem::CompileMacro

build/unix/makecintdlls.sh
   Stop making the string.dll

config:
   enhance sgicc makefiles

cont:
   fix TBits::operator=
   TClassTable now warns for duplicate only for non stl classes
   TClonesArray fix a typo

gpad:
   Add a new class TInspectObject to enable inspect non TObject
classes
   TRootBrowser : enable inspect non TObject classes

TFormula/TTreeFormula
   To enhance performance switch from using one array fOper which
contained the operation code and its arguments to using 2 arrays
fActions and fActionParams to store respectively the operation and
its parameters.
   A new function Convert is used to convert old version from the
fOper to fActions.  This allows cleaner coding and offer
optimization opportunities.

TTreePlayer
   Start adding support in MakeClass for STL containers.

TRint/TProofServ
   Insure the loading of the string support

Event.cxx
   make sure to avoid memory over-write

stress.cxx
   Add new parameters
      stress <nevent> <style> <subbench> <portion>
   if <subbench> is 1 or higher, print the benchmark results after
each test.  This allows understand
   which test is affect by a performance change.
   portion is a binary field to indicate which test to run.  This
allows to focus on a particular test.

TVirtualCollectionProxy
   Abstract interface used to access any type of containers from
the I/O system and TTreeFormula. See TVectorProxy and
TEmulatedVectorProxy for examples.

TEmulatedVectorProxy
   Implementation of a std::vector proxy to be able to read a
std::vector without any libraries.

TVectorProxy
   Implementation of TVirtualCollectionProxy for a std::vector for
which we have the library.

TStreamerInfo.cxx
   Split in 3 files:  TStreamerInfo.cxx
TStreamerInfoReadBuffer.cxx TStreamerInfoWriteBuffer.cxx

   All the ReadBuffer, ReadBufferClones and the new ReadBufferSTL
(similarly for  WriteBuffer) have been factorized into one
function and 2 short wrappers.  The new main function expect an
array of pointer to the objects (this array is most often of size
one).

   TClonesArray objects pass GetObjectRef(0) to the common
ReadBuffer
   vector<bla*> v pass &(v[0])
   vector<bla> needs to create an intermediary array to hold the
address

   This mechanism is sometimes not optimal (vector<blah>) but
allows extremely flexibly and extension.  Basically, to add
support for a new container type using the StreamerInfo mechanism
(in particular allows splitting), one 'just' need to implement a
TVirtualCollectionProxy, which, in particular, will return an
array of address to the object it contains.  Even std::map can be
handled with this mechanism, since, for I/O purposes, it can be
consider as a container of pairs.

   Add a few optimization, including more caching via a new array
of a new struct (fComp).

   Fixed a problem (re)introduced while implementing the Foreign
class CheckSum.  Doing:
      class Event;
      f = new TFile("Event.root");
   resulted in errors.

TCint
   Add proper support for TClass of STL containers. Fix a memory
leak.
   Add support for load TClass via a typedef.
   Fix a problem with multiple inheritance

TClass
   Fixed a problem (re)introduced while implementing the Foreign
class CheckSum.  Doing:
      class Event;
      f = new TFile("Event.root");
   resulted in errors.
   Add a

TClass/TGenericClassInfo/TDataMember
   Add support for a new interface (TVirtualCollectionProxy)
useable for STL containers or any user defined containers.
   Add support for streamer with are objects (as opposed to free
standing function or methods).  This allows the user a greater
flexibility in writing a streamer.
   Add a few optimizations
   Add CanSplit to answer the question for a whole Class (for
example some collection can not be splitted).

TClassStreamer
   New class to wrap a class wide streamer

ClassStreamerFunc_t
   typedef for a class wide streamer function

TMemberStreamer
   New class to wrap a specific class member streamer

MemberStreamerFunc_t
   typedef for  a specific class member streamer function

RootStreamer
   Macro to specify a free standing streamer object or function
for a class
   For example:
      RootStreamer(string,std_string_streamer);

TStreamerElement:
   A couple of optimization/simplification.
   Add support for the new STL I/O
   Extend the useful

TBranchElement:
   add a connection to the proper TVirtualCollectionProxy
   add support for STL containers (non-split and split mode)

TTree
   Make the function TTree::GetMakeClass NON-virtual for better
efficiency
   Add support for STL containers

TBasket
   Left (in comment) a yet unproved improvement proposed by
Victor.  The preliminary tests were inconclusive performance wise
and it had (seemingly) problem with backward and forward
compatibility.

TBranch
   Performance improvements

metautils
   This is a new package for C++ files shared between rootcint and
meta.
   It contains TClassEdit a class to help determine some property
of a class given its class name (stl, template, etc).

utils
   Introduced a new file RStl.cxx to start separating rootcint in
modules.
   Modified rootcint to support the new STL I/O methods.
   In particular a new class RStl is in charge of doing the
generating of code for STL containers.

Revision 7784 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 19 09:31:52 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 113993 byte(s)
Diff to previous 7780
Add the following warning in TSelector::GetSelector:

//   WARNING when a selector is used with a TChain:
//    in the Process, ProcessCut, ProcessFill function, you must use
//    the pointer to the current Tree to call GetEntry(entry).
//    entry is always the local entry number in the current tree.
//    Assuming that fChain is the pointer to the TChain being processed,
//    use fChain->GetTree()->GetEntry(entry);

Modify TTreePlayer::MakeSelector to generate the code with this warning
in the selector Process function.

Revision 7780 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 18 13:21:33 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 113553 byte(s)
Diff to previous 7778
From Philippe:

        Add support for the boolean optimization in TFormula::GetExpFormula

        Prevent TTree::Scan from printing random value for invalid formulas

        Add a new TTreeFormula special function:

      Alt$(primary,alternate) : return the value of "primary" if it is available
                    for the current iteration otherwise return the value of "alternate".
                    For example, with arr1[3] and arr2[2]
      tree->Draw("arr1-Alt$(arr2,0)");
                 will draw arr[0]+arr2[0] ; arr[1]+arr2[1] and arr[1]+0
                    Or with a variable size array arr3
       tree->Draw("Alt$(arr3[0],0)+Alt$(arr3[1],0)+Alt$(arr3[2],0)");
                    will draw the sum arr3 for the index 0 to min(2,actual_size_of_arr3-1)
                    As a comparison
       tree->Draw("arr3[0]+arr3[1]+arr3[2]");
                    will draw the sum arr3 for the index 0 to 2 only if the
                    actual_size_of_arr3 is greater or equal to 3.
                    Note that the array in 'primary' is flatened/linearilized thus using
                    Alt$ with multi-dimensional arrays of different dimensions in unlikely
                    to yield the expected results.  To visualize a bit more what elements
                    would be matched by TTree::Draw, TTree::Scan can be used:
       tree->Scan("arr1:Alt$(arr2,0)");
                    will print on one line the value of arr1 and (arr2,0) that will be
                    matched by
       tree->Draw("arr1-Alt$(arr2,0)");

Revision 7778 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 17 15:20:48 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 112174 byte(s)
Diff to previous 7777
Fix a problem in TTreePlayer::UnbinnedFit in case the initial value of a parameter is negative.
In this case, the step size was set negative, forcing Minuit in RESET mode.

Revision 7777 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 16 22:42:29 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 112098 byte(s)
Diff to previous 7775
From Philippe

This patch makes sure the formula are properly refreshed when using a chain.

It removes the printing of some (spurious) empty lines when using a selection criterion.
I.e. Without a selection criterion, there is always a least one line per entry (if is empty) while with a selection
criterion, an entry is printed if and only if a least one of the sub-element exist and match the criterion.

Revision 7775 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 16 21:58:58 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 112051 byte(s)
Diff to previous 7773
From Philippe:

With this improvement, TTree::Scan properly correlate (as needed) the selection criterium and the printed columns.

Revision 7773 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 16 18:55:49 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 111901 byte(s)
Diff to previous 7763
From Philippe

This patch restores and enhances TTree::Scan previous behavior regarding arrays.
It nows always (unless user request otherwise) print all the requested elements
of all the arrays.  The printing of multi-dimensional array is now done in a
linear, non-synchronized fashion.  In particular this means that selection on
2D arrays (including array within a TClonesArray) might not print the correct
instance of the arrays (in case of using arrays of un-even dimension)

You can now limit the number of element in the array by using the string option 'lenmax=dd':

Revision 7763 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 16 09:00:37 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109226 byte(s)
Diff to previous 7754
Change comments in TTreePlayer::UnbinnedFit to indicate that it is mandatory
to fix the normalization parameter.

Revision 7754 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Dec 14 16:28:12 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109239 byte(s)
Diff to previous 7749
In TTreePlayer::MakeClass implement the logic to compute the maximum length of
leaves with variable length in all the Trees of a TChain.
In the previous implementation, the length of
the leaves in the first Tree of the chain was assumed.

Revision 7749 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Dec 13 09:25:56 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 108189 byte(s)
Diff to previous 7664
From Philippe

I enhanced TTree::Scan so that instead of having
    t3333->Scan("PtGen","Type==13");
being always equivalent to
    t3333->Scan("PtGen[0]","Type[0]==13");

TTree::Scan will now print all the requested elements of any array (as TTree::Draw does).

TTree::Principal has been similarly updated (but not tested).

TTreeFormula has also been updated to remove a bad side-effect of the boolean operation optimization. In case like
     analysis->Scan("Lept_1","Lept_1>=0&&Lept_2!=0");
if Letp_1[0] was negatif then the Lept_2 branch was not read from file.

Revision 7664 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 26 21:48:27 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 106022 byte(s)
Diff to previous 7630
From Philippe:

This update makes any selector created by the TTreePlayer directly from a source file local to the current TTreePlayer
object (instead of being a static).

It also insures that TProofPlayer and TTreePlayer do not call delete for an object of
a class which library was unloaded (since the code is gone, this would lead to a core
dump).

Revision 7630 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Nov 22 22:02:02 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 105492 byte(s)
Diff to previous 7620
Replace the generation of a TPolyMarker by a TGraph when
generating 2-d plots in tree.Draw("y:x").
With this change, one can use all the features of a TGraph, like
additional drawing options "l" or TGraph::Fit.
For example the following command
  tree.Draw("y:x");
produces a scatter plot with the points corresponding to the
original coordinates x and y. After the command, one can access
the TGraph object in the pad with
  TGraph *g = (TGraph*)gPad->GetPrimitive("Graph");

The following command
  tree.Draw("y:x:,"","l");
will produce a TGraph connecting all the points with a line.

A similar change is planned to replace the generation of the TPolyMarker3D
by a TGraph2D in commands like tree.Draw("z:y:x");

The above changes are also necessary to support multiple TGraph (or TGraph2D)
generated in a PROOF session when updating only the last generated points.

Revision 7620 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 20 15:09:21 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 105161 byte(s)
Diff to previous 7619
Reintroduce previous versions of these two classes. I am still making changes.

Revision 7619 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 20 15:03:44 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 105216 byte(s)
Diff to previous 7438
From Axel Naumann:

I had a class with an impl file name
/home/.../src/TMyClass.cxx
which was misinterpreted as being a ROOT class (as it had the format
"*/src/T*"). I changed the ROOT class detection to check whether it's an
absolute path name, assuming that ROOT's classes' impl file names are
_always_ relative paths.

Revision 7438 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 16 15:01:01 2003 UTC (11 years, 3 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 105161 byte(s)
Diff to previous 7407
By Maarten:
don't generate anymore the ProcessFill() and ProcessCut() methods in the
selector class definition.

Some updates in PROOF README.

Revision 7407 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 7 15:45:00 2003 UTC (11 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 105281 byte(s)
Diff to previous 7403
Add documentation for the new 4-D option in TTree::Draw and TTreePlayer::DrawSelect

//  varexp is an expression of the general form
//   - "e1"           produces a 1-d histogram of expression "e1"
//   - "e1:e2"        produces a 2-d histogram (or profile) of "e1" versus "e2"
//   - "e1:e2:e3"     produces a 3-d scatter-plot of "e1" versus "e2" versus "e3"
//   - "e1:e2:e3:e4"  produces a 3-d scatter-plot of "e1" versus "e2" versus "e3"
//                    and "e4" mapped on the color number.
//
//  Example:
//     varexp = x     simplest case: draw a 1-Dim distribution of column named x
//            = sqrt(x)            : draw distribution of sqrt(x)
//            = x*y/z
//            = y:sqrt(x) 2-Dim distribution of y versus sqrt(x)
//            = px:py:pz:2.5*E  produces a 3-d scatter-plot of px vs py ps pz
//              and the color number of each marker will be 2.5*E.
//              If the color number is negative it is set to 0.
//              If the color number is greater than the current number of colors
//                 it is set to the highest color number.
//              The default number of colors is 50.
//              see TStyle::SetPalette for setting a new color palette.

Revision 7403 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 7 11:10:36 2003 UTC (11 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 104514 byte(s)
Diff to previous 7338
Implement support for 4 dimensions in TTree::Draw.
When doing tree.Draw("x:y:z:u"), the variable "u" is mapped to a color number.
A 3-d scatter plot is generated with ncolors TPolymarker3D objects attached
to the produced histogram list of functions.

Revision 7338 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 23 17:20:06 2003 UTC (11 years, 4 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 103861 byte(s)
Diff to previous 7333
from Maarten:
make TSelector::Version() const.

Revision 7333 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 23 14:51:16 2003 UTC (11 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 103855 byte(s)
Diff to previous 7278
From  Maarten Ballintijn
New selector code, modified TTreePlayer and TProofPlayer.
These mods are a first step to get TTree::Draw working with PROOF.

Revision 7278 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 15 08:10:09 2003 UTC (11 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 103963 byte(s)
Diff to previous 7269
Some mods in the doc showing how to use the TSelector class

Revision 7269 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 12 12:37:39 2003 UTC (11 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 103949 byte(s)
Diff to previous 7223
Add new comments in the Process functions to indicate how to call
the interesting form Process(TSelector*)

Revision 7223 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 6 17:15:04 2003 UTC (11 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 103680 byte(s)
Diff to previous 7153
From Glenn Horton-Smith:

"The error bars obtained from TTree::UnbinnedFit() are incorrect, unless the user
takes special actions to work around the problem.  The reason has to do with the
definition of TreeUnbinnedFitLikelihood() in TTreePlayer.cxx.  In a nutshell,
the issue is that TreeUnbinnedFitLikelihood() returns -logL, when it should
return -2*logL in order for the default error definition to work correctly.

The workaround if you are using MINUIT is to call
gMinuit->SetErrorDef(0.5) before calling TTree::UnbinnedFit() -- and don't
forget to gMinuit->SetErrorDef(1.0) before using the other Fit() functions!
Note there is apparently no corresponding workaround if you prefer the Fumili
fitter.

The obvious fix is to make TreeUnbinnedFitLikelihood() return -2*logL"
~
~
~

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/treeplayer/src/TTreePlayer.cxx
File length: 103513 byte(s)
Diff to previous 7029
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 7029 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 4 20:04:36 2003 UTC (11 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 103169 byte(s)
Diff to previous 6963
From Philippe:
The comments that are duplicated in TTree::Draw and TTreePlayer::DrawSelect where out-of-sync.

Revision 6963 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 17 14:30:58 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 102955 byte(s)
Diff to previous 6838
Protection added in TTreePlayer::DrawSelect in case gPad is null
and the result of the query is 0 rows.

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/treeplayer/src/TTreePlayer.cxx
File length: 102945 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/treeplayer/src/TTreePlayer.cxx
File length: 102510 byte(s)
Diff to previous 6792
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 6792 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 27 11:02:34 2003 UTC (11 years, 7 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 102538 byte(s)
Diff to previous 6702
several PROOF bug fixes and a new TCondor interface to start and control
the PROOF master and slave servers in a CONDOR pool. By Maarten.

Revision 6702 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 10 20:52:50 2003 UTC (11 years, 7 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 102591 byte(s)
Diff to previous 6473
two small typos in comments, plus a little comment reformatting.

Revision 6473 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Apr 20 21:26:45 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 102982 byte(s)
Diff to previous 6410
In TTreePlayer::DrawSelect, do not draw the generated histogram
if the number of selected rows is null and option "same" is not specified.
Instead clear the current pad.

Revision 6410 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 9 16:30:19 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 102880 byte(s)
Diff to previous 6408
From Philippe:
In the case where the tree contains 2 top level objects which happen to have a data member
that has the same name, the variable name for the branch pointer in the class created by
MakeClass (i.e. b_branchname) was identical.  This corrects the situation.

Revision 6408 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 9 08:48:09 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 101537 byte(s)
Diff to previous 6220
Change comments in TTree::MakeSelector to document the selector Process function instead
of ProcessCut and ProcessFill.
In TTreePlayer::MakeClass, change the comments in the generated code for Process.

Revision 6220 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 28 22:57:13 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 101168 byte(s)
Diff to previous 6207
In TTreePlayer::Copytree, one must call UpdateFormulaLeaves for the selection TtreeFormula
when moving to a new Tree in a TChain.

Revision 6207 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 27 21:09:40 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 101116 byte(s)
Diff to previous 6046
In TTreePlayer::Scan, one must call UpdateFormulaLeaves for the selection
expression if there is one, when moving to a new file in a TChain.

Revision 6046 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 31 18:02:38 2003 UTC (11 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 101063 byte(s)
Diff to previous 5936
Modify TTreePlayer::Process to Notify the selector.

Revision 5936 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 17 17:48:57 2003 UTC (12 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 101004 byte(s)
Diff to previous 5918
Merge the functionality of the two previous classes TFileMap and TTreeFileMap
into a single new class TFileDrawMap.
See comments in TFileDrawMap for usage info.
make distclean is recommended

Revision 5918 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 15 18:48:16 2003 UTC (12 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 101702 byte(s)
Diff to previous 5873
*** empty log message ***

Revision 5873 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 11 14:21:29 2003 UTC (12 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 100899 byte(s)
Diff to previous 5871
Mods in TTreePlayer::DrawSelect to take into account the case when the function
is called by TTreePlayer::Fit. TTreePlayer::fHistogram must be set
to the histogram object returned by the selector.

Revision 5871 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 11 12:47:02 2003 UTC (12 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 100822 byte(s)
Diff to previous 5869
Move histogram drawing to TTreePlayer.
Implement TSelectorDraw::Notify replacing the old UpdateFormulaLeaves

Revision 5869 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 11 09:07:20 2003 UTC (12 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 100835 byte(s)
Diff to previous 5865
From Philippe:
Looking at Maarten's problem  I noticed that the G__var_array are not properly initialized.
In the attached patch I corrected the problem by calling memset on each of the structs.

I also noticed (running Maarten's example) that a few times, the start of an error message is printed but the ending
(which should come from G__genericerror) is not printed because G__const_noerror is set to 1.  So in a couple of place I
preceded the printing of the start of the error message by if (0==G__const_noerror).

Revision 5865 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 10 14:51:51 2003 UTC (12 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 98749 byte(s)
Diff to previous 5720
Important restructuring of the TTreePlayer class in view of PROOF.
In particular TTree::DrawSelect is reduced to a few lines to use
the new TSelectorDraw class via TTreePlayer::Process.
More changes are foreseen to use the same mechanism for TTree::Scan
and TTree::Query.

Revision 5720 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 3 09:36:11 2002 UTC (12 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139001 byte(s)
Diff to previous 5717
In TTreePlayer::MakeClass, generate new comments to clarify where
the global entry in the chain or the local entry in the Tree should be used.

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/treeplayer/src/TTreePlayer.cxx
File length: 138661 byte(s)
Diff to previous 5686
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 5686 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 27 21:54:56 2002 UTC (12 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138572 byte(s)
Diff to previous 5444
From Philippe:
This patch:
        a) add ClassDef to the generate TSelector with version 0.
        b) keep the Error message for all cases but those inheriting from TSelector
                (Warnings are not seems in the default rootcint mode).
        c) rootcint succeed in all cases (hence allowing user to compile
                classes that do not strictly implement the TObject interface).

Revision 5444 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 21 16:13:06 2002 UTC (12 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138520 byte(s)
Diff to previous 5395
From Philippe:
This patch makes sure that a scalar weight is used for all the elements
of an array which is drawn.
Before this patch the scalar weight was only applied to the first
element of the array.

Revision 5395 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 4 20:14:52 2002 UTC (12 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138519 byte(s)
Diff to previous 5388
from Philippe:
This prevent a crash in the case where
        TTree::Draw is call with a zero length first arguments.

Revision 5388 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 3 18:09:51 2002 UTC (12 years, 3 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138451 byte(s)
Diff to previous 5349
fix small typo in comment of generated code.

Revision 5349 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 25 21:06:43 2002 UTC (12 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138453 byte(s)
Diff to previous 5339
Add support for additional Tree use cases in TTreePlayer::MakeClass

Revision 5339 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 21 21:58:07 2002 UTC (12 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138250 byte(s)
Diff to previous 5287
Remove references to TPacketGenerator from TVirtualTreePlayer and TTreePlayer.
These unused references required linking with libProof.

Revision 5287 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 13 19:44:03 2002 UTC (12 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139147 byte(s)
Diff to previous 5268
Invoke the new TTreeViewer constructor with const TTree* as argument

Revision 5268 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 12 07:03:25 2002 UTC (12 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139158 byte(s)
Diff to previous 5037
In the UnbinnedLikelihood fit function, the addresses of the function
arguments must be set via TF1::InitArgs before calling the function.
Interpreted CINT functions were not correctly called.

Revision 5037 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 1 21:33:48 2002 UTC (12 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139126 byte(s)
Diff to previous 5013
This patch from Philippe implements the reading of variable size
array inside a TClonesArray when the TClonesArray is not split.
It also adds a test for reading variable size array inside a TClonesArray.
It also fixes a problem recently mentioned on roottalk where the formula
for not properly reading variable size array when the
variable size was indexed more there was more than one variable in the formula.

Revision 5013 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 27 11:08:51 2002 UTC (12 years, 6 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139144 byte(s)
Diff to previous 5009
add initialization of i to get rid of possible uninitialized var warning.

Revision 5009 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 25 18:13:35 2002 UTC (12 years, 6 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139183 byte(s)
Diff to previous 4949
patch to prevent the modification of a (potentially) read only string
parameter. By Philippe.

Revision 4949 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 16 20:35:27 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139016 byte(s)
Diff to previous 4688
Add PluginManager TTreeViewer

Revision 4688 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 11 15:47:36 2002 UTC (12 years, 7 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138927 byte(s)
Diff to previous 4473
few small mods for PROOF by Maarten.

Revision 4473 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 7 09:05:36 2002 UTC (12 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137918 byte(s)
Diff to previous 4380
In TTreePlayer::MakeClass add support for Trees/Branches generated from TFolders.

Revision 4380 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 19 07:40:47 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 137602 byte(s)
Diff to previous 4366
Add support for THbookTree in MakeClass.
The function Init in the code generated opens a THbookFile
and read a THbookTree.

Revision 4366 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Apr 14 14:35:26 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136857 byte(s)
Diff to previous 4362
Add several missing protections in MakeClass.
Replace the use of leaf-GetTitle() by leaf->GetName() in the 3 places
where GetTitle was still used.
This change is required for the introduction of the branch hierachy
supported by the new version of TBranchElement.

Revision 4362 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 13 09:42:14 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136973 byte(s)
Diff to previous 4356
Fix a compiler warning:
treeplayer/src/TTreePlayer.cxx:1751: warning: `class TBranchElement * bre' might be used uninitialized in this function

Revision 4356 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 12 19:19:53 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136971 byte(s)
Diff to previous 4242
From Philippe:
The files produced by MakeClass/MakeSelector were incorrect if the tree
is containing a TClonesArray which contains a variable length array.  This
fix correct the situation.

Also is included is a short documentation of the TTreeFormula special functions.

Revision 4242 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 26 07:05:57 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136052 byte(s)
Diff to previous 4199
This pacth from Philippe adds:

  - Support for 2D graphical Cuts for TClonesArray members
  - Support for 1D graphical Cuts by using their X minimum and
        maximum as ( Xmin <= Formula <= Xmax ).

  - Support for the following TTreeFormula special functions.

        Entry$   : return the current entry number (== TTree::GetReadEntry())
        Entries$ : return the total number of entries (== TTree::GetEntries())
        Length$  : return the total number of element of this formula for this
                        entry (==TTreeFormula::GetNdata())
        Iteration$: return the current iteration over this formula for this
                        entry (i.e. varies from 0 to LENGTH$).

  - Synchronization of the dimensions of all the formulas involved in
        a Draw call.

    For example for (with fMatrix[4][4] and fTracks[fNtrack].fVertex[3]
      T->Draw("fMatrix","fVertex>=2");

    The corrected result is histogram use something like:

        if (fTracks[0].fVertex[0]>=2) fMatrix[0][0];
        if (fTracks[0].fVertex[1]>=2) fMatrix[0][1];
        if (fTracks[0].fVertex[2]>=2) fMatrix[0][2];
        if (fTracks[1].fVertex[0]>=2) fMatrix[1][0];
        if (fTracks[1].fVertex[1]>=2) fMatrix[1][1];
        if (fTracks[1].fVertex[2]>=2) fMatrix[1][2];
        ....

    The old behavior was:

        if (fTracks[0].fVertex[0]>=2) fMatrix[0][0];
        if (fTracks[0].fVertex[1]>=2) fMatrix[0][1];
        if (fTracks[0].fVertex[2]>=2) fMatrix[0][2];
        if (fTracks[1].fVertex[0]>=2) fMatrix[0][3]; // note the extra step here.
        if (fTracks[1].fVertex[1]>=2) fMatrix[1][0];
        if (fTracks[1].fVertex[2]>=2) fMatrix[1][1];
        ....

Revision 4199 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 19 17:05:50 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136840 byte(s)
Diff to previous 4119
Patch from Philippe:
//     Special functions and variables
//     ===============================
//
//  'ENTRY':  A TTree::Draw formula can use the special variable ENTRY
//  to access the entry number being read.  For example to draw every
//  other entry use:
//    tree.Draw("myvar","ENTRY%2==0");

Revision 4119 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 26 21:55:58 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136553 byte(s)
Diff to previous 4003
Fix by Philippe in TTreePlayer::CopyTree.
The CopyTree method was only looking at the first value of an array.

Revision 4003 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 15 22:13:49 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136393 byte(s)
Diff to previous 3853
In MakeSelector, correct typos (missing "") in the comments of the generated code

Revision 3853 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Feb 3 17:38:16 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136390 byte(s)
Diff to previous 3807
Modify TTreePlayer::EntryLoop to take into account the Tree or TChain weight

Revision 3807 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 29 17:33:47 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136285 byte(s)
Diff to previous 3785
Modify TTreePlayer::TakeEstimate to not display the stats box in case
TTree->Draw(y:x>>h(10,0,1,10,0,1)")

Revision 3785 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 26 21:07:11 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136148 byte(s)
Diff to previous 3748
In TTreePlayer::DrawSelect, simplify the logic when the binning info
is specified in the query and add support for the limits as indicated
in the function comments.
  T.Draw("px>>hpx(50,-2,3)")
is again working after this change.

Revision 3748 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 24 11:39:31 2002 UTC (13 years ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136215 byte(s)
Diff to previous 3742
rename IOSFwd.h and IOStream.h to Riosfwd.h and Riostream.h. The change
is necessary because on Windows which is case insensitive IOStream.h
hides the real iostream.h.

Revision 3742 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 23 17:52:52 2002 UTC (13 years ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136215 byte(s)
Diff to previous 3717
use IOSFwd.h in headers instead of <iosfwd> or many other ifdef'ed variant
and IOStream.h in the source instead of <iostream[.h]>, <fstream[.h]> and
<iomanip[.h]>.

Revision 3717 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 20 10:25:03 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136321 byte(s)
Diff to previous 3707
In TTreePlayer::TakeAction and TakeEstimate, use the new function SetPoint
from TPolyMarker or TPolyMarker3D instead of filling the array directly.
SetPoint takes care of setting the variable fLastPoint automatically.

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/treeplayer/src/TTreePlayer.cxx
File length: 136459 byte(s)
Diff to previous 3701
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 3701 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 18 14:51:19 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 136447 byte(s)
Diff to previous 3696
Remove PROOF code and dependencies

Revision 3696 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 18 11:35:41 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 139316 byte(s)
Diff to previous 3669
All functions looping in Tree/Chain entries modified to take into account
the new default when creating a TChain.
When starting the loop on a TChain, the number of entries is not known.
TChain.GetEntries() return a large number.
A protection is added inside the loop when the entry number does not exist.

Also, add an additional statement in the code generated by TTreePlayer::MakeClass
to protect rdading beyond the last entry in a TChain.

Revision 3669 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 15 10:29:06 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 138915 byte(s)
Diff to previous 3649
Delete function FindGoodLimits.
Use services of THLimitsFinder in TTreePlayer::SetEstimate.

Modify DrawSelect to use the modified function TTreeFormula::SetAxis.
This new function takes care of setting the bit kIsInteger in the axis.
This also fixes a problem when histograming integer variables. The number of bins
was not correctly recomputed.

Add a fix from Philippe in MakeClass to initialize members holding object pointers.

Revision 3649 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 11 15:46:34 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 141715 byte(s)
Diff to previous 3626
Fix a problem in MakeClass when generating the pointers to the branches
in case of TClonesArray

Revision 3626 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 9 16:44:35 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 141534 byte(s)
Diff to previous 3625
One more change (now alpha cxx6 complaining) about a loop index
multiply defined.

Revision 3625 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 9 16:39:54 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 141538 byte(s)
Diff to previous 3624
Remove double declaration of j in DrawSelect (does not compile with aCC).
Introduce ROOT version of snprintf.

Revision 3624 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 9 16:33:59 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 142014 byte(s)
Diff to previous 3623
One more portability problem. Replace calls to index and rindex
by strchr and strrchr.

Revision 3623 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 9 16:28:50 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 142005 byte(s)
Diff to previous 3622
The new TTreePlayer did not compile. Replace all calls to snprintf (gnu only)
by sprintf.

Revision 3622 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 9 16:18:47 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 141507 byte(s)
Diff to previous 3611
Add new functionaly in TTreePlayer::DrawSelect (Heiko.Scheit@mpi-hd.mpg.de).

//     Saving the result of Draw to an histogram
//     =========================================
//  By default the temporary histogram created is called htemp.
//  If varexp0 contains >>hnew (following the variable(s) name(s),
//  the new histogram created is called hnew and it is kept in the current
//  directory.
//  Example:
//    tree.Draw("sqrt(x)>>hsqrt","y>0")
//    will draw sqrt(x) and save the histogram as "hsqrt" in the current
//    directory.
//
//  The binning information is taken from the environment variables
//
//     Hist.Binning.?D.?
//
//  In addition, the name of the histogram can be followed by up to 9
//  numbers between '(' and ')', where the numbers describe the
//  following:
//
//   1 - bins in x-direction
//   2 - lower limit in x-direction
//   3 - upper limit in x-direction
//   4-6 same for y-direction
//   7-9 same for z-direction
//
//   When a new binning is used the new value will become the default.
//   Values can be skipped.
//  Example:
//    tree.Draw("sqrt(x)>>hsqrt(500,10,20)"
//          // plot sqrt(x) between 10 and 20 using 500 bins
//    tree.Draw("sqrt(x):sin(y)>>hsqrt(100,10,,50,.1,.5)"
//          // plot sqrt(x) against sin(y)
//          // 100 bins in x-direction; lower limit on x-axis is 10; no upper limit
//          //  50 bins in y-direction; lower limit on y-axis is .1; upper limit is .5
//
//  By default, the specified histogram is reset.
//  To continue to append data to an existing histogram, use "+" in front
//  of the histogram name.
//  A '+' in front of the histogram name is ignored, when the name is followed by
//  binning information as described in the previous paragraph.
//    tree.Draw("sqrt(x)>>+hsqrt","y>0")
//      will not reset hsqrt, but will continue filling.
//  This works for 1-D, 2-D and 3-D histograms.

Revision 3611 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 8 14:44:04 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 135448 byte(s)
Diff to previous 3563
Introduce some of the changes implemented by Heiko.Scheit@mpi-hd.mpg.de
The number of the bins for the default 1-d,2-d,3-d histograms can be
specified in the .rootrc file via the environment variables, eg:
# default binnings
Hist.Binning.1D.x: 100

Hist.Binning.2D.x: 40
Hist.Binning.2D.y: 40
Hist.Binning.2D.Prof: 100

Hist.Binning.3D.x: 20
Hist.Binning.3D.y: 20
Hist.Binning.3D.z: 20
Hist.Binning.3D.Profx: 100
Hist.Binning.3D.Profy: 100

Revision 3563 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 2 21:48:08 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 133424 byte(s)
Diff to previous 3517
Delete unused function EstimateLimites.

Add support for histograms with string variables.
All combinations are supported for
  1-D histograms
  2-D histograms
  3-D histograms
  Profile histograms
  2-D profile histograms.

Introduce a better version of TTreePlayer::FindGoodLimits in case
of integer or string variables.

Fix a problem in case of 1-D profile histograms. The kCanRebin bit
was not set.

Revision 3517 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 21 08:46:18 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 133256 byte(s)
Diff to previous 3460
Some cast to char* to avoid compiler warnings with Solaris CC and xlC5

Revision 3460 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 11 13:32:52 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 133249 byte(s)
Diff to previous 3422
In TTreePlayer::MakeClass;
 -add new code to support classes embedded in the class in a TClonesArray
 -fix a problem when generating code for a Tree havind old TBranchObjects

Revision 3422 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Dec 8 15:22:11 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 132531 byte(s)
Diff to previous 3384
Modify TTreePlayer::Query to use the new version of TTreeRow.

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/treeplayer/src/TTreePlayer.cxx
File length: 132156 byte(s)
Diff to previous 3317
delete #include <float.h>. Now included in Tmath.h

Revision 3317 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 28 16:05:42 2001 UTC (13 years, 1 month ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 132176 byte(s)
Diff to previous 3161
win32gdk case added

Revision 3161 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Nov 3 16:55:39 2001 UTC (13 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 132023 byte(s)
Diff to previous 3132
Several changes in TTreePlayer::MakeClass to support more complex cases,
in particular when branch names terminate with a dot.
The logic has also been simplified.

Revision 3132 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 29 19:30:33 2001 UTC (13 years, 2 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 132820 byte(s)
Diff to previous 3100
fix some typos in comments.

Revision 3100 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 24 15:09:37 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 132779 byte(s)
Diff to previous 3083
Fix from Philippe.
This makes sure that CopyTree does not operate on a left over
from a Draw command.  Before this patch doing:
        mytree->Draw("fPx","fPx>10);
        mytree->CopyTree("");
was the SAME as
        mytree->CopyTree("fPx>10");

Revision 3083 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 22 14:26:49 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 132759 byte(s)
Diff to previous 3068
Update by Philippe of TEventList and TTreePlayer such that one can
reproduce the results obtained at the creation of the list.

The Title of the EventList object is now fully used to store the
actual selection criteria used to produce the EventList.  When
SetReapplyCut is set to true, the criteria is fed back into the
new selection criteria.

This allows for example to really make a selection of some of
the tracks of the events and continue analysis on just them.

For example:

  T->Draw(">>pxlist","fPx>2.7");

creates a TEventList 'pxlist' that list all events that have one or
more tracks with fPx greater than 2.7

  T->SetEventList(pxlist);
  T->Draw("fPx");

will draw the fPx of ALL the tracks of the events that have at least
one track with a fPx greater than 2.7

  pxlist->SetReapplyCut(kTRUE);
  T->SetEventList(pxlist);
  T->Draw("fPx");

will draw the fPx of ONLY the tracks that ha a fPx greater than 2.7.

Also

  T->Draw(">>+pxlist","fPy>2.7");

Will have pxlist.fTitle == (fPx>2.7)||(fPx>2.5)

Whenever, a TEventList is filled, its title is properly maintained
to reflect exactly the selection(s) used to create it.

Note that as a side-effect , the TEventList will now contain each entry
only once.  (it was possible to add an entry multiple times in the list).

CCVS: ----------------------------------------------------------------------

Revision 3068 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 19 16:10:43 2001 UTC (13 years, 3 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 131009 byte(s)
Diff to previous 3038
This update insures that EventList is true to its word and includes ALL
the entry/event that has any subparts that match the criteria.
I.e.  With fTracks a TClonesArray, the following call
        T->Draw(">>elist","fTracks.fPx>0");
will create an EventList elist that contains ALL the entries that have one
or more tracks which have fPx greater than zero. Prior to this updates
elist would contain ONLY the entries where fTracks.A(0).fPx is greater
than zero.

Revision 3038 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 16 09:03:48 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 130912 byte(s)
Diff to previous 2896
Improve TTreePlayer::MakeClass in case a class includes STL data members.

Revision 2896 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 29 16:03:24 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 130661 byte(s)
Diff to previous 2819
Fix a memory leak in case the option "goff" is used in TTreePlayer::DrawSelect.
The generated histogram "htemp" is now kept in the current directory. It is accessible
after the Draw command and it is automatically deleted at the next Draw operation.

Revision 2819 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 20:05:23 2001 UTC (13 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 130499 byte(s)
Diff to previous 2809
Use Double_t instead of Float_t in TPolyMarker.
Add new constructors to support Float_t and Double_t cases.
Same for SetPolyMarker.

Modify TTreePlayer to use Double_t in the interface with TPolyMarker.
This change solves a precision problem reported by some users when
producind scatter plots of variables with a large value and small range.

Revision 2809 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 18 12:49:10 2001 UTC (13 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 130495 byte(s)
Diff to previous 2690
Modify the code generator of TTree::MakeClass to declare transient (with ! in the data member comment field)
to allow I/O with the generated class.

Revision 2690 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 15 14:51:46 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 130366 byte(s)
Diff to previous 2680
One more optimisation in MakeClass. Do not generate the elements for a base class
since the base class members have already been expanded.

Revision 2680 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 15 09:47:54 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 129996 byte(s)
Diff to previous 2642
Implement support for MakeClass for the new branches TBranchElement.

Revision 2642 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 7 06:45:02 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 128552 byte(s)
Diff to previous 2632
This patch (Philippe)  allows TTreeFormula to properly handle objects inside
an object stored in a TClonesArray.  For example in Event, if Track
contains a point to an Histogram fH, now you can do
        T->Draw("fTracks.fH.GetMean()");

Revision 2632 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 3 11:25:15 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 128684 byte(s)
Diff to previous 2581
Add support for TProfile2D by Philippe

Revision 2581 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 16 21:09:51 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 125676 byte(s)
Diff to previous 2517
In TTreePlayer::Scan, do not show parent branches

Revision 2517 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 3 20:15:04 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 125512 byte(s)
Diff to previous 2516
Modify the Query, Scan, Principal functions to invoke the TTreeFormula::UpdateFormulaLeaves
function when moving to a new Tree in a TChain.

Revision 2516 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 3 16:48:18 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124911 byte(s)
Diff to previous 2382
Several changes in TTreePlayer::CopyTree to support TChains.
The function must update the TTreeFormula used during the selection.
It makes use of the new function TTree::copyAddresses.

Revision 2382 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 6 07:21:15 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124560 byte(s)
Diff to previous 2375
 several enhancements from Philippe.
TFormula:  added support for the shift operator '>>' and '<<'.
However the associativeness is currently wrong.  It should have been left
associative (i.e.  b << 4 >> 8 == (b<<4)>>8 ).

TTreePlayer: add support for letting '>>' be interpreted as a shift operator.
Now only the last '>>' which is NOT is parenthesis or brackets is interpreted
as meaning 'feed an histogram'.  This might(?) be improved if there is a way
to guess is the right hand parameter of '>>' is and histogram or a variable.

TTreePlayer: enable string comparaison when the new style of branches and
with data member reading.  (Are left to do: method result).

Revision 2375 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 5 13:51:13 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124316 byte(s)
Diff to previous 2301
Modify the functions:
 TGraph::Fit
 TH1::Fit
 TTreePlayer::UnbinnedFit
to call TF1::SetNDF(ndf) where ndf is the number of degrees of freedom
taking into account the number of points used in the fit minus the
number of free parameters.

Revision 2301 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 28 06:32:09 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 124261 byte(s)
Diff to previous 2133
Add a new argument IsInteger to TTreePlayer::FindGoodLimits.
The new argument is used to adapt the bin size and limits for leaves
corresponding to integer values.

Revision 2133 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 7 12:34:35 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 123432 byte(s)
Diff to previous 2091
Modify the call to TGaxis::Optimize (now a static function).
Remove the instantiation of a TGaxis static object.

Revision 2091 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 28 07:49:24 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 123460 byte(s)
Diff to previous 2059
Modify several functions previously calling TTree::GetEntries
to call instead TTree::GetEntriesFriend.

Revision 2059 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 23 14:08:07 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 123357 byte(s)
Diff to previous 2028
Changes in TTreePlayer::MakeClass to add some protections and support
the case of TBranchElement.

Revision 2028 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 20 17:56:51 2001 UTC (13 years, 9 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 123094 byte(s)
Diff to previous 2001
remove creation of TROOT object. Is now done automatically when the
system loads libCore.so. Also removed TROOT.h in several programs.

Revision 2001 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 18 12:31:52 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 123219 byte(s)
Diff to previous 1924
In TTreePlayer::UnbinnedFit reset fEstimate only after the fit.
TTreePlayer::SetEstimate called by TTree::SetEstimate deletes all member arrays
of the TTreePlayer.

Revision 1924 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 9 08:25:11 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 123195 byte(s)
Diff to previous 1898
New function UpdateFormulaLeaves.
This function is called when loading a new Tree in a TChain.
This function calls TTReeFormula::UpdateFormulaLeaves for each TTreeFormula
object of a TTreePlayer.

Revision 1898 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 4 14:16:36 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 122549 byte(s)
Diff to previous 1732
Philippe Canal fixed a problem for queries of the type:
 ntuple->Draw("(px>0):py>>myprof", "", "prof")

Revision 1732 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Mar 3 08:49:35 2001 UTC (13 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 122546 byte(s)
Diff to previous 1710
Changes in comments proposed by Philippe to clarify what happens
when using file.C, file.C+ and file.C++

Revision 1710 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 27 17:24:22 2001 UTC (13 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 122751 byte(s)
Diff to previous 1703
Mods in TTreePlayer::MakeClass to generate correct code for branches
including a "."

Revision 1703 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 26 10:28:53 2001 UTC (13 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 121940 byte(s)
Diff to previous 1678
New version of TTreeViewer by Andrei Gheata

Revision 1678 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 22 15:15:52 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 121980 byte(s)
Diff to previous 1677
Fix several compilation problems in teh new version of Andrei.

Revision 1677 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 22 14:45:18 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 121950 byte(s)
Diff to previous 1570
New version of the TTreeViewer suite by Andrei Gheata

Revision 1570 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 16:54:59 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 120790 byte(s)
Diff to previous 1569
Fix a few typos in comments

Revision 1569 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 16:47:52 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 120790 byte(s)
Diff to previous 1274
New version of TTreeFormula/TFormula by Philippe Canal:
In a TFormula . and -> are now synonymous.

In a TTreeFormula, you can now specify the index of an array (TClonesArray
or regular array) via another expression of the variable of the tree.

For example the following are now correctly handled:
  myTree->Draw("clone1.a1:clone2.a2[2]");
  myTree->Draw("clone1.a1:clone2.a2[clone1.b1]");
  myTree->Draw("clone1.a1","clone2.a2[clone1.b1]>0");

This patch also enable (rudimentarily for now) the access to data members.
So now both the following are possible:
  T->Draw("event->GetNtrack()");
  T->Draw("event.fNtrack");

The lookup of leafname has been improved so that whether of not the dot
has been forced into the branchname the following will work:

  T->Draw("event.fTemperature")
  T->Draw("fTemperature")

Revision 1274 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 21 14:03:39 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 120084 byte(s)
Diff to previous 1255
Remove dependency of libTree from libHist by moving TTree::UnbinnedFit
to TTreePlayer::UnbinnedFit. Same solution as for TTree::Fit.
In addition TTree::UnbinnedFit returns an Int_t instead of being void.

Revision 1255 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 19 16:41:11 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 112853 byte(s)
Diff to previous 1242
Remove unused variable in MakeClass

Revision 1242 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 19 10:44:19 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 112891 byte(s)
Diff to previous 1224
Modify TTreePlayer::MakeClass to generate a correct code in case of
a branch with one single leave when the branch name and leaf name differs.

Revision 1224 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 15 09:34:19 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 112935 byte(s)
Diff to previous 1190
Mods by Philippe in TTreePlayer::MakeClass to generate code to support chains.

Revision 1190 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 12 12:19:47 2000 UTC (14 years, 1 month ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 110349 byte(s)
Diff to previous 1174
don't start TTreeViewer when in batch mode.

Revision 1174 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 11 12:05:31 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 110240 byte(s)
Diff to previous 1157
Modify TTreePLayer::MakeClass to generate a call to Notify at the end of the Init function.

Revision 1157 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Dec 10 17:17:01 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 110115 byte(s)
Diff to previous 1018
In TTreePlayer::MakeClass, changes to generate the corrcet code
in case of multi-dim arrays

Revision 1018 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 22 16:46:09 2000 UTC (14 years, 2 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109957 byte(s)
Diff to previous 990
invoke new TTreeViewer (has less arguments than old one).

Revision 990 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 21 21:00:05 2000 UTC (14 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109910 byte(s)
Diff to previous 825
cosmetics

Revision 825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 27 06:26:33 2000 UTC (14 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109908 byte(s)
Diff to previous 698
Added the generation of #include "TROOT.h" in the header file generated
by TTree::MakeClass. gROOT is used in the header file. With this change
the files generated by MakeClass can be compiled.

Revision 698 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 1 20:25:56 2000 UTC (14 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109869 byte(s)
Diff to previous 635
Add additional comments in TTreePlayer::Process to indicate
that the argument entry in ProcessCut and ProcessFill is the
entry number in the current Tree.
Also modify the code generator of TTreePlayer::MakeSelector
to indicate this remark

Revision 635 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 12 15:45:11 2000 UTC (14 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109439 byte(s)
Diff to previous 608
Change by Philippe Canal in TTreePlayer.
TTree::Draw uses up to 3 variables and a selection criterium.  Until this
fix, if more than one of those 4 identities were pointing to an 'array'
(like a part of a TClonesArray), only one of them was properly setup.
(The first one in the order : selection criterium, var1, var2, var3 that
was an array was setup properly, as a side effect if another variable was
using one of the array properly setup, this variable would look okay).

Revision 608 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 8 07:41:01 2000 UTC (14 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109091 byte(s)
Diff to previous 579
Several classes modified to :
 - take into account the renaming of kObjInCanvas to kMustCleanup
 - the introduction of FindObject instead of GetPrimitive

Revision 579 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 6 06:07:45 2000 UTC (14 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 109095 byte(s)
Diff to previous 542
A problem fixed by Philippe Canal in TTreePlayer::EntryLoop
When drawing 2D or 3D histograms, only the first of the variables
that happen to be 'variable length arrays' had their index properly
loaded from file.
So for example, if clone1.X and clone2.Y where both variable of two
separate TClonesArray clone1 and clone2:
        Draw("clone1.X:clone2.Y")
would only load the size of clone1.X (thus the 'perceived size
clone2.Y would be random).

Revision 542 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 31 07:13:57 2000 UTC (14 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 108915 byte(s)
Diff to previous 489
A fix by Philippe Canal in TTreePlayer::Process.
When CINT reloads a script defining some classes, it unwinds
everything since the script was first loaded.
This has the side-effect of destroying the temporary variables holding
the filename and option string.
A local copy of these variables is necessary before invoking the
main Process function.

Revision 489 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 17 09:47:00 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 108773 byte(s)
Diff to previous 448
Implement interface between trees and the principal components analysis class
TPrincipal.
The user interface is in TTree::Principal that calls the TTreePlayer::Principal
function. The specs of this interface are:
TPrincipal *TTree::Principal(const char *varexp, const char *selection, Option_t *option, Int_t nentries, Int_t firstentry)
{
//*-*-*-*-*-*-*-*-*Interface to the Principal Components Analysis class*-*-*
//*-*              ====================================================
//
//   Create an instance of TPrincipal
//   Fill it with the selected variables
//   if option "n" is specified, the TPrincipal object is filled with
//                 normalized variables.
//   If option "p" is specified, compute the principal components
//   If option "p" and "d" print results of analysis
//   If option "p" and "h" generate standard histograms
//   If option "p" and "c" generate code of conversion functions
//   return a pointer to the TPrincipal object. It is the user responsability
//   to delete this object.
//   The option default value is "np"
//
//   see TTree::Draw for explanation of the other parameters.
//
//   The created object is  named "principal" and a reference to it
//   is added to the list of specials Root objects.
//   you can retrieve a pointer to the created object via:
//      TPrincipal *principal =
//        (TPrincipal*)gROOT->GetListOfSpecials()->FindObject("principal");
//

Revision 448 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 11 20:39:28 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 104716 byte(s)
Diff to previous 386
Change the maximum length for a branch name from 64 to 128 characters

Revision 386 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 19 06:55:49 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 104715 byte(s)
Diff to previous 385
 Rename TTree::MakeAnal to TTree::MakeSelector.
Modify comments in the code and generated code accordingly.

Revision 385 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 18 16:35:01 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 104644 byte(s)
Diff to previous 384
Add new function TTree::MakeAnal
Modify signature of TTree::MakeClass, TVirtualTreePlayer::MakeClass
and TTreePlayer::MakeClass adding a second optional argument Option_t *option.
TTree::MakeAnal calls TTree::MakeClass with the 2nd arg = "anal"

TTree::MakeAnal generates the skeleton code to be used by TTree::Process.

Revision 384 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 18 07:11:33 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 99228 byte(s)
Diff to previous 382
Delete the interface functions TSelector::Executexxx. TTreePlayer::Process
calls directly the Begin, ProcessCut, etc functions.
TSelector has a new member (previously in TTree) fOption with the
GetOption and SetOption functions.

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/treeplayer/src/TTreePlayer.cxx
File length: 99267 byte(s)
Diff to previous 381
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 381 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 15 05:16:35 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 99488 byte(s)
Diff to previous 375
Add two new functions in TFormula:
 Double_t           GetParameter(const char *name);
         Int_t      GetParNumber(const char *name);

Revision 375 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 13 19:19:27 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 99570 byte(s)
Diff to previous 346
The previous class TSelector has been split into two classes:
  -TSelector used by the compiled code
  -TSelectorCint used by the interpreted code
TSelectorCint inherits from TSelector.

The names of the member functions in TSelector have been renamed to:

    Begin:       called everytime a loop on the tree starts.
                 a convenient place to create your histograms.
    ProcessCut:  called at the beginning of each entry to return a flag
                 true if the entry must be analyzed.
                 a convenient place to draw/fit your histograms.
    ProcessFill: called in the entry loop for all entries accepted
                 by Select.
    Terminate:   called at the end of a loop on a TTree.
                 a convenient place to draw/fit your histograms.

These names have been chosen to have functions in alphabetic and logical order
in the user's class.

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/treeplayer/src/TTreePlayer.cxx
File length: 99184 byte(s)
Diff to previous 337
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 337 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 6 17:20:52 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 96973 byte(s)
Diff to previous 333
Remove calls to the old TSelector class.

Revision 333 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 6 16:48:06 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 98494 byte(s)
Diff to previous 318
This class will be moved in directory tree

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/treeplayer/src/TTreePlayer.cxx
File length: 97509 byte(s)
Diff to previous 228
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 228 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 16 10:48:49 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 95441 byte(s)
Diff to previous 201
The functionality of TTree::Draw has been upgraded to handle a wider
variety of operations involving arrays; TClonesArrays are here considered
as a variable size arrays.

Let assumes, a leaf fMatrix, on the branch fEvent, which is a 3 by 3 array.
In a TTree::Draw expression you can now access fMatrix using the following
syntaxes:

  String passed    What is used for each entry of the tree

  "fMatrix"       the 9 elements of fMatrix
  "fMatrix[][]"   the 9 elements of fMatrix
  "fMatrix[2][2]" only the elements fMatrix[2][2]
  "fMatrix[1]"    the 3 elements fMatrix[1][0], fMatrix[1][1] and fMatrix[1][2]
  "fMatrix[1][]"  the 3 elements fMatrix[1][0], fMatrix[1][1] and fMatrix[1][2]
  "fMatrix[][0]"  the 3 elements fMatrix[0][0], fMatrix[1][0] and fMatrix[2][0]

  "fEvent.fMatrix...." same as "fMatrix..." (unless there is more than one leaf
named fMatrix!).

In summary, if a specific index is not specified for a dimension, TTree::Draw
will loop through all the indices along this dimension.  Leaving off the
last (right most) dimension of specifying then with the two characters '[]'
is equivalent.  For variable size arrays (and TClonesArray) the range
of the first dimension is recalculated for each entry of the tree.

TTree::Draw also now properly handling operations involving 2 or more arrays.

Let assume a second matrix fResults[5][2], here are a sample of some
of the possible combinations, the number of elements they produce and
the loop used:

 expression                       element(s)  Loop

 "fMatrix[2][1] - fResults[5][2]"   one     no loop
 "fMatrix[2][]  - fResults[5][2]"   three   on 2nd dim fMatrix
 "fMatrix[2][]  - fResults[5][]"    two     on both 2nd dimensions
 "fMatrix[][2]  - fResults[][1]"    three   on both 1st dimensions
 "fMatrix[][2]  - fResults[][]"     six     on both 1st and 2nd dimensions of
                                            fResults
 "fMatrix[][2]  - fResults[3][]"    two     on 1st dim of fMatrix and 2nd of
                                            fResults (at the same time)
 "fMatrix[][]   - fResults[][]"     six     on 1st dim then on  2nd dim


In summary, TTree::Draw loops through all un-specified dimensions.  To
figure out the range of each loop, we match each unspecified dimension
from left to right (ignoring ALL dimensions for which an index has been
specified), in the equivalent loop matched dimensions use the same index
and are restricted to the smallest range (of only the matched dimensions).
When involving variable arrays, the range can of course be different
for each entry of the tree.

So the loop equivalent to "fMatrix[][2] - fResults[3][]" is:

   for (Int_t i0; i < min(3,2); i++) {
      use the value of (fMatrix[i0][2] - fMatrix[3][i0])
   }

So the loop equivalent to "fMatrix[][2] - fResults[][]" is:

   for (Int_t i0; i < min(3,5); i++) {
      for (Int_t i1; i1 < 2; i1++) {
         use the value of (fMatrix[i0][2] - fMatrix[i0][i1])
      }
   }

So the loop equivalent to "fMatrix[][] - fResults[][]" is:

   for (Int_t i0; i < min(3,5); i++) {
      for (Int_t i1; i1 < min(3,2); i1++) {
         use the value of (fMatrix[i0][i1] - fMatrix[i0][i1])
      }
   }

Revision 201 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 09:07:35 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 92070 byte(s)
Diff to previous 120
Mods by Philippe Canal to support teh new features introduced
in TTreeFormula.

Revision 120 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 13 09:18:47 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 91871 byte(s)
Diff to previous 100
- Mods in TTreePlayer  to reflect the numerous changes in TGraph,
  TVirtualPad, TView, TLego. Most internal variables changed from
  Float_t to Double_t. In particular the members, fVmin, fVmax, fV1, fV2, fV3
  are now double precision arrays. The corresponding getter functions have
  their return type changed accordingly. This is a backward incompatibility.

Revision 100 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 9 16:27:04 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 91849 byte(s)
Diff to previous 50
Changes by Philippe to support the upgrade in TTreeFormula for array notation

Revision 50 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 29 14:51:32 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreePlayer.cxx
File length: 91852 byte(s)
Diff to previous 3
change GetName() to fTree->GetName() when TProof IsActive
Problem reported by Peter Malzacher.

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/treeplayer/src/TTreePlayer.cxx
File length: 91786 byte(s)
Copied from: branches/rdm/treeplayer/src/TTreePlayer.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/treeplayer/src/TTreePlayer.cxx
File length: 91786 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