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

Log of /trunk/tree/treeplayer/inc/TBranchProxyClassDescriptor.h

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: 3278 byte(s)
Diff to previous 22902
Fix several issues with then handling of vector of object related to the bug report:
<http://savannah.cern.ch/bugs/?74451>

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

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/inc/TBranchProxyClassDescriptor.h
File length: 3278 byte(s)
Diff to previous 20882
more fixes for vector<double> and vector<vector<double> >

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/inc/TBranchProxyClassDescriptor.h
File length: 3004 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/inc/TBranchProxyClassDescriptor.h
File length: 3004 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/inc/TBranchProxyClassDescriptor.h
File length: 3074 byte(s)
Diff to previous 19541
remove :$ from tag line

Revision 19541 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 3 15:41:02 2007 UTC (7 years, 5 months ago) by pcanal
Original Path: trunk/treeplayer/inc/TBranchProxyClassDescriptor.h
File length: 3084 byte(s)
Diff to previous 19540
Fix compilation on mac

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/inc/TBranchProxyClassDescriptor.h
File length: 3082 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/inc/TBranchProxyClassDescriptor.h
File length: 3000 byte(s)
Diff to previous 17711
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 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/inc/TBranchProxyClassDescriptor.h
File length: 2999 byte(s)
Diff to previous 15140
-Implement necessary casts due to TVirtualStreamerinfo.

Revision 15140 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 08:37:42 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/treeplayer/inc/TBranchProxyClassDescriptor.h
File length: 2959 byte(s)
Diff to previous 13210
mplement missing copy constructors and assignement operators

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

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/inc/TBranchProxyClassDescriptor.h
File length: 2695 byte(s)
Diff to previous 9335
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 9335 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 28 16:38:00 2004 UTC (10 years, 6 months ago) by brun
Original Path: trunk/treeplayer/inc/TBranchProxyClassDescriptor.h
File length: 2478 byte(s)
Diff to previous 9330
From Philippe:
Fix a problem with CR/LF characters at the end of the lines
giving a problem with gcc2.95

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/inc/TBranchProxyClassDescriptor.h
File length: 2558 byte(s)
Diff to previous 9326
From Philippe:
Fix a portability problem (gcc2.95)

Revision 9326 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 25 22:45:41 2004 UTC (10 years, 7 months ago) by rdm
Original Path: trunk/treeplayer/inc/TBranchProxyClassDescriptor.h
File length: 2661 byte(s)
Diff to previous 9323
correct multiple inclusion ifdefs, must be of the form ROOT_<filename - .h>.

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/inc/TBranchProxyClassDescriptor.h
File length: 2598 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