Log of /trunk/core/base/src/TRef.cxx
Parent Directory
Revision
48798 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 1 21:04:47 2013 UTC (22 months, 3 weeks ago) by
pcanal
File length: 19662 byte(s)
Diff to
previous 43279
Import revision 48797 from the v5-34-00 patch branch:
Avoid silent failure when reaching the maximum amount of TRef. When a
TProcessID is full (has seen 16777215 objects), we switch to new one TProcessID
(maximum 65535 including the TProcessIDs read from file). TRefArray can not
switch to new TProcessID if they already contain objects.
Some of the new warning/errors:
Warning in <TRefArray::AddAtAndExpand>: The ProcessID for the 0x5f83819e8 has been switched to ProcessID4/6c89f37e-8259-11e2-9717-166ee183beef:4
Error in <TRefArray::AddAtAndExpand>: The object at %p can not be registered in the process the TRefArray points to (pid = ProcessID4/6c89f37e-8259-11e2-9717-166ee183beef) because the ProcessID has too many objects and the TRefArray already contains other objecs.
Warning in <TProcessID::AddProcessID>: Maximum number of TProcessID (65535) is almost reached (one left). TRef will stop being functional when the limit is reached.
....
Fatal in <TProcessID::AddProcessID>: Maximum number of TProcessID (65535) has been reached. TRef are not longer functional.
Revision
37932 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 2 01:03:21 2011 UTC (3 years, 11 months ago) by
pcanal
File length: 19499 byte(s)
Diff to
previous 37531
From Mike Marino:
Fix <http://savannah.cern.ch/bugs/?77570>
In void TRef::SetAction(const char *name) is an incorrect bit shift:
...
}
Int_t execid = 1 + fgExecs->IndexOf(exec);
SetBit(execid << 8);
}
Later use of this in GetObject reads the execid back as:
if (!obj) {
//execid in the first 8 bits
Int_t execid = TestBits(0xff0000);
if (execid > 0) {
execid = execid>>16;
TExec *exec = (TExec*)fgExecs->At(execid-1);
which will always shift the execid to 0.
The fix is:
SetBit(execid << 16);
Revision
37531 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 10 20:38:06 2010 UTC (4 years, 1 month ago) by
pcanal
File length: 19498 byte(s)
Diff to
previous 22961
Fix several memory leaks (TSchemaRuleSet, TClass, TFolder, stress, TStreamerInfo, TFile, TFree)
Introduce a new preprocessor symbol (R__COMPLETE_MEM_TERMINATION) that allows for
better tracking of memory leak. When ROOT is compiled with this symbols is defined,
globally held objects will be deleted at the time of the process termination.
With this symbol defined, some tests (root.exe -b -l -q ; test/stress ;) run under
'valgrind --leak-check=yes' with no memory leak reports (but still a few still
reacheable blocks). However, this does not yet support (i.e. segfault at termination)
the case where TFunctions are created on the 'CINT' stack (and thus fails roottest) and
some uses of CINT functions for fitting ... and probably also fails on Windows.
Revision
22961 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 3 13:32:57 2008 UTC (6 years, 9 months ago) by
rdm
File length: 19238 byte(s)
Diff to
previous 20877
move the directories:
base clib cont meta metautils newdelete pcre rint thread unix utils
winnt zip
under the new core meta directory.
Revision
17507 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 25 11:50:36 2007 UTC (8 years ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 19300 byte(s)
Diff to
previous 14336
-The inclusion of TFile.h, TStreamerInfo.h, TStreamerElement.h
has been removed.
-The code previously in TRef::SetAction has been moved to
TFileIO::SetRefAction.
-TRef::Streamer makes use of the new functions in TVirtualIO
With these changes TRef is now independent of the I/O sub-system.
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/base/src/TRef.cxx
File length: 19839 byte(s)
Diff to
previous 14054
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
14054 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 17 05:16:38 2006 UTC (8 years, 11 months ago) by
pcanal
Original Path:
trunk/base/src/TRef.cxx
File length: 19816 byte(s)
Diff to
previous 13300
From Axel:
---
Add support for auto-loading of TRefs from multiple TProcessIDs:
TRefTable now stores 2d arrays of branch numbers to load [PID][UID] (via
FillBuffer). The PID index <-> TProcessID-GUID mapping is stored via
TRefTable::Streamer (i.e. once per TTree). Lookup is cached. This change
is both backward and forward compatible, both concerning the interface
and .root files. Only exception is TRefTable::fParentIDs, which is now
only streamed via FillBuffer / ReadBuffer, not as a member of TRefTable.
Minor side-notes:
* Speed-up in TRef::GetObject de-referencing (only once call to
TProcessID::GetObjectWithID).
* No re-reading of a branch if it was already read for an event (if
TBranchRef's fReadEntry == branch-to-autoload's fReadEntry then don't
call GetEntry on it).
* Added getter for TProcessID::fgPIDs->Size()
* updated doc for TRef, TRefTable, TBranchRef, to reflect the current
status of auto-loading.
---
The only change that's breaking backward compatibility (as mentioned
above) is the clear split between per-entry and global streaming of the
TRefTable: there is no use in storing the fParentIDs[][] array (and
fN[]) as part of the TTree members - it should only be stored as part of
the TTree entry. So I've marked them as //!; they're made persistent in
TRefTable::FillBuffer.
The member TRefTable::fSize is only around to suppress a warning in the
schema evolution algorithm (it was a counter before, and the schema
evolution algo is unhappy about fSize missing in the new class
definition, nor does it appreciate fSize being marked as //!). This is
ugly, but I prefer it over a custom streamer.
The patch should fix the following issues:
* autoloading doesn't work because TRefs were created by different
processes,
* changed objects magically overwritten in memory due to re-loading of
referenced objects
Revision
12543 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 26 12:17:36 2005 UTC (9 years, 5 months ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 19622 byte(s)
Diff to
previous 12516
From Axel:
the static TRef::SetObject() works on TRef::fgObject, and is a misnomer
wrt TRef::GetObject(), which works on the referenced object. This patch
names the access to the referenced object GetObject(), while the access
to the static fgObject will be called Get/SetStaticObject(), where
GetStaticObject() is a new function.
TRef::SetObject is kept (for the time being) for back compatibility.
I did not implement TRef::SetObject(const TObject*) (as an alias to
operator=(const TObject*)) to ensure that this interface change will
result in a compiler error if the old TRef::SetObject (now
TRef::SetStaticObject) is used.
Also, TRef::GetObject() now sets fgObject to "this" before calling the
TExec, allowing the TExec to access the TRef's fUniqueID, so it can
determine which object needs to be dereferenced. I need this for storing
the documentation objects.
Docs and the tutorial GetWebHistogram are updated accordingly.
Revision
11001 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 28 05:45:41 2005 UTC (9 years, 11 months ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 18129 byte(s)
Diff to
previous 9831
From Philippe:
This patch solved a problem due to the fact that TObject's fUniqueID can
only hold a 8 bits ProccessID identifier (in addition to storing a 24 bits
object ID). However we support 65535 distinct ProcsssID identifiers per
file. Before this patch, for a file containing more than 255 distcint
ProcessID, the
TRef using the later ProcessID would be unable to find their references.
Specifically, fUniqueID can now store the ProcessID indentifier 0 through
254. When more identifiers
are used, then instead of store the identifier in the 8 higher bit of
fUniqueID we store in a table (TProcessID::fgObjPIDs) linking addresses to
pids.
Revision
9831 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 24 10:41:58 2004 UTC (10 years, 5 months ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 18125 byte(s)
Diff to
previous 8093
Improve the functionality of the TRefTable.
The new algorithm
-does not require a pointer to the TRefTable in TFile.
-can automatically load the branch of a Tree when calling TRef::GetObject
-works when writing/reading multiple Trees in parallel
Revision
5115 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 12 06:24:13 2002 UTC (12 years, 5 months ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 18126 byte(s)
Diff to
previous 5051
Fix by Bill Tanenbaum
TRef r(0) or TRef r = 0 leaves fPID uninitialized.
The simplest fix is just to add "fPID = 0" as the
first line of the TRef assignment operator that takes a TObject * as an
argument.
Revision
4865 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 9 21:15:39 2002 UTC (12 years, 6 months ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 17823 byte(s)
Diff to
previous 4723
Add new logic to be able to reference objects with a TUUID (eg TDirectory, TFile).
//
// Special case of a TRef pointing to an object with a TUUID
// ----------------------------------------------------------
// If the referenced object has a TUUID, its bit kHasUUID has been set.
// This case is detected by the TRef assignement operator.
// (For example, TFile and TDirectory have a TUUID)
// The TRef fPID points directly to the single object TProcessUUID (deriving
// from TProcessID) and managing the list of TUUIDs for a process.
// The TRef kAsUUID bit is set and its fUniqueID is set to the fUniqueID
// of the referenced object.
// When the TRef is streamed to a buffer, the corresponding TUUID is also
// streamed with the TRef. When a TRef is read from a buffer, the corresponding
// TUUID is also read and entered into the global list of TUUIDs (if not
// already there). The TRef fUniqueID is set to the UIIDNumber.
// see TProcessUUID for more details.
Revision
4282 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 1 17:19:13 2002 UTC (12 years, 9 months ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 15571 byte(s)
Diff to
previous 4238
Several changes in the handling of TRef to support the following use case:
An array of objects is written to a file but the TRefs
referencing these objects are not written to the file.
In a next session, these objects are read in memory
and new TRefs point to these objects and are written
to a separate file. In a third session both files
are connected.
To get this scenario working, one must use a dummy TRef
set to all objects that can be referenced in the next session.
Revision
3351 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Dec 2 15:20:07 2001 UTC (13 years, 1 month ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 14638 byte(s)
Diff to
previous 3331
Many changes/simplification of the TRef classes using the new functions
from TProcessID.
With this new version, it is possible to write a TRef to a new file
without writing the referenced object.
Implement assignement operator TRef& operator=(cont TRef &ref).
Revision
3283 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 22 18:10:01 2001 UTC (13 years, 2 months ago) by
brun
Original Path:
trunk/base/src/TRef.cxx
File length: 7748 byte(s)
Diff to
previous 3260
Important addition to the dictionary to support action on demand with TRef
and TRefArray. In this first implementation, only TRef is supported.
The description of this "Action on Demand" also called lazy instantiation
will be provided later in the TRef and TRefArray classes.
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.