Log of /trunk/io/io/src/TDirectoryFile.cxx
Parent Directory
Revision
49050 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:57:43 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49049
Import revision 49009 from the v5-34-00 patch branch:
Implement the implicit rule for matching pair (based on being able to convert their content
Revision
49049 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:57:22 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49048
Import revision 49008 from the v5-34-00 patch branch:
std::pair also have implicit rules, so always craete a SchemaRuleSet
Revision
49046 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:56:15 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49045
Import revision 49005 from the v5-34-00 patch branch:
When switching STL collection proxy we also need to update fSTLtype
Revision
49045 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:55:53 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49044
Import revision 49004 from the v5-34-00 patch branch:
Fix conversion to from any type of numerical collection to associative type of numerical collection
Revision
49044 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:55:32 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49043
Import revision 49003 from the v5-34-00 patch branch:
Allow the implicit conversion from any type of numerical STL collection to any other type of numerical STL collection (e.g. vector<int> to list<float>)
Revision
49043 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:55:11 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49042
Import revision 49002 from the v5-34-00 patch branch:
Fix conversion to from any type of numerical collection to any type of numerical collection
Revision
49042 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:54:49 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49041
Import revision 49001 from the v5-34-00 patch branch:
Implement convertion to any type of numeric STL in the collection streamer
Revision
49041 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:54:29 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49040
Import revision 49000 from the v5-34-00 patch branch:
Remove use of data member fOnFileClass as much as possible (improve thread safety). Improve const-correctness
Revision
49040 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:53:59 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49039
Import revision 48999 from the v5-34-00 patch branch:
In SetBranchAddress, use the result of CheckBranchAddressType to decide whether to actually use the address or not. This avoid mis-using the user's pointer (but also might make invalid/awkward code fails). To prevent the check (and hence for the use a pointer no matter what), the user needs to cast the pointer to a void*.
Revision
49039 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:53:37 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49038
Import revision 48998 from the v5-34-00 patch branch:
Properly handle the evolution of an STL container containing a class with contains sub-object (don't claim the subobject also changed type)
Revision
49037 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:52:52 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49036
Import revision 48996 from the v5-34-00 patch branch:
In the MakeClass reading code when failing over to using the StreamerInfo, switch to using the action sequence
Revision
49036 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:52:30 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49035
Import revision 48995 from the v5-34-00 patch branch:
Compile the code for the conversion actions for generic collection
Revision
49032 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:50:54 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49031
Import revision 48986 from the v5-34-00 patch branch:
Extend the output of TTree::Print(debugInfo) to include the action sequence information (and add support for the sub option 'func' that also prints the function's (mangled) name
Revision
49031 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:50:32 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49030
Import revision 48984 from the v5-34-00 patch branch:
When printing a TActionSequence also print (on linux/macos) the symbol of the function that will be executed (when the option 'func') is passed.
Revision
49030 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:50:08 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49029
Import revision 48983 from the v5-34-00 patch branch:
In TTree::CheckBranchAddressType properly recognize and record that the user has requested a (valid) translation from one STL container to the other
Revision
49029 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:49:46 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49028
Import revision 48982 from the v5-34-00 patch branch:
Add support for implicit conversion of stl collection (when they require schema evolution)
Revision
49028 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:49:24 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49027
Import revision 48981 from the v5-34-00 patch branch:
In GetConversionStreamerInfo, make sure that we find always find at least one StreamerInfo for an stl collection
Revision
49027 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:49:02 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49026
Import revision 48980 from the v5-34-00 patch branch:
A TClassRef must be changed by operator= even if its ClassPtr has not yet been initialized!
Revision
49026 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:48:39 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49025
Import revision 48963 from the v5-34-00 patch branch:
Record the consumption of a function arguments and closing paranthesis to avoid adding them a second time later on
Revision
49025 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:48:19 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49024
Import revision 48959 from the v5-34-00 patch branch:
Fix the spacing error introduce by last minutes code reformating ...
Revision
49024 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:47:57 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49023
Import revision 48954 from the v5-34-00 patch branch:
Be more specific in the error message when not knowing what the type passed to SetBranchAddress
Revision
49021 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:46:42 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49020
Import revision 48944 from the v5-34-00 patch branch:
In TTree::SetBranchAddress, properly reset the TargetClass when the address is changed (back) to the original type.
Issue an error message if the class type of the argument to TTree::SetBranchAddress can not be determined (missing dictionary but having only a typeid).
Revision
49020 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:46:19 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49019
Import revision 48943 from the v5-34-00 patch branch:
Improve performance of reading a branch with an std::list<int> by 25%
by migrating to using the StreamerInfoAction and by implementing
the access to iterator (creation, copy, increment, delete) via
template function (rather than reallying on the slow mechanism
using 'At' (and its use of the fEnv) ...)
Revision
49019 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:18:33 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49018
Import revision 48931 from the v5-34-00 patch branch:
Add the concept of implicit rules to (centrally) support automatic translation of
STL collection from numeric type to other numeric type or for when the contained
class has some rules. Currently enabled only when the target is an std::vector.
Implement the transformation from STL container of numeric to any other numeric
type (both in TGenCollectionStreamer and TStreamerInfo[Actions]).
Migrate more of the conversions to TStreamerInfoActions.
Fix the Conversion of a Double32 or Float16 inside a collection of object to another
type (the previous implemetation was not supporting the customization of the factor
nor the number of bits).
Add TBuffer::ReadFastArrayWithNbits and WithFactor for use in the StreamerInfo Actions.
TStreamerInfoActions:
Introduce WithFactorMarker and NoFactorMarker to allow for less code duplicaton when
supporting Float16_t and Double32_t.
Replace the collection-memberwise action from loop over simple operation to using
ReadFastArray (to be compatible with TBufferXML).
Revision
49018 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:17:38 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49017
Import revision 48922 from the v5-34-00 patch branch:
Remove inadvertent match between 2 unrelated STL collection containing objects
Revision
49017 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:17:11 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49016
Import revision 48921 from the v5-34-00 patch branch:
Improve performace of reading a vector of non-class type by 25% (i.e. std::vector<int>).
The code to apply the same improvement to other container type is in place but is not
enabled yet as the 'better' solution avoid creating a temporary array to read in the
value via Read[Fast]Array, however the avoid the call to Read[Fast]Array breaks
the XML streaming (which uses Read[Fast]Array to insert the <Array> tag around the
element). See for example VectorLooper::ReadCollectionBool ...
Revision
49015 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:16:15 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 49014
Import revision 48911 from the v5-34-00 patch branch:
Add the Action function for trivial conversion.
Refactor the creation of the ConfiguredAction for collection (using 3 classes with function templates) that are used in the unique generator functions. This reduces code duplication.
Revision
48774 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 28 20:30:46 2013 UTC (22 months, 3 weeks ago) by
pcanal
File length: 67460 byte(s)
Diff to
previous 48062
Import revision 48773 from the v5-34-00 patch branch:
In GetDirectory instead of loading the object and then check the type is correct, use GetObject to check before hand.
Revision
47898 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Dec 6 19:14:22 2012 UTC (2 years, 1 month ago) by
pcanal
File length: 67785 byte(s)
Diff to
previous 46719
// Delete our content before we become somewhat invalid
// since some those objects (TTree for example) needs information
// from this object. Note that on some platform after the end
// of the body (i.e. thus during ~TDirectory which is also
// contains this code) the exeuction of 'this->GetFile()' fails
// to return the 'proper' value (because it uses the wrong
// virtual function).
Revision
44507 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by
axel
File length: 67144 byte(s)
Diff to
previous 43952
Remove
using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.
Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.
Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.
Revision
41102 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 3 21:42:02 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 66898 byte(s)
Diff to
previous 41092
Undo the synchronization of gFile was invalidating existing user code (even if the code is somewhat).
Use cases includes wanting to retains (and return to) the last file before a function call modifies
gDirectory and/or force return to the top level directory of the last 'current' file no matter what
gDirectory is ....
Make sure to avoid unnecessary warning about missing dictionary for a transient member even if
the member's type is an stl collection (containing object for which we don't have the dictionary).
Revision
41092 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 3 07:30:06 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 66599 byte(s)
Diff to
previous 39611
Whenever a thread has an associated TThread object, the value of gDirectory is now
thread local, i.e. all modifications direct or indirect of gDirectory will not be
seen by the other thread. In particular this means that several I/O operations
(including TDirectory::Write) are now thread safe (<b>as long as all the required
TClass and TStreamerInfo has been previously setup</b>).
This model does <b>not</b> support sharing TFile amongst threads (i.e. a TFile
must be accessed from exactly <b>one</b> thread). This means that whenever a TFile's
control is <i>passed</i> from a thread to another, the code must explicitly reset
gDirectory to another value or there is a risk for this gDirectory to point to a
stale pointer if the other thread deletes the TFile object. A TFile deletion will
only affect the value of the local gDirectory.
Note: gFile now always returns the file of the current directory or zero if the
current directory is not a TDirectoryFile. In particular this means that gFile
itself is now read-only and can not be modified directly.
The global values gDirectory and gFile are now all accessed via a static function
of their respective class. The access is made transparent via a CPP macro.
gPad, gVirtualX and gInterpreter are now accessible even when their value
is zero and they now properly support tab completion. (and the same technique is used
for gDirectory and gPad).
Revision
39611 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 8 19:35:17 2011 UTC (3 years, 7 months ago) by
pcanal
File length: 66632 byte(s)
Diff to
previous 37531
Introduce TMemFile and update TFileMerger to support incremental merges.
Add new tutorials ( net/treeClient.C + net/fastMergeServer.C )
demonstrating how a TMemFile can be used to do parallel merge
from many client. ( TMemFile still needs to be better integrated
with TMessage and TSocket).
The new TMemFile class support the TFile interface but only store
the information in memory. This version is limited to 32MB.
TMessage mess;
...
mess->ReadFastArray(scratch,length);
transient = new TMemFile("hsimple.memroot",scratch,length);
will copy the content of 'scratch' into the in-memory buffer
created by/for the TMemFile.
TMemFile *file = new TMemFile("hsimple.memroot","RECREATE");
Will create an empty in-memory of (currently fixed) size 32MB.
file->ResetAfterMerge(0);
Will reset the objects in the TDirectory list of objects
so that they are ready for more data accumulations (i.e.
returns the data to 0 but keep the customizations).
Introduce the new function TFileMerger::IncrementalMerge will
will Merge the list of file _with_ the content of the output
file (if any). This allows make several successive Merge
into the same TFile object.
Introduce non-static version of TFile::Cp allows the copy of
an existing TFile object.
Introduce new explicit interface for providing reseting
capability after a merge. If a class has a method with
the name and signature:
void ResetAfterMerge(TFileMergeInfo*);
it will be used by a TMemFile to reset its objects after
a merge operation has been done.
If this method does not exist, the TClass will use
a method with the name and signature:
void Reset(Optiont_t *);
TClass now provides a quick access to these merging
function via TClass::GetResetAfterMerge. The wrapper function
is automatically created by rootcint and can be installed
via TClass::SetResetAfterMerge. The wrapper function should have
the signature/type ROOT::ResetAfterMergeFunc_t:
void (*)(void *thisobj, TFileMergeInfo*);
ResetAfterMerge functions were added to the following classes:
TDirectoryFile, TMemFile, TTree, TChain, TBranch, TBranhcElement,
TBranchClones, TBranchObject and TBranchRef.
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: 64746 byte(s)
Diff to
previous 36409
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
36408 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 22 09:21:49 2010 UTC (4 years, 3 months ago) by
brun
File length: 64646 byte(s)
Diff to
previous 35475
In the mkdir functions, one can now create a tree of sub-directories
// Create a sub-directory and return a pointer to the created directory.
// Returns 0 in case of error.
// Returns 0 if a directory with the same name already exists.
// Note that the directory name may be of the form "a/b/c" to create a hierarchy of directories.
// In this case, the function returns the pointer to the "a" directory if teh operation is successful.
Revision
33964 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 17 13:28:26 2010 UTC (4 years, 7 months ago) by
rdm
File length: 63862 byte(s)
Diff to
previous 33842
From Bertrand:
Fix nasty side effect introduced (not by me) while fixing coverity reports
(it was not possible to browse ROOT files anymore).
Revision
32586 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 12 14:00:16 2010 UTC (4 years, 10 months ago) by
pcanal
File length: 63890 byte(s)
Diff to
previous 31513
Implement polymorphism for Emulated object (still not supporting polymorphism
of Emulated Object inheriting from compiled class).
This avoids memory leaks when the user data model relies on polymorphism
(and we are not using the library) and avoid splicing if the data is copied.
Details:
TStreamerInfo::New inserts the address of the creating TStreamerInfo into
the object. This address is inserted in each emulated that does not inherit
from an emulated class and is positioned after all the base classes (which
are compiled classes). A derived class will set this value inside each
of its emulated base class.
TStreamerInfo::Destruct and the new method TStreamerInfo::GetActualClass
use this information to detect the TStreamerInfo actually used to create
the object and hence run the proper emulated destructor.
In TFormLeafInfo which an issue where a data member which is an STL
container was not properly found.
Revision
27600 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 25 08:17:22 2009 UTC (5 years, 10 months ago) by
brun
File length: 63030 byte(s)
Diff to
previous 24013
From Matthew Strait:
* Fix spelling and grammar errors
* Fold long lines so they don't spill off the right side
* Add spaces for readability
* Standardize notation and style within sections.
Revision
24013 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon May 26 12:07:40 2008 UTC (6 years, 8 months ago) by
brun
File length: 63028 byte(s)
Diff to
previous 23122
Add an optional argument Bool_t forceRead to TDirectory::ReadKeys.
When this argument is called with kFALSE, ReadKeys assume that the TKey members
have already been read before this call.
Revision
22992 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Apr 5 09:43:01 2008 UTC (6 years, 9 months ago) by
pcanal
Original Path:
trunk/io/src/TDirectoryFile.cxx
File length: 62717 byte(s)
Diff to
previous 22971
Use the DirectoryAutoAdd facility for the classes:
TTree, TH1, TEventList, TEntryList, TGraph2D
(and hence their derived classes).
The instances of those classes are now added automatically
to the current directory only when Constructe'd with arguments or Clone'd
and to the directory they are read from when their are stored
directly in a TKey. [Note: the default constructor never adds
the object to the current directory]
The directory auto add can still be disabled for instance
of TH1 and TGraph2D by setting TH1::AddDirectory.
Additionally one can disable the directory auto add for
a specific class by doing:
TClass::GetClass("myclass")->SetDirectoryAutoAdd(0)
However you might want to also be able to restore the
behavior in which case you ought to do:
TClass *cl = TClass::GetClass("myclass");
ROOT::DirAutoAdd_t func = cl->GetDirectoryAutoAdd();
cl->SetDirectoryAutoAdd(0);
TROOT::ReadingObject is marked as deprecated.. It is still
set (as it was) but is no longer used by the above mention
classes.
NOTE: One side effect of this change, is that instnace
of TTree, TH1, TEventList, TEntryList, TGraph2D that are
retrieved from a TMessage (i.e. from a socket) no longer
auto register themselves to the current ROOT directory.
Add a new optional parameter to TDirectory::Append: 'replace'
If replace is true (the default is false), the Append will
first remove from the directory any existing object and
print the message:
Replacing existing OldClass: thename (Potential memory leak).
Add a new option parameter to TDirectory::CloneObject: 'autoadd'
If autoadd is true (the default), CloneObject will call the
object 'DirectoryAutoAdd' function (if any)
In TDirectory::CloneObject add support for multiple inheritance
from TObject where TObject is not the left most base class.
Fix memory leak in TGraph2D::operator= (and add TGraph2D::Clear)
Cleanup some documentation
Revision
19668 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 22 19:48:29 2007 UTC (7 years, 5 months ago) by
brun
Original Path:
trunk/io/src/TDirectoryFile.cxx
File length: 61764 byte(s)
Diff to
previous 19168
From Philippe:
Add Warning messages in case object.Write is called and there is no directory/file to write. The warnings are illustrated by the following example session:
root [0] n = new TNamed("myname","my title")
(class TNamed*)0x956340
root [1] n->Write()
Error in <TROOT::WriteTObject>: The current directory (Rint) is not
associated with a file. The object (myname) has not been written.
(Int_t)(0)
root [2] gDirectory = 0;
root [3] n->Write()
Error in <TNamed::Write>: The current directory (gDirectory) is null. The
object (myname) has not been written.
(Int_t)(0)
root [4] .q
Revision
18672 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 4 22:15:36 2007 UTC (7 years, 8 months ago) by
pcanal
Original Path:
trunk/io/src/TDirectoryFile.cxx
File length: 61573 byte(s)
Diff to
previous 18128
Extend the functionality of TDirectory::TContext
The TContext objects will not longer cd back to a directory
that was deleted between creation and their deletion.
For example:
f->cd();
{
TDirectory::TContext ctxt(0);
.... do something that change gDirectory.
delete f;
}
In the prevision implementation this lead to a f->cd() (i.e. core dump).
In the new implementation this leads to a gROOT->cd().
With this improvement we now strong recomment to switch code pattern
similar to:
TDirectory *cursav = gDirectory;
... do something that changes gDirectory;
if (cursav) cursav->cd();
(which also leads to a core if cursav is directly or indirectly deleted)
to
TDirectory::TContext ctxt(0);
... do something that changes gDirectory;
CVS ----------------------------------------------------------------------
Revision
18128 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 1 16:38:36 2007 UTC (7 years, 10 months ago) by
brun
Original Path:
trunk/io/src/TDirectoryFile.cxx
File length: 61522 byte(s)
Diff to
previous 17848
From Sergey Linev:
1. While name of the class is changed, one should use TDirectoryFile class instead of
TDirectory at the moment, then new directory object is created.
2. Appropriate change done in non-binary part of TDirectoryFile::Streamer() that old version of
class can be read.
Revision
17528 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 26 15:39:33 2007 UTC (7 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TDirectoryFile.cxx
File length: 57570 byte(s)
Diff to
previous 17420
Add the following new functions:
virtual Int_t ReadTObject(TObject *obj, const char *keyname);
virtual Int_t WriteTObject(const TObject *obj, const char *name=0, Option_t *option="");
Add an optional argument bufsize in the following functions
virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsize=0);
virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsize=0) const ;
virtual Int_t WriteObjectAny(const void *obj, const char *classname, const char *name, Option_t *option="", Int_t bufsize=0);
virtual Int_t WriteObjectAny(const void *obj, const TClass *cl, const char *name, Option_t *option="", Int_t bufsize=0);
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.