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

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

Parent Directory Parent Directory


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

Revision 49084 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 4 21:37:46 2013 UTC (21 months, 2 weeks ago) by pcanal
File length: 228222 byte(s)
Diff to previous 49082
Import revision 49083 from the v5-34-00 patch branch:
Humm we meant GetLast()+1 not GetEntries ..

Revision 49082 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 4 18:30:12 2013 UTC (21 months, 2 weeks ago) by pcanal
File length: 228214 byte(s)
Diff to previous 49052
Import revision 49081 from the v5-34-00 patch branch:
Avoid accessing fLeaves out of bounds

Revision 49052 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:58:27 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49051
Import revision 49012 from the v5-34-00 patch branch:
Add missing protection

Revision 49051 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:58:05 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49050
Import revision 49011 from the v5-34-00 patch branch:
Propagate renaming to nested objects

Revision 49050 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:57:43 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49049
Import revision 49009 from the v5-34-00 patch branch:
Implement the implicit rule for matching pair (based on being able to convert their content

Revision 49049 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:57:22 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49048
Import revision 49008 from the v5-34-00 patch branch:
std::pair also have implicit rules, so always craete a SchemaRuleSet

Revision 49048 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:56:58 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49047
Import revision 49007 from the v5-34-00 patch branch:
Implement numerical conversion for map's key or value

Revision 49047 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:56:37 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49046
Import revision 49006 from the v5-34-00 patch branch:
Fix typo

Revision 49046 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:56:15 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49045
Import revision 49005 from the v5-34-00 patch branch:
When switching STL collection proxy we also need to update fSTLtype

Revision 49045 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:55:53 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49044
Import revision 49004 from the v5-34-00 patch branch:
Fix conversion to from any type of numerical collection to associative type of numerical collection

Revision 49044 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:55:32 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49043
Import revision 49003 from the v5-34-00 patch branch:
Allow the implicit conversion from any type of numerical STL collection to any other type of numerical STL collection (e.g. vector<int> to list<float>)

Revision 49043 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:55:11 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49042
Import revision 49002 from the v5-34-00 patch branch:
Fix conversion to from any type of numerical collection to any type of numerical collection

Revision 49042 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:54:49 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49041
Import revision 49001 from the v5-34-00 patch branch:
Implement convertion to any type of numeric STL in the collection streamer

Revision 49041 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:54:29 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49040
Import revision 49000 from the v5-34-00 patch branch:
Remove use of data member fOnFileClass as much as possible (improve thread safety).  Improve const-correctness

Revision 49040 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:53:59 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49039
Import revision 48999 from the v5-34-00 patch branch:
In SetBranchAddress, use the result of CheckBranchAddressType to decide whether to actually use the address or not.  This avoid mis-using the user's pointer (but also might make invalid/awkward code fails).  To prevent the check (and hence for the use a pointer no matter what), the user needs to cast the pointer to a void*.

Revision 49039 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:53:37 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49038
Import revision 48998 from the v5-34-00 patch branch:
Properly handle the evolution of an STL container containing a class with contains sub-object (don't claim the subobject also changed type)

Revision 49038 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:53:15 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49037
Import revision 48997 from the v5-34-00 patch branch:
Implementation the streamerInfo actions for kBits

Revision 49037 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:52:52 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49036
Import revision 48996 from the v5-34-00 patch branch:
In the MakeClass reading code when failing over to using the StreamerInfo, switch to using the action sequence

Revision 49036 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:52:30 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49035
Import revision 48995 from the v5-34-00 patch branch:
Compile the code for the conversion actions for generic collection

Revision 49035 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:52:09 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49034
Import revision 48994 from the v5-34-00 patch branch:
Better support for conversion of unversioned classes

Revision 49034 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:51:36 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49033
Import revision 48990 from the v5-34-00 patch branch:
Get the #if statement right. Remove debug comment

Revision 49033 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:51:15 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49032
Import revision 48989 from the v5-34-00 patch branch:
Add missing case.  Fix windows compilation

Revision 49032 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:50:54 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49031
Import revision 48986 from the v5-34-00 patch branch:
Extend the output of TTree::Print(debugInfo) to include the action sequence information (and add support for the sub option 'func' that also prints the function's (mangled) name

Revision 49031 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:50:32 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49030
Import revision 48984 from the v5-34-00 patch branch:
When printing a TActionSequence also print (on linux/macos) the symbol of the function that will be executed (when the option 'func') is passed.

Revision 49030 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:50:08 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49029
Import revision 48983 from the v5-34-00 patch branch:
In TTree::CheckBranchAddressType properly recognize and record that the user has requested a (valid) translation from one STL container to the other

Revision 49029 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:49:46 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49028
Import revision 48982 from the v5-34-00 patch branch:
Add support for implicit conversion of stl collection (when they require schema evolution)

Revision 49028 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:49:24 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49027
Import revision 48981 from the v5-34-00 patch branch:
In GetConversionStreamerInfo, make sure that we find always find at least one StreamerInfo for an stl collection

Revision 49027 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:49:02 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49025
Import revision 48980 from the v5-34-00 patch branch:
A TClassRef must be changed by operator= even if its ClassPtr has not yet been initialized!

Revision 49025 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:48:19 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49024
Import revision 48959 from the v5-34-00 patch branch:
Fix the spacing error introduce by last minutes code reformating ...

Revision 49024 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:47:57 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49023
Import revision 48954 from the v5-34-00 patch branch:
Be more specific in the error message when not knowing what the type passed to SetBranchAddress

Revision 49023 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:47:24 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49022
Import revision 48946 from the v5-34-00 patch branch:
Fix windows warning

Revision 49022 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:47:03 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49021
Import revision 48945 from the v5-34-00 patch branch:
Fix compilation on macos 10.8 (Workaround bug in clang 425.0.24)

Revision 49021 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:46:42 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49020
Import revision 48944 from the v5-34-00 patch branch:
In TTree::SetBranchAddress, properly reset the TargetClass when the address is changed (back) to the original type.

Issue an error message if the class type of the argument to TTree::SetBranchAddress can not be determined (missing dictionary but having only a typeid).

Revision 49020 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:46:19 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49019
Import revision 48943 from the v5-34-00 patch branch:
Improve performance of reading a branch with an std::list<int> by 25%
by migrating to using the StreamerInfoAction and by implementing
the access to iterator (creation, copy, increment, delete) via
template function (rather than reallying on the slow mechanism
using 'At' (and its use of the fEnv) ...)

Revision 49019 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:18:33 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49018
Import revision 48931 from the v5-34-00 patch branch:
Add the concept of implicit rules to (centrally) support automatic translation of
STL collection from numeric type to other numeric type or for when the contained
class has some rules.  Currently enabled only when the target is an std::vector.

Implement the transformation from STL container of numeric to any other numeric
type (both in TGenCollectionStreamer and TStreamerInfo[Actions]).

Migrate more of the conversions to TStreamerInfoActions.

Fix the Conversion of a Double32 or Float16 inside a collection of object to another
type (the previous implemetation was not supporting the customization of the factor
nor the number of bits).

Add TBuffer::ReadFastArrayWithNbits and WithFactor for use in the StreamerInfo Actions.

TStreamerInfoActions:

Introduce WithFactorMarker and NoFactorMarker to allow for less code duplicaton when
supporting Float16_t and Double32_t.
Replace the collection-memberwise action from loop over simple operation to using
ReadFastArray (to be compatible with TBufferXML).

Revision 49018 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:17:38 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49017
Import revision 48922 from the v5-34-00 patch branch:
Remove inadvertent match between 2 unrelated STL collection containing objects

Revision 49017 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:17:11 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49016
Import revision 48921 from the v5-34-00 patch branch:
Improve performace of reading a vector of non-class type by 25% (i.e. std::vector<int>).
The code to apply the same improvement to other container type is in place but is not
enabled yet as the 'better' solution avoid creating a temporary array to read in the
value via Read[Fast]Array, however the avoid the call to Read[Fast]Array breaks
the XML streaming (which uses Read[Fast]Array to insert the <Array> tag around the
element).  See for example VectorLooper::ReadCollectionBool ...

Revision 49016 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:16:42 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49015
Import revision 48915 from the v5-34-00 patch branch:
White spaces

Revision 49015 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:16:15 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 49014
Import revision 48911 from the v5-34-00 patch branch:
Add the Action function for trivial conversion.

Refactor the creation of the ConfiguredAction for collection (using 3 classes with function templates) that are used in the unique generator functions. This reduces code duplication.

Revision 49014 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:15:47 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 228160 byte(s)
Diff to previous 48992
Import revision 48910 from the v5-34-00 patch branch:
Add Note of missing implementation

Revision 48992 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 28 15:26:26 2013 UTC (21 months, 3 weeks ago) by rdm
File length: 228160 byte(s)
Diff to previous 48964
From Lifeng Sun:
The attached patchset fixes a bunch of typo in the source:
0001-succes-success.patch
0002-preceed-preced.patch
0003-informations-information.patch
0004-childs-children.patch
0005-avaliable-available.patch
0006-writeable-writable.patch
0007-comand-command.patch
0008-unkown-unknown.patch
0009-wierd-weird.patch
0010-wheter-whether.patch
0011-unecessary-unnecessary.patch
0012-splitted-split.patch
0013-registerd-registered.patch
0014-recieve-receive.patch
0015-processsing-processing.patch
0016-ouput-output.patch
0017-mutiple-multiple.patch
0018-lenght-length.patch
0019-interupted-interrupted.patch
0020-independant-independent.patch
0021-inconsistant-inconsistent.patch
0022-expresion-expression.patch
0023-explicitely-explicitly.patch
0024-enviroment-environment.patch
0025-deafult-default.patch
0026-continous-continuous.patch
0027-completly-completely.patch
0028-commited-committed.patch
0029-choosen-chosen.patch
0030-backgroud-background.patch
0031-auxilliary-auxiliary.patch
0032-authentification-authentication.patch
0033-appropiate-appropriate.patch
0034-an-other-another.patch
0035-environement-environment.patch
0036-targetting-targeting.patch
0037-suppported-supported.patch
0038-paramater-parameter.patch

Revision 48964 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 27 20:34:45 2013 UTC (21 months, 4 weeks ago) by pcanal
File length: 228166 byte(s)
Diff to previous 44311
Import revision 48963 from the v5-34-00 patch branch:
Record the consumption of a function arguments and closing paranthesis to avoid adding them a second time later on

Revision 44311 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 26 03:12:24 2012 UTC (2 years, 7 months ago) by pcanal
File length: 228074 byte(s)
Diff to previous 43993
Make sure that the axis managed by TTreeFormula aligns the bins on integer boundary for string histograms.  (This was broken by revision 42783)

Revision 43993 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 27 16:23:16 2012 UTC (2 years, 8 months ago) by pcanal
File length: 227887 byte(s)
Diff to previous 43518
Fix coverity issues
Dereference null return:
32943,32945,36325,36329: TFormLeafInfo::GetLocalValuePointer
33253: TTreeFormula::EvalObject
33763: CloneTree
33258: GetBasket
34034: In DropBuffers (in addition avoid reading the basket when the intend is to drop the content from memory!)
36307: TTree::BuildIndex
36328: DrawCopy
36332: GetStreamerInfoCache
33025: BuildStreamerInfo
42469: Clone
33436: MakeIterator
Dereference after null check.
42470: in ImportStreamerInfo
33138: in TEntryListArray::Enter
Unchecked return value:
32049, 32050: TBranchProxy::Read and Setup
Mixed enums:
32705,32706: TClass::fStreamerType (and also name the enum type).

Revision 43518 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 28 01:04:07 2012 UTC (2 years, 9 months ago) by pcanal
File length: 227874 byte(s)
Diff to previous 43515
Fix for coding convention RS1 and RS2

Revision 43515 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 27 21:15:53 2012 UTC (2 years, 9 months ago) by pcanal
File length: 227845 byte(s)
Diff to previous 43508
Fix coding convention R.RN7 (Avoid the raw C types 'long', 'unsigned long', 'long double', 'bool', 'long long' and 'unsigned long long'.)

Revision 43508 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 27 15:48:54 2012 UTC (2 years, 9 months ago) by pcanal
File length: 227843 byte(s)
Diff to previous 42783
Fix the use of string in TTree's alias and TTreeFormula by
fixing the detection that a TTreeFormula is a string or not.

Move to using kIsCharacter only as an accelerator to TTreeFormula::IsString
and always use this function to detect whether the formula is a string or not.
Fix (in TTreeFormula::Init) several cases of string detection and remove from
TFormula any settings (they were wrong anyway, they should have been ResetBit
rather than SetBit) of kIsCharacter.

Revision 42783 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 24 21:29:32 2012 UTC (2 years, 11 months ago) by pcanal
File length: 227268 byte(s)
Diff to previous 41326
Make sure that in the tertiary operator implementation we always load the branch that are needed (even in the case cond ? y : -y where cond is false).  This fixes https://savannah.cern.ch/bugs/?90826

Revision 41326 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 11 10:26:39 2011 UTC (3 years, 3 months ago) by pcanal
File length: 226813 byte(s)
Diff to previous 40993
Fix Coverity issues:

TFormLeafInfo.cxx: 32301,32302,32303,32304,32305,32416 make sure the return value are initialized even if the function accessed through TMethodCall is invalid or if GetStreamerElements 'fails'
TTreeFormuala.cxx: 32314,32315,32316,32395,32417,32418,32419  make sure the return value are initialized even if the function accessed through TMethodCall is invalid or if GetStreamerElements 'fails'

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

Revision 40479 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 5 16:10:58 2011 UTC (3 years, 5 months ago) by pcanal
File length: 226824 byte(s)
Diff to previous 40401
Remove older code that was made redundant by r40401

Revision 40401 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 29 20:41:21 2011 UTC (3 years, 5 months ago) by pcanal
File length: 226903 byte(s)
Diff to previous 38892
Properly enable support for TRef auto-dereferencing when the TRef is in a TClonesArray

Revision 38892 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Apr 17 20:07:50 2011 UTC (3 years, 9 months ago) by pcanal
File length: 226016 byte(s)
Diff to previous 38500
Hide the soon-to-be-removed TString::fData and update TObject::Dump and TTree::Draw to properly display the content of TString (in the case of TTree::Draw even if the caller uses explicitly fData)

Revision 38500 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 18 11:43:16 2011 UTC (3 years, 10 months ago) by pcanal
File length: 225469 byte(s)
Diff to previous 37984
Properly handle the fact that LoadTree call also return -2 as an error code

Revision 37984 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 4 20:38:32 2011 UTC (3 years, 11 months ago) by pcanal
File length: 225471 byte(s)
Diff to previous 36672
Use better class lookup already include in TStreamerElement

Revision 36672 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 15 17:27:36 2010 UTC (4 years, 2 months ago) by pcanal
File length: 225494 byte(s)
Diff to previous 36450
Fix a problem in TTree::Draw reported at http://root.cern.ch/phpBB3/viewtopic.php?t=11612
where if (and only if) exactly one entry of the tree was selected and the data being 
plotted (but not selected on) was in a collection, some of the data in the collection
might not be properly updated (because the data branch 'thought' it was still holding
the correct data for the request entry but some of it had been 'zero-ed' out by the
fact that the collection at been resize for each entries).

Revision 36450 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 28 22:10:28 2010 UTC (4 years, 2 months ago) by pcanal
File length: 225011 byte(s)
Diff to previous 36033
Fix TTree::Scan when specify a format (e.g. 9.2f) and using uneven arrays (i.e. there will be 'empty' cells)

Revision 36033 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 1 20:42:43 2010 UTC (4 years, 3 months ago) by pcanal
File length: 224697 byte(s)
Diff to previous 35982
Fix cov 10633 (deadcode)

Revision 35982 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 1 10:04:32 2010 UTC (4 years, 3 months ago) by pcanal
File length: 224719 byte(s)
Diff to previous 35815
Extend fix for cov 11588

Revision 35815 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 27 21:25:11 2010 UTC (4 years, 3 months ago) by pcanal
File length: 224638 byte(s)
Diff to previous 35805
Fix Coverity deadcode reports : 11439

Revision 35805 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 27 16:03:10 2010 UTC (4 years, 3 months ago) by pcanal
File length: 224800 byte(s)
Diff to previous 35755
fix valgrind reports (incorrect delete, incorrect size)

Revision 35755 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 27 00:30:10 2010 UTC (4 years, 3 months ago) by pcanal
File length: 224800 byte(s)
Diff to previous 35682
cov 13273, 11590

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: 224757 byte(s)
Diff to previous 35670
Fix Coverity reports about the use of strcpy, strcat and sprintf
#13133, #13318, #13421, #13422

Revision 35670 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 23 14:55:43 2010 UTC (4 years, 4 months ago) by pcanal
File length: 224613 byte(s)
Diff to previous 35527
Fix forward null cov 21184

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

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

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: 224648 byte(s)
Diff to previous 35470
Replace strncpy by strlcpy

Revision 35470 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 16:10:09 2010 UTC (4 years, 4 months ago) by pcanal
File length: 224648 byte(s)
Diff to previous 35450
Add missing header file and fix use on windows

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: 224625 byte(s)
Diff to previous 35344
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 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: 224301 byte(s)
Diff to previous 35215
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 35215 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 10 00:14:06 2010 UTC (4 years, 4 months ago) by pcanal
File length: 224063 byte(s)
Diff to previous 35189
Remove fixed length 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: 224058 byte(s)
Diff to previous 35079
Fix coverity reports

Revision 35079 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 30 17:00:45 2010 UTC (4 years, 4 months ago) by pcanal
File length: 224126 byte(s)
Diff to previous 35067
Call SetReadLeavesPtr in two forgot places (affecting Alice when reading a TTree that was just created)

Revision 35067 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 30 12:19:01 2010 UTC (4 years, 4 months ago) by pcanal
File length: 223895 byte(s)
Diff to previous 34590
Fix coverity reports

Revision 34590 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 25 17:04:47 2010 UTC (4 years, 6 months ago) by pcanal
File length: 223887 byte(s)
Diff to previous 33507
Avoid picking at content of internal array when its size is 0 ; this fixes http://root.cern.ch/phpBB3/viewtopic.php?t=10878

Revision 33507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 15 14:37:07 2010 UTC (4 years, 8 months ago) by pcanal
File length: 223600 byte(s)
Diff to previous 33333
Remove compensation for kJump's argument that is no longer necessary (due to r33503)

Revision 33333 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 1 22:21:55 2010 UTC (4 years, 8 months ago) by pcanal
File length: 223596 byte(s)
Diff to previous 33331
Redo r33330 without unwanted side effect (i.e. we do want to print an empty line for entry with zero length array in TTree::Scan

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

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

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

Revision 31936 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 18 08:10:34 2009 UTC (5 years, 1 month ago) by brun
File length: 223150 byte(s)
Diff to previous 31606
Modify TTreeFormula::IsInteger such that the generated histogram is forced
to have an integer binwidth when the leaf is of type integer or string

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: 223030 byte(s)
Diff to previous 31603
Add missing 'break' in case statement (coverity)

Revision 31603 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 7 18:59:15 2009 UTC (5 years, 1 month ago) by pcanal
File length: 223003 byte(s)
Diff to previous 31346
Add missing initialization (found by coverity)

Revision 31346 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 20 17:29:51 2009 UTC (5 years, 2 months ago) by pcanal
File length: 222967 byte(s)
Diff to previous 31239
Properly detect the case where a fix length array is coming from a friend tree
connected with an Index (and hence the presence of the 'entry' is not guaranteed).
This fixes Savannah #58953

Revision 31239 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 17 15:59:44 2009 UTC (5 years, 2 months ago) by pcanal
File length: 222964 byte(s)
Diff to previous 30878
Fix white space

Revision 30878 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 27 05:31:56 2009 UTC (5 years, 2 months ago) by pcanal
File length: 222942 byte(s)
Diff to previous 30877
Remove a memory leak in some cases of syntax error in the use of aliases.
Re-add error messages skipped by the change in revision 30877.

Revision 30877 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 26 20:52:58 2009 UTC (5 years, 2 months ago) by pcanal
File length: 222074 byte(s)
Diff to previous 30471
Properly handle TTree aliases containing array indices.
This fixes Savannah #57598.

Revision 30471 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 25 17:39:05 2009 UTC (5 years, 3 months ago) by pcanal
File length: 221092 byte(s)
Diff to previous 30176
Fix off by one loop in the reseting of the need to 'read' the branch. (This fixes savannah #56109). Prevent a null pointer dereferencing (in case of errorneous user input)

Revision 30176 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 15 15:42:11 2009 UTC (5 years, 4 months ago) by pcanal
File length: 221037 byte(s)
Diff to previous 30158
In TFormula and TTreeFormula when execting the ternary condition operator ( c ? i : e ),
only evaluate one of the two operands (remove kCondition and kStringCondition and add
kJump and kJumpIf).   Add support for nested use of ?: in particular when using string
operands.

Improve the check for the type of the operands, in particular reject all cases of 
trying to use a number and one string as operands expect for the special case
where the 'string' is actually are array of bytes.

Revision 30158 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 14 22:20:00 2009 UTC (5 years, 4 months ago) by pcanal
File length: 220212 byte(s)
Diff to previous 30157
Add support for ternary conditional operator when operands are strings

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: 219978 byte(s)
Diff to previous 29665
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 29665 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 31 23:24:53 2009 UTC (5 years, 5 months ago) by pcanal
File length: 219870 byte(s)
Diff to previous 29657
fix warning

Revision 29657 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 31 18:46:30 2009 UTC (5 years, 5 months ago) by pcanal
File length: 219862 byte(s)
Diff to previous 29656
insure proper loading of branches in Min/MaxIf

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: 219632 byte(s)
Diff to previous 29623
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 29623 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 30 05:33:51 2009 UTC (5 years, 5 months ago) by pcanal
File length: 213740 byte(s)
Diff to previous 28845
Significantly (by 2 order of magnitude) improved the performance of TTree::Draw calling C++ functions.

Revision 28845 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 8 13:53:44 2009 UTC (5 years, 7 months ago) by rdm
File length: 214098 byte(s)
Diff to previous 28379
changes needed to be able to compile with Solaris CC5 and stlport4 STL
library. Backward compatible with old CC5 STL and other platforms.

Revision 28379 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 28 19:22:32 2009 UTC (5 years, 8 months ago) by pcanal
File length: 214103 byte(s)
Diff to previous 27766
Add change missing from the change made in revision 25370 (changing the internal handling of TCutG

Revision 27766 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 12 20:12:01 2009 UTC (5 years, 10 months ago) by pcanal
File length: 214097 byte(s)
Diff to previous 27765
Avoid using negative indices

Revision 27765 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 12 19:02:43 2009 UTC (5 years, 10 months ago) by pcanal
File length: 213762 byte(s)
Diff to previous 26769
Insure that the GetEntries() is not called in the middle of the TTreeFormula evaluation

Revision 26769 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 9 17:17:31 2008 UTC (6 years, 1 month ago) by pcanal
File length: 212936 byte(s)
Diff to previous 26124
Remove spurrious error message (now that -1 is a valid TBranchElement type)

Revision 26124 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 10 15:41:15 2008 UTC (6 years, 2 months ago) by pcanal
File length: 212935 byte(s)
Diff to previous 26117
fix boundary condition when printing collection of strings

Revision 26117 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 10 08:46:48 2008 UTC (6 years, 2 months ago) by pcanal
File length: 213042 byte(s)
Diff to previous 25572
Add proper support for vector<bool> (which was confused for a string ...)
Add proper support for vector<string> (was not looking through the container for the string type)

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: 211151 byte(s)
Diff to previous 25402
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 25402 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 15 17:00:28 2008 UTC (6 years, 4 months ago) by pcanal
File length: 210584 byte(s)
Diff to previous 25370
Avoid assuming that everything in gDirectory is a TEntryList

Revision 25370 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 5 15:25:20 2008 UTC (6 years, 4 months ago) by pcanal
File length: 210569 byte(s)
Diff to previous 23856
Put the TCutG and TEntryList is their own list (fExternalCuts) in order to avoid having to query those object for their type during the destruction of the TTreeFormula (This was leading to using already deleted object in some cases)

Revision 23856 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 14 18:15:35 2008 UTC (6 years, 8 months ago) by pcanal
File length: 210739 byte(s)
Diff to previous 23554
properly pass NaN through function calls in TTree::Draw

Revision 23554 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 25 13:47:10 2008 UTC (6 years, 9 months ago) by pcanal
File length: 210749 byte(s)
Diff to previous 23306
Fix for -Wshadow

Revision 23306 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 17 23:38:07 2008 UTC (6 years, 9 months ago) by pcanal
File length: 210562 byte(s)
Diff to previous 23262
Fix CollectionTree->Scan("reco_ee_et[][2]:reco_ee_et[0][2]")
where reco_ee_et is a vector<vector<double>>
See http://root.cern.ch/phpBB2/viewtopic.php?t=6536

Revision 23262 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 16 17:03:13 2008 UTC (6 years, 9 months ago) by pcanal
File length: 210399 byte(s)
Diff to previous 23252
Insure that the formula that are used as indices or as argument to special functions have their branch(es) loaded once.  This fixes http://root.cern.ch/phpBB2/viewtopic.php?p=27080#27080

Revision 23252 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 16 10:49:44 2008 UTC (6 years, 9 months ago) by pcanal
File length: 209925 byte(s)
Diff to previous 22902
Correct the drawing of "X[1]:X[5]" when X is a vector< vector<float> >
and X[1].size()!=X[5].size().  (reported at http://root.cern.ch/phpBB2/viewtopic.php?p=27070)

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

Revision 21949 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 1 15:24:21 2008 UTC (6 years, 11 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 209703 byte(s)
Diff to previous 21863
avoid null pointer dereference in some cases of TChain use

Revision 21863 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 26 09:49:55 2008 UTC (6 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 209600 byte(s)
Diff to previous 21712
From Lukasz Janyst:
Changes to support the new feature to split vector<T*>

Revision 21712 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 15 10:34:26 2008 UTC (7 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 209348 byte(s)
Diff to previous 21509
From Gerri:
The trunk is currently broken on SLC3 because the recently introduced usage of 'tolower'
in treeplayer/src/TTreeFormula.cxx and 'isdigit' in io/srcTMakeProject.cxx require the
inclusion of 'ctype.h'.

Revision 21509 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 19 20:42:44 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 209329 byte(s)
Diff to previous 21385
Correctly case the integral value (int, short, unsigned, etc.) to the size requested by the user provided format (i.e if %llx is passed, cast to an unsigned long long)

Revision 21385 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 14 22:58:09 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 208062 byte(s)
Diff to previous 21188
Do bitwise operation in Long64_t instead of Int_t to prevent losing the most significant bit of large integers

Revision 21188 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 4 16:03:17 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 208038 byte(s)
Diff to previous 21157
better test for when we must avoid the switch to TLeafFormLeafInfo

Revision 21157 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 3 16:58:42 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 208040 byte(s)
Diff to previous 20919
Add support for auto use of AsDouble and AsString for top level objects

Revision 20919 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 20 11:41:20 2007 UTC (7 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 206617 byte(s)
Diff to previous 20882
Set offset to prevent a compiler warning

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/TTreeFormula.cxx
File length: 206611 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/TTreeFormula.cxx
File length: 206611 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/TTreeFormula.cxx
File length: 206669 byte(s)
Diff to previous 19112
remove :$ from tag line

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/TTreeFormula.cxx
File length: 206679 byte(s)
Diff to previous 18807
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 18807 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 16 21:21:21 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 206199 byte(s)
Diff to previous 18795
Prevent parsing error of cast operation in some simples cases

Revision 18795 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 15 19:59:51 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 206038 byte(s)
Diff to previous 18637
Properly handle the case where the return value of a member function is an STL collection

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/TTreeFormula.cxx
File length: 204720 byte(s)
Diff to previous 18566
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 18566 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 24 10:00:22 2007 UTC (7 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 199830 byte(s)
Diff to previous 18563
In TTreeFormula::IsLeafInteger we return kTRUE if the leaf type is "Char_t"

Revision 18563 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 23 17:54:31 2007 UTC (7 years, 9 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 199751 byte(s)
Diff to previous 18474
Improve the FindBranch and FindLeaf so that TTreeFormula finds an existing branch even in the presence of base classes (The consequence is that it was using the top level branch instead of the lower level branch.  See https://savannah.cern.ch/bugs/?25675

Revision 18474 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 4 12:43:31 2007 UTC (7 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 199258 byte(s)
Diff to previous 18451
Add an optional argument to TTreeFormula::IsInteger, ie
   virtual Bool_t      IsInteger(Bool_t fast=kTRUE) const;
TTreeFormula::Init calls this function with fast=kFALSE. In this case
the current IsInteger function is executed and the result stored in the kIsInteger bit
of the TTreeFormula. Later when the IsInteger function is called with kTRUE or
no arguments, the function returns immediatly the value of the kIsInteger bit.
This also solves another problem encountered when processing TChains.
It can happen that when TTreePlayer::DrawSelect calls TTreeFormula::IsInteger,
the TBranch objects of the processed Tree are no more available because the last Tree
in the chain has been deleted.

Revision 18451 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 30 21:37:47 2007 UTC (7 years, 9 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 199080 byte(s)
Diff to previous 17730
Extend support for type casting in TTreeFormula.  In particular support the case of casting the object returned value of a function:
T->Scan("((Track*)(fLastTrack@.GetObject())).GetPx()","","");

This requires fixing the parsing of nested parathesis.

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

Revision 17711 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 5 18:11:29 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 199074 byte(s)
Diff to previous 17667
-Implement necessary casts due to TVirtualStreamerinfo.

Revision 17667 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 3 18:33:15 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 198860 byte(s)
Diff to previous 17634
Use forward declaration of TClonesArray and fix consequences

Revision 17634 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 2 08:12:27 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 198834 byte(s)
Diff to previous 17591
Fix coding conventions

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/TTreeFormula.cxx
File length: 198817 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/TTreeFormula.cxx
File length: 198658 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/TTreeFormula.cxx
File length: 198649 byte(s)
Diff to previous 17338
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 17338 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 15 16:10:11 2007 UTC (8 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 197886 byte(s)
Diff to previous 16712
Remove TMath.h from TH1.h and add TMath.h to all files previously assuming TMath.h
via TH1.h
This should complete the changes related to TMath.

Revision 16712 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 8 19:23:12 2006 UTC (8 years, 2 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 197864 byte(s)
Diff to previous 16561
Add more explicit warning when attempting to use more than 3 level of variable size collection in TTree::Draw

Revision 16561 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 19 13:19:43 2006 UTC (8 years, 3 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 197220 byte(s)
Diff to previous 16532
Remove unused variable causing compiler warning.

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/TTreeFormula.cxx
File length: 197277 byte(s)
Diff to previous 16245
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 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/TTreeFormula.cxx
File length: 195735 byte(s)
Diff to previous 16216
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 16216 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 7 07:31:35 2006 UTC (8 years, 4 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 193919 byte(s)
Diff to previous 16196
This patch implement support for direct drawing of TTimeStamp.
The following
   tree->Draw("mybr.mytimestamp");
nows draw the same thing as
   tree->Draw("mybr.mytimestamp.AsDouble()");

Revision 16196 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 2 07:47:29 2006 UTC (8 years, 4 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 192558 byte(s)
Diff to previous 16176
This patch implement support for direct drawing of TString and std::string.
The following
   tree->Draw("mybr.mystring");
nows draw the same thing as
   tree->Draw("mybr.mystring.c_str()");
or
   tree->Draw("mybr.mytstring.Data()");
i.e. an histogram whose labels are the string value of 'mystring'

Revision 16176 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 31 11:05:20 2006 UTC (8 years, 4 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 191429 byte(s)
Diff to previous 15793
changed all Riostream.h in headers to Riosfwd.h. Riostream.h has "using namespace std"
and should only appear in implementation files.

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

     o Correct some uses of TBranchElement::GetAddress()
       to TBranchElement::GetObject().

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/TTreeFormula.cxx
File length: 190581 byte(s)
Diff to previous 15353
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 15353 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 6 16:42:17 2006 UTC (8 years, 7 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 185142 byte(s)
Diff to previous 14745
Correct a case where we need to load the TClonesArray but did not properly detect that it was stored in a top level branch

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

Revision 14078 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 22 06:59:15 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 185016 byte(s)
Diff to previous 14058
Correct the generation of and access to TFormLeafInfo::fCounter
in the case where the TFormLeafInfo in not the first in the chain
of TFormLeafInfo (needed to properly draw the content of TTree
with HepMC data).

Revision 14058 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 18 06:58:54 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 184554 byte(s)
Diff to previous 14035
In some circunstances, loading just the index of collection (eg TClonesArray),
was preventing the later loading of the full object (within the collection).

Revision 14035 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 9 22:44:31 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 184243 byte(s)
Diff to previous 14014
Use the correct indices to lookup the Sum sub-formulae

Revision 14014 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 9 00:00:17 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 184066 byte(s)
Diff to previous 13868
avoid out of bound lookup

Revision 13868 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 19 20:00:14 2006 UTC (9 years ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 184029 byte(s)
Diff to previous 13210
Prevent unitialized memory read
Fix a lookup problem when a TClonesArray is the top level object.

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/TTreeFormula.cxx
File length: 183892 byte(s)
Diff to previous 13077
Update the spacing and documentation to match the coding rule

Revision 13077 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 28 19:35:59 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 183862 byte(s)
Diff to previous 12967
Insure that TTree aliases are taken in considation not only when accessing
a data member but also when accessing a member function.

Revision 12967 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 16 20:34:18 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 182387 byte(s)
Diff to previous 12966
fix init order

Revision 12966 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 16 20:31:22 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 182387 byte(s)
Diff to previous 12963
fix init order

Revision 12963 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 16 04:10:37 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 182332 byte(s)
Diff to previous 12881
initialized all pointers data members in default constructor

Revision 12881 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Oct 1 12:45:40 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 182292 byte(s)
Diff to previous 12868
Fix a problem is a corner case of the parsing where all TClonesArray members were assumed to be pointers

Revision 12868 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 29 08:36:30 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 181936 byte(s)
Diff to previous 12549
Correctly detect a collection when it is embedded inside an embbeded object.

Revision 12549 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 29 12:05:56 2005 UTC (9 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 181699 byte(s)
Diff to previous 12453
Changes to make the rulechecker happy in directory treeplayer
 (still several changes required: to be discussed with Philippe)

Revision 12453 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 9 20:11:53 2005 UTC (9 years, 5 months ago) by pcanal
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 181687 byte(s)
Diff to previous 11818
Add a new member function TTreeFormula::ResetLoading.

This can be used instead of calling TTreeFormula::EvalInstance(0) to
insure the proper loading of the branches.

In particular this solves issues when the formula is invalid (invalid
indices for example) for the first instance.

Revision 11818 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 18 21:04:54 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 180782 byte(s)
Diff to previous 11658
From Philippe:
TBrancBrowsable:

This patch corrects the string passed by the TBrowser to
TTree::Draw with drawing the size of a ROOT collection.

TTreeFormula/TFormLeafInfo:

This patch corrects the handling of a nested TClonesArray
within a split TClonesArray.

Revision 11658 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 23 06:13:09 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 180320 byte(s)
Diff to previous 11656
From Philippe:
This patch solves a problem with friends of friends when the friends where
chains and contained some branches with the same name.

This issues is now test in roottest/root/tree/friend in test
the FriendOfFriend.  (Which includes Marek's test).

Revision 11656 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 22 19:04:43 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 180180 byte(s)
Diff to previous 11629
From Philippe:
This updates solves issues when trying to browse (via the TBrowser) branches
which had their top level branchname embedded in their own name (i.e. when
the top level branch has been created with a trailing dot in their name).

Also fix a few problem preventing the drawing of branches containing pointer
to STL collection or some case of STL collection containing pointer to
objects.

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/TTreeFormula.cxx
File length: 180006 byte(s)
Diff to previous 11588
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 11588 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 14 13:40:11 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 178756 byte(s)
Diff to previous 11457
From Philippe:
This patch adds a missing 'continue' statement that was essentually
rendering Length4(xyz) useless when used inside an expression
(eg Length$(xyz)<20)

Revision 11457 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 30 21:09:19 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 178746 byte(s)
Diff to previous 11435
From Philippe:
TBranch::fOffset stores permanently the offset of the data member in the
object.
When the branch is reloaded without the library, this offset might be
incorrect.
We introduce SetupAddresses (called by GetEntry and TTreeFormula) which
insures
the offset are correctly set.

In case of a fixed size char array nested inside a collection, the indexing
was inconsistent (It is drawn as a string but one of the inner mechanism was
still using the fixed size to calculate the index)

In case of string (like char* or char array) was within a collection,
the TFormLeafInfo 'chain' was incorrectly set (it was not using the
fact the branch has the address of the collection instead of the
addresses of the container of the collection).

Revision 11435 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 28 21:06:38 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 178412 byte(s)
Diff to previous 11426
From Philippe:
The following insure that TTreeFormula properly generate the
accessing code (TFormLeafInfos) in the case of character string
embedded in a an object with an STL collection.

Revision 11426 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 24 18:37:53 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 177796 byte(s)
Diff to previous 11410
From Philippe:
This update fixes a case where when drawing a collection within
a TClonesArray, the size of the TClonesArray was not properly read.
It also fixes a case where TTreeFormula was trying to drill trhough
a collection when it already has seen 2 variable dimensions.

Revision 11410 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 22 19:53:59 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 177684 byte(s)
Diff to previous 11400
From Philippe:
The attached patch protect TTreeFormula against missing leaves.
In case of missing leaf, it evaluate the whole formula at zero value.
This is not ideal, but adding the ability to skip entries with missing
leaves would require significant change in TSelectorDraw (which itself
is likely to be rewritten).

Revision 11400 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 21 22:17:12 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 177567 byte(s)
Diff to previous 11309
From Philippe,

Minor fix to avoid a warning from valgrind

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

Also (and independently):

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

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

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

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

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

Revision 11254 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 7 17:00:17 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 171796 byte(s)
Diff to previous 11238
From Philippe
This patch adds a missing protection in TTreeFormula::LoadBranch (called
when a formula includes a boolean expression and an index which contains
reference to a branch, for
example  tt->Draw("iCell","iCell>900&&iClus[iCellClus-1]==10").

This fixes the bug report #2766 and is tested by indexLoad in
roottest/root/treeformula/array

Revision 11238 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 4 19:37:52 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 171764 byte(s)
Diff to previous 11190
From Philippe:
TFormula and TTreFormula's calculation of the modulo requires to cast double
precision values into integral value before executing the modulo.  The
previous implementation was casting the value down to a Int_t this leads to
the value being incorrect if the original data was an unsigned int greater
than 2^31.  We now cast to a Long64_t.  Short of having to test for the sign
of both opererands and handling all 4 cases separately, we have to cast to a
sign intergral.
Hence, in order to not penalize in run-time the most used case, we accept
the fact that the modulo operation will still give an incorrect value if the
originial data is an unsigned
64 bits value and is greater than 2^63.

Revision 11190 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 25 21:49:04 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 171620 byte(s)
Diff to previous 11188
From Philippe:
This patch removes warnings about unused variables.

Revision 11188 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 25 19:13:24 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 171763 byte(s)
Diff to previous 11141
From Philippe:
This correct the support for nested collections.  Previously, those nested
collection were silently wrongly handled.
We now properly draw collections nested inside one collection (i.e. 2 levels
of variable size).  We explicitly do not support collection nested inside a
collection nested inside a collection (i.e. we can not support 3 levels of
variable size).  For those case, the user needs to use the script drawing
mechanism (or MakeProxy directly).

The nesting can be direct (vector<vector<classX> > or vector<vector<int> >)
or indirect vector<classX> which classX containing a vector<classY> or
vector<int>.

Revision 11141 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 18 09:15:08 2005 UTC (9 years, 11 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 167318 byte(s)
Diff to previous 11074
From Philippe:
This patch extends the notion of TTree variable aliases to allow
them to be used as part of single data name.

For example, you can now do:
    tree->SetAlias("theGoodTrack","event.fTracks[3]");
    tree->Draw("theGoodTrack.fPx"); // same as "event.fTracks[3].fPx"

This patch includes a little clean-up in TTreeFormula::DefinedVariable
to better separate the different phases of the parsing (dimension requests,
leaf finding and exploration into the user class).

This patch also includes an update to DrawTest to test for the new alias
feature and in case of failure to print the corresponding Draw command.

Revision 11074 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 9 10:19:54 2005 UTC (9 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 162839 byte(s)
Diff to previous 11046
Add a protection in TTreeFormula::ResetDimensions.
Found a case (Vivek Jain file) where gcut was null.

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

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

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

Revision 10950 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 19 07:52:45 2005 UTC (10 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 161745 byte(s)
Diff to previous 10917
From Philippe:
The following patch
	insure a bool (UChar_t) is considered as an integer by TTreeFormula
	add a test for Bool.
        Remove a warning on linux for TFormLeafInfo

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/TTreeFormula.cxx
File length: 161624 byte(s)
Diff to previous 10902
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 10902 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 12 18:02:28 2005 UTC (10 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 161624 byte(s)
Diff to previous 10898
From Philippe:
TDirectory:
   update TDirectory::GetObject to be able to retrieve TObject from
   the in-memory list (to match the behavior of TObject::Get).

stress:
   update to use TDirectory new object retrieval interface.  This will
   allow testing of their availability in interpreted code.

TChainElement:
   Insure the proper default initialization of new data members

TTree:
   slight warning message fix

TTreeFormula:
   Update to a problem in case of splitted top level STL container
   Fix for TTree::Scan of strings when they are inside a collection
     (the first element __was__ repeated instead of the sub-sequent elements).

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

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

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

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

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

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

Revision 10549 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 17 17:56:53 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 160578 byte(s)
Diff to previous 10545
From Philippe,

This patch implements the schema evolution to and from selected containers.
The following cases are currently implemented:

  TClonesArray object -> STL object containing the same type
  TClonesArray pointer -> STL pointer containing the same type
  STL object -> STL object containing the same type
  STL pointer -> STL pointer containing the same type

  STL split branches -> TClonesArray

In addition this patch implement the ability to have schema evolution
between various version of a foreign class when the library is not present.

This patch also support in in TTree::Draw for the schema evolution of simple
type stored in a non-split branch.

Revision 10545 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 17 08:46:43 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 160167 byte(s)
Diff to previous 10541
Undo changes from Philippe.
The new version was not able to read previous ROOT files, eg files
containing TGeo objects.

Revision 10541 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 17 06:02:52 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 160390 byte(s)
Diff to previous 10249
From Philippe:
This patch implements the schema evolution to and from selected containers.
The following cases are currently implemented:

  TClonesArray object -> STL object containing the same type
  TClonesArray pointer -> STL pointer containing the same type
  STL object -> STL object containing the same type
  STL pointer -> STL pointer containing the same type

  STL split branches -> TClonesArray

In addition this patch implement the ability to have schema evolution
between various version of a foreign class when the library is not present.

This patch also support in in TTree::Draw for the schema evolution of simple
type stored in a non-split branch.

Revision 10249 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 7 17:10:07 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 160167 byte(s)
Diff to previous 10211
From Philippe:
This patch insures that the container TClass is properly found when trying
to looking into a split collection containing non-split sub-objects.

Revision 10211 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 5 13:21:10 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 159681 byte(s)
Diff to previous 9729
From Philippe:
This patch insures that the branches refered to in indices and aliases are
properly loaded even when a boolean expression skipped their loading during
the first pass of TTreeFormula::EvalInstance.

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/TTreeFormula.cxx
File length: 157278 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/TTreeFormula.cxx
File length: 155326 byte(s)
Diff to previous 9615
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 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/TTreeFormula.cxx
File length: 154795 byte(s)
Diff to previous 9551

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

Revision 9238 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 17 17:37:10 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 154680 byte(s)
Diff to previous 8987
From Philippe:
In preparation for the new TTreeProxy class, this updates separates the code for the TFormLeafInfo from
TTreeFormula.cxx into TFormLeafInfo.h and TFormLeafInfo.cxx

Revision 8987 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 19 19:41:38 2004 UTC (10 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 216482 byte(s)
Diff to previous 8913
From Philippe:
This patch corrects the parsing of nested operator[] in TTreeFormula, eg:
   h1->Draw("Vnt_fmcvtx_r[Vnt_vtx_i[0]-1][]","Vnt_fmckin_id<50");
In this case the nested [] were (incorrectly) used twice :(

Also we now properly handle the case where 2 (or more) variable
size arrays are being used and the index for one of them is given
by an expression which is also a variable size array.  There was
an error when the size of 'index' expression was reaching the value 1.

I.e If fNpoint is a variable size array whose size happens to be 1 for
the entry 0, the expression:
   T->Draw("fPx[abs(fNpoint[]-65)]+fMeasures","","",1,0)
now works properly (it was previouls drawing sizeof(fMeasures) values
instead  of just one value).

Also issue an error in TSelectorDraw::Begin and stop the processing if
the name of the histogram requested already exist and point to something
that is NOT an histogram (the worst case scenario is when you use the
same name as the TTree ! )

Revision 8913 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 13 09:57:23 2004 UTC (10 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 215849 byte(s)
Diff to previous 8912
Previous fix was not complete for Windows

Revision 8912 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 13 09:54:59 2004 UTC (10 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 215810 byte(s)
Diff to previous 8908
VC++ does not accept a cast from an unsigned long long to a double.
It accepts only a cast from a long long to a double

Revision 8908 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 12 22:43:06 2004 UTC (10 years, 8 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 215812 byte(s)
Diff to previous 8502
From Philippe and Maarten:
This patch includes the implementation by Maarten of the support for
Long64_t in non-split objects in TTreeFormula.
It also include a correction in the error case detection of TFormula's
strstr (was leading to a core dump (instead of a parsing error) if the
first argument was not a char*).

Revision 8502 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 26 12:50:43 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 214165 byte(s)
Diff to previous 8315
Modify TTreeFormula destructor such that the possible TCutG objects
in fMethods are not deleted.

Revision 8315 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 27 20:18:35 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 213885 byte(s)
Diff to previous 8222
From Philippe:
This patch repair cases where TTreeFormula was looking up the current
TStreamerInfo instead of looking the actual streamerInfo used by
the branch.

Revision 8222 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 18 07:28:02 2004 UTC (10 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 213914 byte(s)
Diff to previous 8187
From Philippe:
This patch implements TTree::Draw for vector.  The current convention is the same
as for TClonesArray, namely after dereferencing a collection, the right hand of
the expression is request for the content and not for the container.

TBranchElement.cxx
        Make sure that a non-split branch containing an stl container contain
one leaf.

TVirtualCollectionProxy, TEmulatedVectorProxy, TVectorProxy
        Add the ability to retrieve the data type when it is a numerical type

TVectorProxy
        Fix some problem in the addressing caching mechanism

TClass.h
        Correct the ROOT::GetClass templates to properly return the TClass
object in case when the parameter is a pointer to pointer (or more).

TClassEdit.cxx:
        Avoid thinking that vector<xxx>::iterator is an stl container!

TTreeFormula.cxx
        Add support for stl container (actually ANY container which a
know TVirtualCollectionProxy).  Added TFormLeafInfoCollection and
TFormLeafInfoNumerical (non struct, non class container content).

Revision 8187 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 11 22:06:44 2004 UTC (10 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 189715 byte(s)
Diff to previous 8180
From Philippe:
This patches properly handles error cases where the streamer info is missing in the file.  Instead of fixing the
symptoms (as in previous
patch), this patch prevent the formula parsing of incorrect cases.
In particular it introduces the following error messages:

root [3] Error in <TTreeFormula::DefinedVariable>: Missing StreamerInfo for evt.CosmicOOTLow.  We will be unable to
read!

*ERROR 31 :
 The Variable :  "evt.CosmicOOTLow" exists but is not accessible

Error in <TTreeFormula::DefinedVariable>: Address not set when the type of the branch is negatif for for evt.  We will
be unable to read!

*ERROR 31 :
 The Variable :  "evt.fBits" exists but is not accessible

Revision 8180 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 11 08:20:07 2004 UTC (10 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 187336 byte(s)
Diff to previous 8110
Several protections added to protect the code when processing a Tree
writing with old versions of ROOT when the StreamerInfo record was not written
to the file.

Revision 8110 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 3 16:45:29 2004 UTC (10 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 187005 byte(s)
Diff to previous 8098
From Philippe:
This patch adds a protection for rare cases of internal mis-naming of classes

Revision 8098 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 31 08:59:09 2004 UTC (10 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 186846 byte(s)
Diff to previous 7900
Reintroduce Philippe's patch, now corrected for several machines.
stress, bench and DrawTest.sh runs correctly.
Still problem in running DrawTest.sh on SGI (cc,gcc,kcc). Likely due
to an alignement problem with the handling of the new type Double32_t

Revision 7900 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 13 18:46:39 2004 UTC (11 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 186804 byte(s)
Diff to previous 7880
From Philippe:
//*-*   In version 7 of TFomrula, the usage of fOper has been changed
//*-*   to improve the performance of TFormula::EvalPar.
//*-*   Conceptually, fOper was changed from a simple array of Int_t
//*-*   to an array of composite values.
//*-*   For example a 'ylandau(5)' operation used to be encoded as 4105;
//*-*   it is now encoded as (klandau >> kTFOperShit) + 5
//*-*   Any class inheriting from TFormula and using directly fOper (which
//*-*   is now a private data member), needs to be updated to take this
//*-*   in consideration.  The member functions recommended to set and
//*-*   access fOper are:  SetAction, GetAction, GetActionParam
//*-*   For more performant access to the information, see the implementation
//*-*   TFormula::EvalPar

Also note that version 6 of TFormula is not supported.

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/TTreeFormula.cxx
File length: 186781 byte(s)
Diff to previous 7832
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 7832 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 3 14:26:48 2004 UTC (11 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 182427 byte(s)
Diff to previous 7814
In case of data members with new data types, one must access the array
of newtypes (via the new function TStreamerInfo::GetNewTypes or
TSreamerElement::GetNewType instead of the GetType functions.

Revision 7814 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 30 16:32:15 2003 UTC (11 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 182388 byte(s)
Diff to previous 7808
From Philippe:
Fix a compilation error on alpha/cxx

Revision 7808 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Dec 27 16:14:31 2003 UTC (11 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 182367 byte(s)
Diff to previous 7780
More changes required by the introduction of the new data type Double32_t

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/TTreeFormula.cxx
File length: 181616 byte(s)
Diff to previous 7773
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 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/TTreeFormula.cxx
File length: 176685 byte(s)
Diff to previous 7749
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 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/TTreeFormula.cxx
File length: 176247 byte(s)
Diff to previous 7736
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 7736 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 11 23:30:35 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 174285 byte(s)
Diff to previous 7453
From Philippe:

The evaluation of operator && (and ||) is now optimized so that if the left hand of the expression is false (true) then
the right part is not evaluated.

Also this patch continues the replacement of some hard coded constants with enums value.

Revision 7453 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 20 18:19:58 2003 UTC (11 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 173152 byte(s)
Diff to previous 7222
From Philippe:

TFormula::Analyze now check whether an expression is numerical __before__ checking whether it is a defined variable.
Without this patch doing something as simple as:
        mytree->Draw(".5");
        mytree->Draw("goodvar*.5");
could fails depending on the structure of the tree.  In particular, if a new 'weird'
branch is added to a tree, those statement might now lead to core dumps event if
the new branch is not being used.  (The core dumps should not be happening in the
first place ... but this is more stable :) ).

In TTreeFormula, we now properly skip the case of a TClonesArray inside a split TClonesArray when looking for data
members and methods (when the branch name is not fully explicit).

Revision 7222 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 5 15:50:50 2003 UTC (11 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 172194 byte(s)
Diff to previous 7154
From Philippe:

This patch prevents the splitting of array of objects.
It also corrects the behavior of TTreeFormula in case of array of objects nested inside a TClonesArray.

Revision 7154 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 25 22:37:39 2003 UTC (11 years, 5 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 171320 byte(s)
Diff to previous 7109
From Philippe:
Update TStreamerInfo::New to properly initialize pointers and array of objects.

Update BuildIndex to elegantly fail if the given index do not produces exactly
one value per entry.

Update TTreeFormula to properly handle the case of a TClonesArray inside a
TClonesArray when the former is a top branch and not split.

Revision 7109 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 19 16:32:35 2003 UTC (11 years, 5 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 171123 byte(s)
Diff to previous 6844
This patch insures that the TTreeFormula dimension lookup properly recognizes
strings even if they are not the first leaf used in the expression (+ add a
test for this case). By Philippe.

Revision 6844 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 7 19:34:04 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 170955 byte(s)
Diff to previous 6834
From Philippe:
This patch implements support in TTreeFormula for arrays inside array of objects.

Revision 6834 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 5 20:44:36 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 167451 byte(s)
Diff to previous 6805
Remove an unreachable statement

Revision 6805 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 30 15:45:52 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 167472 byte(s)
Diff to previous 6775
From Philippe:
The following patch implements TTree variable alias.

To use them:
        mytree->SetAlias("mult","fPx*fPy");
        mytree->Draw("mult");

Note that the aliases have been added to the TTree object so that they can be persistent (with the tree) if you choose.

Also note that the alias are not checked for validity until they are used in a Draw or Scan command.

Existing alias are silently replaced.

The new functions are:
        TTree::SetAlias
        TTree::GetAlias
        TChain::GetAlias
        TTree::GetListOfAliases

This patch also adds operator= for TFormula, TF1, TF2, TF3 (it calls the respective Copy member functions).  It makes TTreeFormula::operator= private (Copy has not been implemented yet).

Also some of the TFormula and TTreeFormula codes (those stored in fOper) has been aliased to enums (this renders the code is little bit more readable and searchable).

TFormula and TTreeFormula have been updated to handle strings in a more flexible (and for TTreeFormula to be able to return them).

Revision 6775 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 25 07:16:22 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 161608 byte(s)
Diff to previous 6751
Fix by Victor:

TStreamerInfo::GetElems() returns array of pointers to TStreamerElements
TBranchElement::GetID() returns index in this array.
It is OK.

But in files TTreeFormula.cxx and TBranchElement.cxx this index is used for the list
provided by TStreamerInfo::GetElements()

Generally these lists are different, but often the same.
In our case these lists are different because of TClass::IgnoreTObjectStreamer() method used

In GetElements() TObject element exists but
in GetElems()      NOT.

Revision 6751 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 21 13:27:19 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 161671 byte(s)
Diff to previous 6750
Forgot one correction in previous fix (thanks Stanislav Nesterov)

Revision 6750 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 21 10:47:03 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 161670 byte(s)
Diff to previous 6712
In the Eval functions change maximum exponent value for the exp function
from 70 to 700.

Revision 6712 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 13 06:19:09 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 161668 byte(s)
Diff to previous 6699
From Philippe:
This implements the ability for TFormula, TFx and TTreeFormula to call global function and static member functions that
take numericals arguments and returns numerical arguments.

For example:
        T->Draw("TMath::BreitWigner(fPx)");
or
        T->Draw("MyInterpretedFunction(fPx)");
or
        TF1 *f = new TF1("f1","TMath::BreitWigner(fPx.[0],[1])");
      myhist->Fit(f);

Revision 6699 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 10 19:07:04 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 160636 byte(s)
Diff to previous 6551
From Philippe:
This patch prevents a core dump if the user double click in the TBrowser on a non-split leaf. It also reduces to 1 the
number of message warning that TSelectorDraw does not know how to histogram this type of objects (it only know how to
histogram TBits and numerical types).

Revision 6551 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 6 05:27:41 2003 UTC (11 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 160536 byte(s)
Diff to previous 6469
Patch from Philippe fixing a problem reported by Walter Mueller.
The problem was related to the fact that pct.amp was a static array of size 4 inside
a TClonesArray and pct.xo is just a data member inside the same TClonesArray.
Hence pct.amp[0][] is a array of size either 4 or 0 (if no element in the clones) and
pct.xo is a variable size array of the size of the current clonesArray.  When the
clonesArray was of size exactly one, the system was confused and
thought that pct.xo was of the same size as pct.amt[0][].

'tree->Draw("pct.amp[0]:pct.xo");' and 'tree->Draw("pct.amp[0]:pct.t.xo");' presented
the same error but due to different path in the code were failing in different ways.

Revision 6469 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 18 19:27:51 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 160558 byte(s)
Diff to previous 6263
From Philippe:
This patch repair TClass to recognize a Foreign Emulated class, it also update TTree::Draw
to properly draw Foreign objects stored via a pointer in a parent class.

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

Revision 6208 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 27 21:10:53 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 158683 byte(s)
Diff to previous 6087
Remove the unused and non-initialized member fInstance.
Increment class version number.

Revision 6087 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 11 12:17:20 2003 UTC (11 years, 11 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 158641 byte(s)
Diff to previous 6071
remove unused variable and argument warnings spotted by MacOS X.

Revision 6071 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 7 23:46:43 2003 UTC (11 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 158636 byte(s)
Diff to previous 6011
From Philippe:
This patch instructs TTreeFormula to ignore branch that are disabled (when searching for a method).

Revision 6011 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 30 06:40:33 2003 UTC (11 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 158242 byte(s)
Diff to previous 5977
From Philippe:
This patch adds systematic test for the ability of TTree::Draw to draw TBits objects.
It also fixes all the bug discovered during the tests.
It also adds a test for split level 2.

Revision 5977 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 24 07:04:29 2003 UTC (12 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 157448 byte(s)
Diff to previous 5935
From Philippe
Inclosed is a patch that allow the TTree::Drawing a TBits object.  I.e
        mytree->Draw("myevent.myTbits");
will create a 1D histogram from 0 to nbits which is filled for
each bitnumber which is non-null.

This features is enable if and only if the 'to be drawn' formula contains
only one variable and no operations but can contains method calls:

mytree->Draw("event.fH");
mytree->Draw("event.GetHistogram()");
mytree->Draw("event.fH.GetXaxis()");
mytree->Draw("event.GetHistogram().GetXaxis()");
mytree->Draw("event.fH.GetXaxis().IsA()");
mytree->Draw("check("event.GetHeader()");
mytree->Draw("event.GetTrackCopy()");
mytree->Draw("event.GetTrackCopy(2)");
mytree->Draw("event.GetTrackCopy().fTrigBits");

The system will be extended to allow the 'drawing' of classes other than TBits.

This version is working but is not aggresively optimized (no code
duplication) but has a negligeable impact on the existing cases (one extra
'if (bool)' for each TSelectorDraw::ProcessFill.

TTreeFormula has a new eval function EvalObject which returns a pointer to
the (eventual) object pointed to by the formula.  EvalClass return the TClass
corresponding to this object.

Revision 5935 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 17 17:48:09 2003 UTC (12 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 151696 byte(s)
Diff to previous 5719
From Philippe:
The following patch repairs the fact that the new TSelectorDraw
does not properly recover from error in the parsing of the formulas.

It also fixes a problem in the parsing of erroneous input when part
of the name matches a split TClonesArray branch name.

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

Revision 5717 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 2 18:50:12 2002 UTC (12 years, 1 month ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 151046 byte(s)
Diff to previous 5710
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 5710 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Dec 1 08:33:08 2002 UTC (12 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 151100 byte(s)
Diff to previous 5703
From Philippe:
This  patch solves problems related to checking (during the
parsing/discovery phase) the content of leaves which are inside a
TClonesArray and contains a TClonesArray.

Revision 5703 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 29 14:45:45 2002 UTC (12 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 149839 byte(s)
Diff to previous 5635
Add a protection in TTreeFormula::GetLeafWithDatamember.
The pointer clones can be null.

Revision 5635 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 21 20:38:39 2002 UTC (12 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 149801 byte(s)
Diff to previous 5379
From Philippe:
This patch removes a memory leak in TTreeFormula's usage of
TMethodCall.

Revision 5379 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 2 21:04:05 2002 UTC (12 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 149642 byte(s)
Diff to previous 5272
Protection added in TTreeFormula::UpdateFormulaLeaves

Revision 5272 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 12 16:30:32 2002 UTC (12 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 149605 byte(s)
Diff to previous 5059
This patch from Philippe  corrects TTreeFormula::TTreeFormula(void) and TTreeFormula::~TTreeFormula
to prevent the usage of a null pointer.

Revision 5059 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 5 17:20:11 2002 UTC (12 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 149601 byte(s)
Diff to previous 5047
Fix a compiler warning on HP-UX

Revision 5047 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 2 21:09:44 2002 UTC (12 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 149645 byte(s)
Diff to previous 5037
From Philippe,
This patches works around the impossibility to change the return
type of a virtual function with Msvc.

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/TTreeFormula.cxx
File length: 149777 byte(s)
Diff to previous 4997
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 4997 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 19 22:52:49 2002 UTC (12 years, 6 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 139809 byte(s)
Diff to previous 4827
TBranchElement: when in MakeClass mode correctly read empty variable
length array stored inside a TClonesArray.

TTreeFormula: properly deal with empty variable length arrays stored
inside a TClonesArray when in split mode (it still does not work when
NOT split).

-- Philippe

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

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

Revision 4724 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 16 10:06:35 2002 UTC (12 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 139475 byte(s)
Diff to previous 4429
Add support for min(a,b) and max(a,b) functions

Revision 4429 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 1 17:09:41 2002 UTC (12 years, 8 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 139309 byte(s)
Diff to previous 4397
this patch prevents creation of meaningless histograms in case of a typo in a
variable name. By Philippe.

Revision 4397 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 24 16:50:12 2002 UTC (12 years, 9 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 139083 byte(s)
Diff to previous 4395
This patch corrects an unitialized value when using array with multiple
varialbe dimensions. This missing initialization was causing core dumps.
By Phillippe.

Revision 4395 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 22 19:02:33 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 139056 byte(s)
Diff to previous 4312
From Philippe,
This patches updates TTree::Draw and the TBrowser to be able to handle
hiearchy of branches.

Revision 4312 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 4 17:28:52 2002 UTC (12 years, 9 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 138732 byte(s)
Diff to previous 4242
correct some Error() and Warning() messages.

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/TTreeFormula.cxx
File length: 139028 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/TTreeFormula.cxx
File length: 136692 byte(s)
Diff to previous 4171
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 4171 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 13 07:16:58 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 136182 byte(s)
Diff to previous 4163
Patch from Philippe,
Protect against request for elements that are out of bounds of
fixed length arrays.

For example:
root [1] T->Draw("fMatrix[2][5]")
Error in <TTreeFormula>: Index 5 for dimension #2 in fMatrix[2][5] is too high (max is 3)

Revision 4163 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 12 07:20:03 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 135542 byte(s)
Diff to previous 4155
This patch from Philippe corrects a parsing error and protect the
unsupported cases of an array of objects (or array of pointers to objects).

Revision 4155 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 8 08:09:11 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 134841 byte(s)
Diff to previous 4145
iPatch from Philippe that (re)enables saving and reading C-style arrays of object.
The 4 cases added are
        array of pointers to object inheriting from TObject
        array objects inheriting from TObject
        array of pointers to object not inheriting from TObject but with ClassDef
        array objects not inheriting from TObject but with ClassDef

Note that the 1st 2 cases are also implemented for inside a TClonesArray while
the last 2 cases are NOT ... this will be done when we upgrade the ClassDef/ClassImp
facility....

A small update to TTreeFormula for those cases (more is needed).

Revision 4145 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 7 02:03:47 2002 UTC (12 years, 10 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 134364 byte(s)
Diff to previous 3876
This patch is (re)enabling the draw of variable names
like: "f[].i" and "f", "f.f", "f.i" when "f.f" (i.e. currently
if 'f.f' exist all three draw the same thing). By Philippe.

Revision 3876 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 5 17:04:23 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 133850 byte(s)
Diff to previous 3670
From Philippe:
This fix ensures that when receiving a 'name' with a duplicated
branch name in it, TTree::Draw wont crash.
Also fix TBrowser to properly draw the correct leaf even if the
branch name was copied inside the leaf names.

Revision 3670 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 15 10:31:28 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 133822 byte(s)
Diff to previous 3648
Move function SetAxis to implementation file.
This function sets the Faxis member.
It also sets the TAxis bit kIsInteger if required.

Revision 3648 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 10 21:09:45 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 133564 byte(s)
Diff to previous 3647
Rename member result to fResult

Revision 3647 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 10 20:19:27 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 133558 byte(s)
Diff to previous 3636
This patch by Philippe insures that the proper number of element are drawn and that the
branch is only read once.

Revision 3636 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 10 07:19:31 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 132925 byte(s)
Diff to previous 3631
This patch from Philippe llows TTreeFormula to recover and properly return the
value of a method return a char* (or any variation).  So with
Event.root:  T->Draw("GetType()"), T->Draw("fTracks.GetTrackName()");
work properly.

Also fix a bug that prevented  T->Draw("fTracks[0].GetPx()");

Revision 3631 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 9 18:51:08 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 130937 byte(s)
Diff to previous 3562
This patch from Philippe supports more cases of string TLeaf.
It also fixes a problem when a TLeaf used as a string was the last
leaf mentioned in the formula.

I.e T->Draw("strstr(fEventName,\"Event\") + fType[2] "); was actually doing
 T->Draw("strstr(fEventName,\"Event\") + 0 "); !

Revision 3562 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 2 21:47:40 2002 UTC (13 years ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 130097 byte(s)
Diff to previous 3527
Add a new data member TAxis* fAxis.
Add the corresponding function TTreeFormula::SetAxis(TAxis* axis)

In TTreeFormula::EvalInstance, fAxis is used to compute
the bin number corresponding to a string element.

Revision 3527 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 21 21:19:54 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 129678 byte(s)
Diff to previous 3495
Protection added in case of inactive branches (Philippe)

Revision 3495 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 18 18:02:35 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 129441 byte(s)
Diff to previous 3390
From Philippe:
This allows TTree::Scan to properly print the contain a C style string.
It also allow strstr to be used in expression (like T->
Scan("fType[5]","fType[5]==38 && strstr(fType,\"type\")") )

Revision 3390 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 4 21:52:31 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 129229 byte(s)
Diff to previous 3327
This update from Philippe rationalizes the treatment of array of chars and bytes.
They are now considered by default as an array of numbers.  However if
they are used with an operator== or an operator!= and if the second argument
is also a string, the strcmp function will be used.  In addition, a direct call
of the function strstr is allowed.   The checks and error messages have been
improved for both the operator and strstr.
This update also corrects the problem where an expression was drawn multiple
times when using a fixed length array in string comparaison.

Revision 3327 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 29 09:56:19 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 121690 byte(s)
Diff to previous 3258
Fix a big bug in TTreeFormula. The member fNames has been renamed to fLeafnames
to avoid a clash with TFormula::fNames. The problem was only visible when doing I/O
of a TTreeFormula.

Revision 3258 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 20 09:23:07 2001 UTC (13 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 121670 byte(s)
Diff to previous 3103
In Definedvariable, add a protection in case of a TCutG referencing
objects that are not TTreeFormula.

Revision 3103 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 25 06:20:29 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 121303 byte(s)
Diff to previous 3068
From Philippe:
The following patches make sure that temporary created by
method calls from a TTreeFormula are properly deleted after
the processing of each event without a performance penalty

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/TTreeFormula.cxx
File length: 121311 byte(s)
Diff to previous 2999
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 2999 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 8 12:54:25 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 121169 byte(s)
Diff to previous 2992
Fix a portability problem in the new version from Philippe.

Revision 2992 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Oct 6 07:30:15 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 121173 byte(s)
Diff to previous 2970
From Philippe,
Functions that return an int are now histogramed in integer format.
You can now call methods of classes stored in a split clones array.
You can now call those methods by omitting the branch name.
You can not (yet) call a method on an object data member that has
been split.

Revision 2970 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 4 05:50:15 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 115780 byte(s)
Diff to previous 2964
Temporary fix from Philippe to avoid too many calls to TCanvas::Update
from TTreeFormula when calling functions.

Revision 2964 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 3 18:56:44 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 115778 byte(s)
Diff to previous 2817
This updates from Philippe  make sure that TTree::Draw eliminates all the temporary
objects that might be created by a method call on an entry per entry
basis.  (Currently they would be accumulated until the end of the
Draw command and deleted when the next cint command is entered).

Revision 2817 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 05:51:41 2001 UTC (13 years, 4 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 115645 byte(s)
Diff to previous 2694
As discovered by Thomas Hebbeker, When a branch contained a leaf
of the same name, TTree::Draw was always using that leaf.  For example
both Draw("Met.Met") and Draw("Met.Psi") were resulting in an histogram
of the values of Met.Met.  This patch from Philippe fixes the problem.

Revision 2694 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 16 16:39:42 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 115254 byte(s)
Diff to previous 2678
Modify UpdateFormulaLeaves to call TTree::GetLeaf with the new form branchname/leafname.
This new form is necessary when processing chains with branches having leaf names with the same name.

Revision 2678 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 14 07:53:30 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 115139 byte(s)
Diff to previous 2677
Use TBranchObject::GetClassName instead of GetObjClassName

Revision 2677 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 14 06:54:55 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 115142 byte(s)
Diff to previous 2664
TTree::Draw was unable to call member function of class inside a TClonesArray
stored in a "top-level" branch.  This patches enables it.

Philippe.

Revision 2664 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 10 13:44:26 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 112067 byte(s)
Diff to previous 2649
In the TFormLeafInfoClones constructor declaration, replace bool by Bool_t

Revision 2649 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 8 06:29:23 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 112065 byte(s)
Diff to previous 2642
from Philippe:
This is the code to implement casting in TTree::Draw

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/TTreeFormula.cxx
File length: 104216 byte(s)
Diff to previous 2609
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 2609 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 28 07:28:21 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 101705 byte(s)
Diff to previous 2582
Fix from Philippe:
There was a small memory leak in TTreeFormula when drawing
TClonesArray inside a non-split object.

Revision 2582 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 16 21:10:41 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 101520 byte(s)
Diff to previous 2573
Several protections in case of ill-defined TTreeFormula.

Revision 2573 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 13 14:57:01 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 101301 byte(s)
Diff to previous 2568
From Philippe:
This patch of TTreeFormula enables TCutG to work even when applied
to a chain.  As for the other tree formulas the TCutG's formulas need
to be updated for each member of the chain.

Revision 2568 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 12 17:21:45 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 100954 byte(s)
Diff to previous 2439
Fix from Philippe in TTreeFormula. The output of TTree::Scan
was not accurate when readind beyond the array boundaries.

Revision 2439 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 22 16:10:23 2001 UTC (13 years, 7 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 100832 byte(s)
Diff to previous 2431
make code more const char* correct (i.e. "strings" must be const char*) and
declare several functions extern "C". Mods by Dave Morrison.

Revision 2431 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 21 10:03:16 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 101794 byte(s)
Diff to previous 2429
suppress a warning message when using more than 16 direct variables.

Revision 2429 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 19 21:42:55 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 101743 byte(s)
Diff to previous 2382
Update by Philippe to support cases with more than one TCutG in the selection expression.

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/TTreeFormula.cxx
File length: 101740 byte(s)
Diff to previous 2360
 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 2360 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 2 20:52:47 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 98361 byte(s)
Diff to previous 2359
Remove unused variables kMETHOD, kDATAMEMBER, isMethod

Revision 2359 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 2 20:28:14 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 98488 byte(s)
Diff to previous 2348
From Philippe  an upgrade of TTree and TTreeFormula to support friend when in
streamed mode or when using member functions.

New class TTreeFriendLeafIter
an iterator on all the leaves in a TTree and its friend.

Revision 2348 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 1 07:05:03 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 98474 byte(s)
Diff to previous 2343
New additions by Philippe.

Revision 2343 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 31 16:59:36 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 93020 byte(s)
Diff to previous 2333
Remove unused code and another fix by Philippe.

Revision 2333 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 31 09:48:39 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 93532 byte(s)
Diff to previous 2331
Comment several places with unused code generating warnings with most compilers.
Fix a bug in TTreeFormula::GetRealInstance replacing:
            fCumulUsedSizes[kMAXFORMDIM+1] = 1;
by
            fCumulUsedSizes[kMAXFORMDIM] = 1;

Revision 2331 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 31 08:56:32 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 93519 byte(s)
Diff to previous 2300
Several mods by Philippe to support variable length arrays in TClonesArray
in the query processor.

Revision 2300 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 28 06:29:54 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 83716 byte(s)
Diff to previous 2283
Add new function TTreeFormula::IsInteger. It returns true if the formula
corresponds to one single leaf of type integer. The information is used
to build an histogram with integer bin size.

Revision 2283 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 25 06:23:27 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 82990 byte(s)
Diff to previous 2251
The following mods from Philippe:
Update TTreeFormula to be able to properly handle TClonesArray when the
split level is only 1.  Also enhance the fix used when treating cases like
"function(var)".

One side-effect that could be removed is that you can now use:
        Draw("GetXaxis") to do the same thing as Draw("fH.GetXaxis()")
WHEN and only when the split level is 1 or more.

Revision 2251 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 21 08:55:58 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 76902 byte(s)
Diff to previous 2239
Add a protection in TTreeFormula::DefinedVariable to avoid calling TMethodCall
when basic functions such as sqrt(fX) are given in the expression.
This fixes a problem reported by Christian Stratowa

Revision 2239 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 19 20:27:05 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 76876 byte(s)
Diff to previous 2214
Add a protection in TTreeFormula in case the loop index is 0
and the pointer to the TClass is evaluated.

Revision 2214 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 16 06:46:15 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 76865 byte(s)
Diff to previous 2113
From Philippe. Several protections and new code to support variable length arrays
in classes in TClonesArray (not yet finished)

Revision 2113 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 2 20:44:34 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 76129 byte(s)
Diff to previous 2102
Add new code from Philippe to support, eg
 T.Draw("event.GetHistogram()->GetMean()")
 T.Draw("event.fH.fNcells").

The modification in TClass in needed to allow for TClass::GetMethod to properly
return method that allocated more than 1 parent class removed (i.e a  function
in TObject for TTree).
Also, eventhough the result is correct, the modifications is not optimal
for speed
of execution of the GetMethod method.

Revision 2102 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 30 16:16:42 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 71058 byte(s)
Diff to previous 2101
Replace several calls to TObjArray::AddAt by AddatAndExpand to support complex formula
involving more than 16 operators.

Revision 2101 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 30 15:08:51 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 70986 byte(s)
Diff to previous 2094
TBranchElement now inline function.
Bypass one call to TBranch::GetEntry by cally simply TBranchElement::GetNdata
in TTreeFormula::GetNdata.

Revision 2094 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 28 11:42:05 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 71060 byte(s)
Diff to previous 2087
Modify logic in TTreeFormula::GetNdata in case of a TLeafElement with a branchcount.
The previous logic was reading all the branches of a branch with a branchcount.
Now read only the minimum necessary.

Revision 2087 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 27 17:29:36 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 70575 byte(s)
Diff to previous 2083
Changes by Philippe to support queries to non-split trees in case the classes
are missing.

Revision 2083 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 27 07:09:07 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 69602 byte(s)
Diff to previous 2082
One more change in original Philippe's code.
  There is a redefinition of a default argument.

  Double_t TFormLeafInfoClones::GetValue(TLeaf *leaf, Int_t instance = 0) {

Revision 2082 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 27 07:05:59 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 69606 byte(s)
Diff to previous 2081
The original TTreeFormula from Philippe did not compile on non gcc systems.
One must define TFormLeafInfoClones::GetValue(char *where...)

Revision 2081 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 27 06:59:32 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 69493 byte(s)
Diff to previous 2030
This updates by Philippe allows for all of the stress9 draw command
to be run on streamed (with shared library for now, see below) or
split leaves.

Things not implemented yet.
        - following pointers other that TClonesArrays pointer (this should
                be done soon).
        - chains of methods (i.e fH.GetXaxis()->GetSomethingElse()
        - callings methods on data members of a streamed class.

Revision 2030 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 20 21:21:38 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 45728 byte(s)
Diff to previous 1994
From Philippe:
In tree, now allows to draw complete arrays with a double click in the browser
(before it was attempting draw one out-of-bounds element: array[max_size])

In meta, use SetReadingObject in ReadBuffer before processing the
following cases: kObjectp, kObjectP, kObject, kAny, kStreamer, kStreamLoop.
Also update the function TStreamerInfo::GetStreamerElement, to allow
TTreeFormula to properly cache the offset and type information.

In treeplayer, now correctly handle all datamember and method calls
(plus a little bit of clean-up in some calls) when in split mode.
Non-split(or streamed) mode needs more works.

Revision 1994 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 18 06:11:06 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 43947 byte(s)
Diff to previous 1993
th this patch from Philippe one can access a datamember within a branch.

For example with a split tree of Event, one can now do:

  TFile *Event = TFile::Open("Event.new.root")
  T->Draw("event.fH.fNcells")
  T->Draw("event.fH.GetNbinsX()")

with both the old style and the new style.  It is currently
limited to one level, i.e., you still can not do:

  T->Draw("event.fH.fAxis.fXmin")

Revision 1993 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 18 05:59:08 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 44100 byte(s)
Diff to previous 1950
From Philippe:
This version of TTreeFormula enables using method calls within the
Draw command with new style branches.

Together with the patch for TStreamerInfo, this allow stress to
work properly in the new style of branches.

However it does not completely fix the access to data member.
It is currently limited to public data member.  We need to
find a function that return the offset of a datamember given
its name (this function needs to lookup in the class itself
but also in its base).

Revision 1950 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 10 16:36:05 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 42327 byte(s)
Diff to previous 1925
Introduce fixes by Philippe to support treename.branchname.varname

Replace calls to GetLeaf by inline code.

Revision 1925 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 9 08:33:50 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 42175 byte(s)
Diff to previous 1751
Many changes in this new version of TTreeFormula:
The functionality provided by the old static functions GetLeaf and GetBranch has been moved
to TTree::GetBranch, TTree::GetLeaf, TBranch::GetBranch and TBranch::GetLeaf.

Preliminary mods to support the new class TFriendElement.

The member fLeaves contain now pointers to the active leaves used by this TTreeFormula.
When a TChain loads a new TTree in TChain::LoadTree, the corresponding TTreePlayer object
calls the new function TTreeFormula::UpdateFormulaLeaves. This new function recomputes pointers in fLeaves
by using the names of the leaves and corresponding Trees in the new member "TObjArray fNames".
This solves a long standing problem with TChains having TTrees with classes that have evolved
compared to the first Tree in the TChain.

The Streamer function uses the automatic Streamer for the new class.

Revision 1751 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 5 22:32:06 2001 UTC (13 years, 10 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 43272 byte(s)
Diff to previous 1639
Cosmetic change.

Revision 1639 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 21 07:28:30 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 43265 byte(s)
Diff to previous 1572
Re-enable TTree::Draw to properly handle branches created with
a leaf list.  Without this fix, you can only draw the first leaf of
such a branch if you try access it via its full name (branch.leaf)

Revision 1572 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 17:18:55 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 42941 byte(s)
Diff to previous 1569
Remove unnessary breaks at the end of the switch/case statements in GetValueLeafObject.
Replace initialisation styles like:       TLeaf *leaf(0), *tmp_leaf(0);
by TLeaf *leaf=0, *tmp_leaf=0;
(was fatal on HP-UX/aCC)

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/TTreeFormula.cxx
File length: 43020 byte(s)
Diff to previous 1516
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 1516 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 3 10:31:14 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 33392 byte(s)
Diff to previous 1205
Add a protection in TTreeFormula::EvalInstance in case a null string
is found on the file.

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

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

Revision 1131 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 8 08:00:38 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 33342 byte(s)
Diff to previous 989
Because of deficiencies in the standard C formating fonction sprintf, add logic
in TTreeFormula::PrintValue to correctly print floats/doubles including the exponent
value in a fixed length buffer of 9 characters. The exponent is always shown
and the precision reduced.

Revision 989 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 21 20:58:28 2000 UTC (14 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 33136 byte(s)
Diff to previous 859
Add protection in TTreeFormula::DefinedVariable in the loop
on leaves when a leaf is a TLeafObject.
In this case fBranch=0 must be protected.

Revision 859 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 2 14:01:23 2000 UTC (14 years, 2 months ago) by rdm
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 32965 byte(s)
Diff to previous 853
put enum EReturnType in class scope of TMethodCall so it does not
polute the namespace.

Revision 853 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 31 11:21:18 2000 UTC (14 years, 2 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 33017 byte(s)
Diff to previous 448
Take into account the changes in the EReturnType of TMethodCall.h

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/TTreeFormula.cxx
File length: 33011 byte(s)
Diff to previous 446
Change the maximum length for a branch name from 64 to 128 characters

Revision 446 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 11 20:10:12 2000 UTC (14 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 33010 byte(s)
Diff to previous 224
The kMAXFOUND parameter limit for the EvalInstance() member function
was increased to 200 for version 2.24.05 (along with the appropriate
change in TFormula). However, the size of the fCodes, fCumulSize, and
fIndexes arrays (declared in the header) and the fIndex array (declared
in the constructor) should be increased to 200 as well.
(Thanks to Gene Van Buren for reporting the inconsistency)

The kMAXFOUND parameter is now declared in TFormula.h and kMAXCODES
is set to kMAXFOUND in TTreeFormula.

Revision 224 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 16 07:36:27 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 32948 byte(s)
Diff to previous 222
Protection added in TTreeFormula::GetValueLeafObject

Revision 222 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 15 16:57:55 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 32873 byte(s)
Diff to previous 215
 few more protections added by Philippe

Revision 215 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 15 11:10:39 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 32689 byte(s)
Diff to previous 212
Replave abs by TMath::Abs in TTreeFormula::DefineDimensions
did not compile on Solaris with CC4

Revision 212 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 15 06:46:22 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 32668 byte(s)
Diff to previous 204
New version by Philippe. Support for more cases with multi-dim arrays.

Revision 204 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 12:45:06 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 32630 byte(s)
Diff to previous 203
Fix a bug in the new TTreeFormula constructor.
Changed the statement
      for (k = fNdimensions[i]; (k > 0) && (fCumulSize[k-1]>=0); k--) {
to
      for (k = fNdimensions[i]; (k > 0) && (fCumulSize[i][k-1]>=0); k--) {
This bug was detected by the HP-UX CC compiler

Revision 203 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 09:23:45 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 32627 byte(s)
Diff to previous 200
Modify the constructor to define the loop index i,j,k only once.
The HP-UX and Solaris compiler complain for multiple definitions.

Revision 200 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 09:06:44 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 32644 byte(s)
Diff to previous 119
New version of TTreeFormula by Philippe Canal.
This version should be properly handling the following cases.
Draw("fVertex");
Draw("fVertex[10]");
Draw("fVertex[][2]");
Draw("fVertex[600]");
Draw("fVertex[590][1]");

It should also handle properly operation including arrays of the same
number of dimension but different size.

E.g. with

carre[2][3] and cube[3][4]

Draw("carre - cube");

should be doing the equivalent of

for(i=0;i<2;i++)
  for(j=0;j<3;j++)
        histogram( carre[i][j] - cube[i][j] );

It should be the case both is the first dimension is a real dimension
of one 'acquired' from being in a TClonesArray.

Revision 119 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 13 09:15:34 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 22276 byte(s)
Diff to previous 99
- Mods in TTreeFormula. Change Float_t to Double_t.

Revision 99 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 9 16:26:11 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 22268 byte(s)
Diff to previous 70
Changes by Philippe to extend support for array notation

Revision 70 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 5 07:27:12 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 20328 byte(s)
Diff to previous 51
- Set the maximum dimension for array params in TTreeFormula::EvalInstance
  to the parameter kMAXFOUND already used in TFormula.

Revision 51 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 30 06:12:50 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 20181 byte(s)
Diff to previous 46
- New options in TStyle::Setxxx fonctions setting axis parameters.
  For example, one can do : gStyle->SetLabelFont(72,"xyz")
  to set the font for the 3 axes x,y,z

- Change print format precision from 9.5g to 9.9g in TTreeFormula::PrintValue.

Revision 46 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 26 06:43:01 2000 UTC (14 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 20181 byte(s)
Diff to previous 44
- Activate function rndm in TFormula::Eval and TTreeFormula::EvalInstance.
  One can do:
    TF1 f1("f1","sin(x)+0.1*rndm",0,4)
    f1.Draw();
    ntuple.Draw("px+rndm","rndm<0.1");

Revision 44 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 25 09:49:29 2000 UTC (14 years, 8 months ago) by brun
Original Path: trunk/treeplayer/src/TTreeFormula.cxx
File length: 20202 byte(s)
Diff to previous 3
- Add a new member char fType[20] in class Event of test program mainEvent.

- Modify TTreeFormula::DefinedVariable and TTreeFormula::EvalInstance
  to support strings. With the new Event test program, one can do:
   T.Draw("event.GetNtrack()","strstr(fType,\"type3\")!=0");
      or
   T.Draw("event.GetNtrack()","fType==\"type3\"");

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