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

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

Parent Directory Parent Directory


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

Revision 36449 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 28 20:52:17 2010 UTC (4 years, 2 months ago) by pcanal
File length: 18723 byte(s)
Diff to previous 35819
Fix several issues with then handling of vector of object related to the bug report:
<http://savannah.cern.ch/bugs/?74451>

Revision 35819 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 28 00:02:35 2010 UTC (4 years, 3 months ago) by pcanal
File length: 17428 byte(s)
Diff to previous 35815
remove deadcode

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: 17601 byte(s)
Diff to previous 34326
Fix Coverity deadcode reports : 11439

Revision 34326 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 5 13:53:25 2010 UTC (4 years, 6 months ago) by brun
File length: 17598 byte(s)
Diff to previous 32659
From Axel:
Also replace commas in STL unwounded class.
Create #includes for templates arguments of pair (needed for map)
Also handle -TClassEdit::ESTLType (e.g. map is by default negative) in
TTreeProxyGenerator.
Only add include the directive for STL classes if we know the header to
include.

Revision 32659 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 17 20:57:10 2010 UTC (4 years, 10 months ago) by pcanal
File length: 17559 byte(s)
Diff to previous 23554
Fix memory leaks (in case of error)

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: 17457 byte(s)
Diff to previous 22902
Fix for -Wshadow

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

Revision 21708 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 15 08:04:15 2008 UTC (7 years ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 17458 byte(s)
Diff to previous 21707
Prevent ambiguity regarding operator[]

Revision 21707 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 15 05:36:55 2008 UTC (7 years ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 17406 byte(s)
Diff to previous 21704
readd operator* to allow access to vector<vector<double> >

Revision 21704 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 14 22:52:10 2008 UTC (7 years ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 17316 byte(s)
Diff to previous 21660
more fixes for vector<double> and vector<vector<double> >

Revision 21660 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 13 04:18:15 2008 UTC (7 years ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 15519 byte(s)
Diff to previous 21547
fix support for std::vector of fundamental help in a top level branch

Revision 21547 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 20 18:19:50 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 15429 byte(s)
Diff to previous 21510
Add ClassImp and doc markers

Revision 21510 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 19 20:55:57 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 15383 byte(s)
Diff to previous 20882
add missing class and typedef descriptions

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/TBranchProxyClassDescriptor.cxx
File length: 14632 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/TBranchProxyClassDescriptor.cxx
File length: 14632 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/TBranchProxyClassDescriptor.cxx
File length: 14704 byte(s)
Diff to previous 19545
remove :$ from tag line

Revision 19545 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 3 17:00:20 2007 UTC (7 years, 5 months ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 14714 byte(s)
Diff to previous 19540
add missing 'else'

Revision 19540 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 3 13:33:49 2007 UTC (7 years, 5 months ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 14709 byte(s)
Diff to previous 19438
Add support for STL containers in MakeProxy

Revision 19438 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 23 17:07:48 2007 UTC (7 years, 6 months ago) by pcanal
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 13571 byte(s)
Diff to previous 18934
Rewrite the parsing of the TBranchElement by looping over the TStreamerElement
instead of the TBranchElement (hence emulating somewhat unroll instead of
guessing the connection between branch and element)
Fix support for base class (in particular when inside a TClonesArray)
Fix support for sub-objects without their own branch ('missing node').

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

Revision 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/TBranchProxyClassDescriptor.cxx
File length: 13238 byte(s)
Diff to previous 17579
-Implement necessary casts due to TVirtualStreamerinfo.

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/TBranchProxyClassDescriptor.cxx
File length: 13215 byte(s)
Diff to previous 14745
-Replace calls to gROOT->GetClass by TClass::GetClass
-Remove unused references to TROOT.h

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/TBranchProxyClassDescriptor.cxx
File length: 13236 byte(s)
Diff to previous 13210
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 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/TBranchProxyClassDescriptor.cxx
File length: 13248 byte(s)
Diff to previous 12602
Update the spacing and documentation to match the coding rule

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

Revision 11124 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 16 01:29:56 2005 UTC (9 years, 11 months ago) by rdm
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 12722 byte(s)
Diff to previous 10977
From Philippe:
This fixes the support for branch formed from a leaflist with more than one
leaf!

Revision 10977 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 22 09:29:37 2005 UTC (10 years ago) by brun
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 12598 byte(s)
Diff to previous 10883
From Philippe:
This patch prevents error message issue when looking at an empty string and
add support for the newer support for base classes in TTree.

Revision 10883 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 5 22:22:13 2005 UTC (10 years ago) by brun
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 12469 byte(s)
Diff to previous 9600
From Philippe:
This patch insure the proper generation of variable names when the top level
branch name ends in '.'.
It also fixes some spurrious duplication of proxy classes.
It also avoid duplicating top level variable names and warns:
Warning in <TTreeProxyGenerator>: The branch name "baseB<void>" is
duplicated. Only the first instance
        will be available directly. The other instance(s) might be available
via their complete name
        (including the name of their mother branche's name).

Revision 9600 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 27 12:21:31 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 11917 byte(s)
Diff to previous 9330
From Philippe:
This patch implements supports for multiple level of
inheritance in the generated TTreeProxy selector.

This patch also remove some class duplication in the
generated code and implement proper support for templated
classes.

Revision 9330 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 28 05:29:07 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/src/TBranchProxyClassDescriptor.cxx
File length: 11106 byte(s)
Diff to previous 9323
From Philippe:
Fix a portability problem (gcc2.95)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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