Log of /trunk/tree/treeplayer/src/TSelectorDraw.cxx
Parent Directory
Revision
48046 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 14 15:35:16 2012 UTC (2 years, 1 month ago) by
rdm
File length: 65478 byte(s)
Diff to
previous 47982
From Ioan:
Replace the trunk code that uses the deprecated TH1::kCanRebin bit with
the new methods TH1::CanExtendAllAxes() and TH1::SetCanExtend() - see r47909,
r48012 and r48031. The old TH1::kCanRebin bit did not really have much to
do with histogram rebinning, but rather with extending the limits of the
histogram's axes (which can cause a rebin, but only in some cases). As such,
the word "Rebin" has been replaced with "Extend" for the new methods.
Rename TH1::RebinAxis() to TH1::ExtendAxis() for the reasons stated above.
The TH1::RebinAxis() method will be kept in v6-00 for backward compatibility
with an obsolete warning and will be removed in v6-02. The current
implementation simply forwards the call to TH1::ExtendAxis().
Revision
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: 65490 byte(s)
Diff to
previous 43348
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
43071 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 21 17:01:01 2012 UTC (2 years, 11 months ago) by
axel
File length: 65410 byte(s)
Diff to
previous 41697
Fix clang warnings: strlcpy(A, B, len) with len == strlen(B) instead of sizeof(A). Was okay in all cases, but double call to strlen() for no good reason.
Revision
40643 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 19 19:27:05 2011 UTC (3 years, 5 months ago) by
pcanal
File length: 65313 byte(s)
Diff to
previous 40155
From Bruno Lenzi: TEntryListArray
TEntryListArray is an extension of TEntryList, used to hold selected entries and subentries (sublists) of a TTree. It is useful in case of a TTree with containers (vectors, arrays, ...). A typical example is the case when each entry of a TTree corresponds to physics events and each subentry (index of arrays) represents a particle.
Its main purpose is to improve the performance of a code that needs to apply complex selections (cuts) on TTree::Draw multiple times. Evaluating such cuts can be time consuming for large trees due to the need for loading the associated information (branches). This operation is done once with the use of a TEntryListArray. Subsequent calls to TTree::Draw only need to load the requested branches for histogramming, while using only the entries and subentries that satisfied the previous selection.
TTree/TSelectorDraw: use of TEntryListArray to select entries and subentries. If the option "entrylistarray" is specified, a TEntryListArray is created and filled with the entries and subentries that pass the given selection. If TTree::Draw is called after a TEntryList is set, only the selected entries and subentries are used to fill histograms or create new entrylists.
Revision
38741 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 5 18:12:39 2011 UTC (3 years, 9 months ago) by
pcanal
File length: 63024 byte(s)
Diff to
previous 38447
Copy documentation explained the length of the array returned by TSelectorDraw::GetVal. Add reference to this documentation in the other related function GetV1, etc. in TSelectorDraw, TTreePlayer and TTree.
Revision
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: 60778 byte(s)
Diff to
previous 32659
Prefer the use of InheritsFrom(TClass*) over InheritsFrom(const char*) as long as
it does not increase the library dependencies.
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: 60625 byte(s)
Diff to
previous 29758
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
28526 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon May 11 15:10:59 2009 UTC (5 years, 8 months ago) by
brun
File length: 60742 byte(s)
Diff to
previous 28521
The logic to invoke TGl5D is moved to TTreePlayer.
TTree::SetEstimate is automatically cally when option "gl5d" is specified.
A GL canvas is automatically created when option "gl5d" is specified.
Revision
19589 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 10 10:09:52 2007 UTC (7 years, 5 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 60260 byte(s)
Diff to
previous 19580
From Bastien:
Fixed: TParallelCoordVar.cxx: The extreme bins of the axes histograms are now properly diplayed.
Fixed: TParallelCoordVar.cxx, TParallelCoordVar.h: The histograms, minimums, maximums, averages and quantiles are now updated when changing the entries to display.
Fixed: TParallelCoord.cxx, TParallelCoordVar.cxx, TParallelCoordRange.cxx, TParallelCoordEditor.cxx: Several not portable C++ expressions has been changed.
Added: TParallelCoordEditor.cxx, TParallelCoordEditor.h: Better interface to display or not bar histograms.
Added: TTreePlayer.cxx: Added documentation to TTreePlayer::DrawSelect.
Added: TTree.cxx: Added documentation to TTree::Draw.
Added: TSelectorDraw.cxx: Protection in TSelectorDraw::Begin if there is more than 4 dimensions and neither the option "para", "candle" or "goff" are activated.
Added: TParallelCoord.cxx: The "Apply to tree" button now also update the selected entries drawn on the TParallelCoord.
Added: TParallelCoord.cxx, TParallelCoord.h: An initial entry list is defined. Calling TParallelCoord::ResetTree will produce the same output as when first initialized.
Fixed: TParallelCoordEditor.cxx, TParallelCoordEditor.h: Fixed seg faults from bad management of the TGComboBox.
Fixed: TParallelCoordVar.cxx: Fixed seg fault when computing the quantiles.
Revision
19569 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 8 12:58:13 2007 UTC (7 years, 5 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 60426 byte(s)
Diff to
previous 19246
From Bastien DallaPiazza:
treeplayer/src/TTreePlayer.cxx:
Add the options "para" and "candle" to TTreePlayer::DrawSelect.
The option "para" brings a parallel coordinates plot.
The option "candle" brings a candle stick chart.
treeplayer/src/TSelectorDraw.cxx:
Add some code in TSelectorDraw::Begin, TSelectorDraw::TakeAction and
TSelectorDraw::TakeEstimate to draw parallel coordinates plots and candle
stick charts.
Revision
19238 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 3 10:00:15 2007 UTC (7 years, 6 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 58779 byte(s)
Diff to
previous 19143
From Bastien Dallapiazza:
-Expand the dimensionality capability of TSelectorDraw to arbitrary
dimensionality.
However, since there is no way yet to draw data with a dimensionality greater
than 4, I kept the capability not available by keeping the dimensionality test
in TSelectorDraw::Compile (l.908) aborting the drawing if dimension > 4.
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/TSelectorDraw.cxx
File length: 59136 byte(s)
Diff to
previous 16877
From Anna:
Extend the functionality of TEntryList and add the following info in TTree::Draw
// Saving the result of Draw to a TEventList or a TEntryList
// =========================================================
// TTree::Draw can be used to fill a TEventList object (list of entry numbers)
// instead of histogramming one variable.
// If varexp0 has the form >>elist , a TEventList object named "elist"
// is created in the current directory. elist will contain the list
// of entry numbers satisfying the current selection.
// If option "entrylist" is used, a TEntryList object is created
// Example:
// tree.Draw(">>yplus","y>0")
// will create a TEventList object named "yplus" in the current directory.
// In an interactive session, one can type (after TTree::Draw)
// yplus.Print("all")
// to print the list of entry numbers in the list.
// tree.Draw(">>yplus", "y>0", "entrylist")
// will create a TEntryList object names "yplus" in the current directory
//
// By default, the specified entry list is reset.
// To continue to append data to an existing list, use "+" in front
// of the list name;
// tree.Draw(">>+yplus","y>0")
// will not reset yplus, but will enter the selected entries at the end
// of the existing list.
//
// Using a TEventList or a TEntryList as Input
// ===========================
// Once a TEventList or a TEntryList object has been generated, it can be used as input
// for TTree::Draw. Use TTree::SetEventList or TTree::SetEntryList to set the
// current event list
// Example1:
// TEventList *elist = (TEventList*)gDirectory->Get("yplus");
// tree->SetEventList(elist);
// tree->Draw("py");
// Example2:
// TEntryList *elist = (TEntryList*)gDirectory->Get("yplus");
// tree->SetEntryList(elist);
// tree->Draw("py");
// If a TEventList object is used as input, a new TEntryList object is created
// inside the SetEventList function. In case of a TChain, all tree headers are loaded
// for this transformation. This new object is owned by the chain and is deleted
// with it, unless the user extracts it by calling GetEntryList() function.
// See also comments to SetEventList() function of TTree and TChain.
//
// If arrays are used in the selection critera, the entry entered in the
// list are all the entries that have at least one element of the array that
// satisfy the selection.
// Example:
// tree.Draw(">>pyplus","fTracks.fPy>0");
// tree->SetEventList(pyplus);
// tree->Draw("fTracks.fPy");
// will draw the fPy of ALL tracks in event with at least one track with
// a positive fPy.
//
// To select only the elements that did match the original selection
// use TEventList::SetReapplyCut or TEntryList::SetReapplyCut.
// Example:
// tree.Draw(">>pyplus","fTracks.fPy>0");
// pyplus->SetReapplyCut(kTRUE);
// tree->SetEventList(pyplus);
// tree->Draw("fTracks.fPy");
// will draw the fPy of only the tracks that have a positive fPy.
//
// Note: Use tree->SetEventList(0) if you do not want use the list as input.
Revision
15935 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Aug 6 07:15:01 2006 UTC (8 years, 5 months ago) by
rdm
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 56583 byte(s)
Diff to
previous 15181
Handle several issues related to the TTree::Process() and TTree::Draw()
return values:
- TSelector: fStatus increased from Int_t to Long64_t. It is used to
return the number of selected events by TTree::Draw() which returns
a Long64_t.
- TVirtualProof, TProof, TDSet, TProofPlayer: Process() and Draw() were
returning an Int_t, now a Long64_t to be consistent with TTree/TChain.
Actually returning of TSelector::GetStatus() from the workers to be
done tomorrow.
Also added proper comments describing the return values for Draw()
(number of selected events), and Process() (value returned by
TSelector::GetStatus()).
- TTree, TChain, TSelectorDraw: added proper comments describing the
return values of Draw() and Process().
Revision
15134 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 58811 byte(s)
Diff to
previous 14336
From Federico Carminati:
"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."
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/TSelectorDraw.cxx
File length: 56589 byte(s)
Diff to
previous 13596
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
13596 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 9 17:57:12 2005 UTC (9 years, 1 month ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 56569 byte(s)
Diff to
previous 13174
Improve the algorithm mapping the 3rd or 4th variable to the color number
when doing, eg
ntuple.Draw("px:py:random:pz","","colz")
ntuple.Draw("px:py:pz","","colz")
The new algorithm supports different palettes and the right order
of colors in the palette.
If the option z (as in "colz") is specified, the palette is drawn
in the canvas for the 3-d scatter-plot.
There is a change required in THistPainter to correctly draw
the palette in case of a 4-d scatter plot (for Olivier)
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/TSelectorDraw.cxx
File length: 55018 byte(s)
Diff to
previous 12430
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
11414 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 23 12:41:01 2005 UTC (9 years, 10 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 54667 byte(s)
Diff to
previous 11404
From Marek Biskup:
-Added options proofi and proofg to TProfile and TProfile2D
drawn with proof.
-Added support for "ICE" option (see TH1::Reset()) to TH2, TH3,
TProfile and TProfile2D::Reset().
-Rewritten Merge() in TH1, TH2, TH3, TProfile and TProfile2D
to support buffers. Changed the return type from Int_t to Long64_t.
Revision
11281 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 10 17:57:05 2005 UTC (9 years, 10 months ago) by
rdm
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 54056 byte(s)
Diff to
previous 11259
From Marek Biskup:
major new PROOF developments:
- access to PROOF directly via the TChain interface (creating a TDSet
in the background).
- access to PROOF based trees via the TTreeViewer
- fully implemented the TChain/TDSet::Draw() interface.
- PROOF sessions can now be browsed via the TBrowser
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/TSelectorDraw.cxx
File length: 53190 byte(s)
Diff to
previous 11109
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
10204 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 5 07:02:21 2004 UTC (10 years, 3 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 49072 byte(s)
Diff to
previous 9734
From Federico Carminati
I have attached few mods necessary to have root working with the IBM
compiler on the Mac. It now works through all the benchmarks, so you can
recompile on G5 with optimisation and quote a performance finally. The
remaining changes I had to make were:
- Make DYLD_LIBRARY_PATH point to the right place (SHAME!)
- Avoid dynamic casting of null pointers. This is a phylosophical point
which can be debated. I see pro and cons to have a compiler that does not
like them, however I had to protect the code in a couple of places.
- Remove the invalid trap from main programs. I consider this almost a bug
of the compiler.
- Remove -flat-namespace from linking libraries. Again I think the
behaviour is highly debatable, but I know the linker should get better in
Tiger
- Add -DR__BROKEN_FUNCTION_TEMPLATES to the compilation
Please check the mods and put them in the head asap so they do not get out
of synch. Let me know about the performance on the G5, I am curious to see
whether we have gained anything!!!
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/TSelectorDraw.cxx
File length: 48504 byte(s)
Diff to
previous 9379
*****************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
9379 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 2 21:50:20 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 48489 byte(s)
Diff to
previous 9267
From Philippe:
This patchs avoid crashing if the name of the TEventList used in TTree::Draw
refers to an existing non-TEventList object.
For example:
ntuple->Draw("px>>elist"); ntuple->Draw(">>elist");
was crashing and now issues:
Error in <TSelectorDraw::Begin>: An object of type 'TH1F' has the same name as the requested event list (elist)
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/TSelectorDraw.cxx
File length: 47121 byte(s)
Diff to
previous 8709
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
8709 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 27 12:31:19 2004 UTC (10 years, 8 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 46794 byte(s)
Diff to
previous 8688
In TSelectorDraw::TakeAction and TSelectorDraw::TakeEstimate, one should not
convert anymore the user coordinates to pad coordinates when a scatter-plot
is generated. This logic was necessary at the time when TGraph was not
supporting log scales. It is not necessary anymore.
Revision
8688 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Apr 25 17:16:04 2004 UTC (10 years, 9 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 47681 byte(s)
Diff to
previous 8611
In TSelectorDraw::TakeAction and TSelectorDraw::TakeEstimate replace calls
to DrawCopy by Draw and remove the logic to set/reset the kNostats bit.
This code was necessary when these two functions were in TTreePlayer,
but the TSelectorDraw class takes care of removing the temporary histogram
created for 2-d and 3-d scatter plots.
This removes a memory leak when drawing scatter plots via TTree::Draw,
a problem found by Philippe.
Revision
8348 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Mar 9 15:57:46 2004 UTC (10 years, 10 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 46461 byte(s)
Diff to
previous 8181
In TSelectorDraw::Begin reimplement the logic to detect option "same".
The old implementation had a side effect on option "e" that worked only
when the "e" was the first character in the option string.
This had a dramatic effect in tqo queries like
J->Draw("etajet[1]","W*(Etjet[1]>70)","e1");
J->Draw("etajet[1]","W*(Etjet[1]>70)","Same,e1");
The second Draw was showing error bars different between tyhe first and second plot!
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/TSelectorDraw.cxx
File length: 46294 byte(s)
Diff to
previous 7735
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
7721 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 10 20:27:25 2003 UTC (11 years, 1 month ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 46257 byte(s)
Diff to
previous 7686
From Philippe:
This patch repair the creation of event list in TTree::Draw when the selection criteria is an array (The broken
implementation lead to core dumps is a regular draw with array was done before the draw event list and resulted in an
empty event list in some cases).
Revision
7630 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Nov 22 22:02:02 2003 UTC (11 years, 2 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 45850 byte(s)
Diff to
previous 7620
Replace the generation of a TPolyMarker by a TGraph when
generating 2-d plots in tree.Draw("y:x").
With this change, one can use all the features of a TGraph, like
additional drawing options "l" or TGraph::Fit.
For example the following command
tree.Draw("y:x");
produces a scatter plot with the points corresponding to the
original coordinates x and y. After the command, one can access
the TGraph object in the pad with
TGraph *g = (TGraph*)gPad->GetPrimitive("Graph");
The following command
tree.Draw("y:x:,"","l");
will produce a TGraph connecting all the points with a line.
A similar change is planned to replace the generation of the TPolyMarker3D
by a TGraph2D in commands like tree.Draw("z:y:x");
The above changes are also necessary to support multiple TGraph (or TGraph2D)
generated in a PROOF session when updating only the last generated points.
Revision
7619 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 20 15:03:44 2003 UTC (11 years, 2 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 45798 byte(s)
Diff to
previous 7403
From Axel Naumann:
I had a class with an impl file name
/home/.../src/TMyClass.cxx
which was misinterpreted as being a ROOT class (as it had the format
"*/src/T*"). I changed the ROOT class detection to check whether it's an
absolute path name, assuming that ROOT's classes' impl file names are
_always_ relative paths.
Revision
6991 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 22 21:15:30 2003 UTC (11 years, 6 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 42438 byte(s)
Diff to
previous 6713
From Philippe:
TSelectorDraw::CompileVariables now returns a Boolean to indicate its
success or failure. This is used in TSelectorDraw::Begin to detect a
'compilation' failure (rather than try to guess from the side effects).
With this fix, the case of producing an EventList with a bad selection now
properly fails.
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/TSelectorDraw.cxx
File length: 42068 byte(s)
Diff to
previous 6350
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
6350 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 1 20:16:42 2003 UTC (11 years, 9 months ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 41945 byte(s)
Diff to
previous 6344
From Philippe:
Now that a default TSelectorDraw can be part of TTreePlayer, it is possible
that notify is called of a TSelectorDraw without a tree attached to it. For
example in:
TChain *chainJet = new TChain("T");
chainJet->Add("/cdf/data40b/s0/qcd/chlebana/jobs/test/ntup1.root");
chainJet->MakeClass("test2");
causes a crash. The following patch solves the problem.
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/TSelectorDraw.cxx
File length: 41372 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/TSelectorDraw.cxx
File length: 39582 byte(s)
Diff to
previous 5895
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
5869 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jan 11 09:07:20 2003 UTC (12 years ago) by
brun
Original Path:
trunk/treeplayer/src/TSelectorDraw.cxx
File length: 40819 byte(s)
Diff to
previous 5866
From Philippe:
Looking at Maarten's problem I noticed that the G__var_array are not properly initialized.
In the attached patch I corrected the problem by calling memset on each of the structs.
I also noticed (running Maarten's example) that a few times, the start of an error message is printed but the ending
(which should come from G__genericerror) is not printed because G__const_noerror is set to 1. So in a couple of place I
preceded the printing of the start of the error message by if (0==G__const_noerror).
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.