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

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

Parent Directory Parent Directory


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

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: 6046 byte(s)
Diff to previous 37410
Fix for coding convention RS1 and RS2

Revision 37410 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 8 17:22:07 2010 UTC (4 years, 1 month ago) by pcanal
File length: 6050 byte(s)
Diff to previous 28356
In MakeProxy also replace : in the branchname to data member name translation

Revision 28356 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 24 20:28:37 2009 UTC (5 years, 9 months ago) by pcanal
File length: 6013 byte(s)
Diff to previous 28346
additional fix needed for r28346

Revision 28346 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 24 12:39:14 2009 UTC (5 years, 9 months ago) by pcanal
File length: 5758 byte(s)
Diff to previous 22902
Correct MakeProxy's handling of a branch created with a leaflist with more than one leaf
(usually used for C-struct).  This fixes the Savannah report #42984.

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

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/TBranchProxyDescriptor.cxx
File length: 5414 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/TBranchProxyDescriptor.cxx
File length: 5376 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/TBranchProxyDescriptor.cxx
File length: 5335 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/TBranchProxyDescriptor.cxx
File length: 4584 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/TBranchProxyDescriptor.cxx
File length: 4584 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/TBranchProxyDescriptor.cxx
File length: 4648 byte(s)
Diff to previous 19438
remove :$ from tag line

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/TBranchProxyDescriptor.cxx
File length: 4658 byte(s)
Diff to previous 16178
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 16178 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 31 12:28:44 2006 UTC (8 years, 4 months ago) by rdm
Original Path: trunk/treeplayer/src/TBranchProxyDescriptor.cxx
File length: 4248 byte(s)
Diff to previous 14336
add ctype.h needed for isalpha() etc.

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

Revision 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/TBranchProxyDescriptor.cxx
File length: 4249 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/TBranchProxyDescriptor.cxx
File length: 3932 byte(s)
Diff to previous 11240
Fix to follow coding conventions

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

Revision 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/TBranchProxyDescriptor.cxx
File length: 3757 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/TBranchProxyDescriptor.cxx
File length: 3735 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/TBranchProxyDescriptor.cxx
File length: 3612 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/TBranchProxyDescriptor.cxx
File length: 3205 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/TBranchProxyDescriptor.cxx
File length: 3183 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