Log of /trunk/io/io/src/TFileMerger.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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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: 38531 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
48992 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 28 15:26:26 2013 UTC (21 months, 3 weeks ago) by
rdm
File length: 38531 byte(s)
Diff to
previous 48338
From Lifeng Sun:
The attached patchset fixes a bunch of typo in the source:
0001-succes-success.patch
0002-preceed-preced.patch
0003-informations-information.patch
0004-childs-children.patch
0005-avaliable-available.patch
0006-writeable-writable.patch
0007-comand-command.patch
0008-unkown-unknown.patch
0009-wierd-weird.patch
0010-wheter-whether.patch
0011-unecessary-unnecessary.patch
0012-splitted-split.patch
0013-registerd-registered.patch
0014-recieve-receive.patch
0015-processsing-processing.patch
0016-ouput-output.patch
0017-mutiple-multiple.patch
0018-lenght-length.patch
0019-interupted-interrupted.patch
0020-independant-independent.patch
0021-inconsistant-inconsistent.patch
0022-expresion-expression.patch
0023-explicitely-explicitly.patch
0024-enviroment-environment.patch
0025-deafult-default.patch
0026-continous-continuous.patch
0027-completly-completely.patch
0028-commited-committed.patch
0029-choosen-chosen.patch
0030-backgroud-background.patch
0031-auxilliary-auxiliary.patch
0032-authentification-authentication.patch
0033-appropiate-appropriate.patch
0034-an-other-another.patch
0035-environement-environment.patch
0036-targetting-targeting.patch
0037-suppported-supported.patch
0038-paramater-parameter.patch
Revision
48338 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 18 15:54:08 2013 UTC (2 years ago) by
pcanal
File length: 38532 byte(s)
Diff to
previous 48116
From Andrei:
Added possibility to merge only a list of objects/folders from the input files, specified by name via: TFileMerger::AddObjectNames(). One can merge only specified objects via TFileMerger::PartialMerge(default_flags | kOnlyListed), or skip them from merging via TFileMerger::PartialMerge(default_flags | kSkipListed). Example macro provided in tutorials/io/mergeSelective.C
This has also been added to the v5-34-00 patch branch.
Revision
48116 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 18 21:49:00 2012 UTC (2 years, 1 month ago) by
pcanal
File length: 37375 byte(s)
Diff to
previous 45190
Import revision 48115 from the trunk:
From Gerri:
modification of TFileMerger to cope with the problem in
https://savannah.cern.ch/bugs/index.php?99015
Basically, for non-mergeable objects the check on recurrent names is
skipped.
Also, before non-mergeable objects were written to output at once
by scanning all the open sources on the first occurence; this is
creating duplications once the check on the names is skipped. In this
patch I have commented out that part, so that non mergeable objects
are written out to file as they appear in the program flow.
Remove the warning:
Warning in <TFileMerger::MergeRecursive>: cannot merge object type (n:'namedObj', t:'namedObj') - Merge(TCollection *) not implemented
Revision
44533 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 4 16:50:44 2012 UTC (2 years, 7 months ago) by
pcanal
File length: 38371 byte(s)
Diff to
previous 44209
From Gerri and Bart Butler:
Improve efficiency of TFileMerger when merging a single file by doing a TFile::Cp rather than a load/write of the objects.
Revision
44177 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 8 15:18:42 2012 UTC (2 years, 8 months ago) by
rdm
File length: 37555 byte(s)
Diff to
previous 43590
From Gerri:
TFileMerger silently modifies gDirectory. This has weird consequences,
in particular people may have a null gDirectory after using TFileMerger.
This patch saves and restores the current gDirectory.
Revision
43588 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 30 16:33:07 2012 UTC (2 years, 9 months ago) by
pcanal
File length: 36620 byte(s)
Diff to
previous 43503
Renable inadvertently disabled (due to reverted if) warning about not being able to merge objects in TFileMerger and hadd
Revision
43473 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 23 23:24:31 2012 UTC (2 years, 10 months ago) by
pcanal
File length: 36503 byte(s)
Diff to
previous 41616
Fix hadd problem described in http://root.cern.ch/phpBB3/viewtopic.php?t=14396
where the incremental merging fails if the TTree are stored in sub-directories.
This is fixed by passing the incremental flag down the RecursiveMerge chain
and making sure the TDirectory of the output file are not deleted until the
end (since flushing them is also delayed until the end).
Also remove redundant 'if is-a-collection' test.
Revision
41447 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 18 09:52:45 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 35981 byte(s)
Diff to
previous 41444
If an object/class can not be merger, warn only if there is really a need to merge (i.e. the collection of files contains more than one object of this type and name
Revision
41444 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 18 09:36:59 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 35814 byte(s)
Diff to
previous 41428
Update hadd and TFileMerger so that they prefix all their information message
with their names (when running hadd, the TFileMerger message are prefixed by hadd):
$ hadd -v 0 -f output.root input1.root input2.root
$ hadd -v 1 -f output.root input1.root input2.root
hadd merged 2 input files in output.root.
$ hadd -v 2 -f output.root input1.root input2.root
hadd target file: output.root
hadd Source file 1: input1.root
hadd Source file 2: input2.root
hadd Target path: output.root:/
Revision
41424 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 17 18:58:44 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 35294 byte(s)
Diff to
previous 41408
Remove the switch of TH1::AddDirectory as it is not thread safe and in its current form is not an optimization (due to the soft dependency requirement)
Revision
41408 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Oct 16 21:28:45 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 35659 byte(s)
Diff to
previous 41394
Introduce the class TParallelMergingFile part of the net package. This class connect ot a parallel merge server
and upload its content every time Write is called on the file object. After the upload the object of classes
with a ResetAfterMerge function are reset.
A TParallelMergingFile is created whether a ?pmerge option is passed to TFile::Open as part of the file name.
For example:
TFile::Open("mergedClient.root?pmerge","RECREATE"); // For now contact localhost:1095
TFile::Open("mergedClient.root?pmerge=localhost:1095","RECREATE");
TFile::Open("rootd://root.cern.ch/files/output.root?pmerger=pcanal:password@locahost:1095","NEW")
tutorials/net/treeClient.C and fastMergeServer.C: update to follow the change in interfaces
Introduce the tutorials parallelMergerClient.C and the temporary tutorials parallelMergerServer.C
to demonstrate the parallel merging (with parallelMergerServer.C being the prototype of the upcoming
parallel merger server executable).
TKey:
Introduce a new constructor to copy a TKey from one file to another without unzipping nor unstreaming its content.
TFileMerger:
New method AddFile(TFile*) that appends the TFile to the list of file to be merged but does not delete it after
the merge operation.
Replace the method IncrementalMerge(Bool_t) with the method PartialMerge(Int_t) the argument defines the type
of merge as define by the bit values in EPartialMergeType:
// kRegular : normal merge, overwritting the output file
// kIncremental : merge the input file with the content of the output file (if already exising) (default)
// kAll : merge all type of objects (default)
// kResetable : merge only the objects with a MergeAfterReset member function.
// kNonResetable : merge only the objects without a MergeAfterReset member function.
Remove RecursiveMerge from the public interface.
rootcint.cxx:
Distinguish objects of classes that can explicitly be reset after a Merge operation and those that should not.
Only the object of classes with a method ResetAfterMerge will be Reset by TMemFile::ResetAfterMerge (previous
both object of classes with a ResetAfterMerge and those with a simple Reset method where reset).
Revision
41394 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 14 12:17:41 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 32754 byte(s)
Diff to
previous 41388
Fix hadd and TFileMerger when the number of files exceeds the number of available file descriptors
(and/or the user fixed limit). Previous, the resulting file was only containing the information
from the last batch of files! (The issue was introduced in revision 40569 (post v5.30) which was
adding support for merging more files than the maximum number of file descriptor).
Revision
41388 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 13 22:15:55 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 32306 byte(s)
Diff to
previous 41385
Clarify comment and variable name. Fix an issue introduced in r39365 where the TH1::AddDirectory was not restored after a merge if it been turned off by the user
Revision
40569 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 11 19:37:20 2011 UTC (3 years, 5 months ago) by
pcanal
File length: 31865 byte(s)
Diff to
previous 40477
Prevent TFileMerger (and hadd) from trying to open too many files.
Add a new member function TFileMerger::SetMaxOpenedFiles and
new command line option to hadd ( -n requested_max ) to allow
the user to reduce the number of files opened even further.
Revision
40463 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 4 18:59:52 2011 UTC (3 years, 5 months ago) by
pcanal
File length: 27299 byte(s)
Diff to
previous 39824
Properly handle the case where there is only one file in the list by calling Merge also in this case (for example this is necessary for TTree objects where otherwise only the meta data is copied)
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: 25118 byte(s)
Diff to
previous 39370
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
39365 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 24 19:53:19 2011 UTC (3 years, 8 months ago) by
pcanal
Original Path:
trunk/proof/proofplayer/src/TFileMerger.cxx
File length: 19859 byte(s)
Diff to
previous 39330
Remove hard dependencies of TFileMerger on TH1 and TTree.
(Soft dependencies still exist to be able to disable the
merging of TTrees and to be able to disable the AutoAdd
behavior of TH1).
Introduce new explicit interface for providing merging
capability. If a class has a method with the name and
signature:
Long64_t Merge(TCollection *input, TFileMergeInfo*);
it will be used by a TFileMerger to merge one or more
other objects into the current object. Merge should
return a negative value if the merging failed.
If this method does not exist, the TFileMerger will use
a method with the name and signature:
Long64_t Merge(TColletion *input);
TClass now provides a quick access to these merging
function via TClass::GetMerge. The wrapper function
is automatically created by rootcint and can be installed
via TClass::SetMerge. The wrapper function should have
the signature/type ROOT::MergeFunc_t:
Long64_t (*)(void *thisobj, TCollection *input, TFileMergeInfo*);
Added the new Merge function to TTree and THStack.
Also add the new Merge function to TQCommand as the
existing TQCommand::Merge does _not_ have the right
semantic (in part because TQCommand is a collection).
Fix the return value of TEfficiency::Merge
In TFileMerger, add a PrintLevel to allow hadd to request
more output than regular TFileMerger.
The object TFileMergeInfo can be used inside the Merge
function to pass information between runs of the Merge
(see below). In particular it contains:
TDirectory *fOutputDirectory; // Target directory where the merged object will be written.
Bool_t fIsFirst; // True if this is the first call to Merge for this series of object.
TString fOptions; // Additional text based option being passed down to customize the merge.
TObject *fUserData; // Place holder to pass extra information. This object will be deleted at the end of each series of objects.
The default in TFileMerger is to call Merge for every object
in the series (i.e the collection has exactly one element) in
order to save memory (by not having all the object in memory
at the same time).
However for histograms, the default is to first load all the
objects and then merge them in one go ; this is customizable
when creating the TFileMerger object.
Revision
31204 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 16 15:51:00 2009 UTC (5 years, 2 months ago) by
brun
Original Path:
trunk/proof/proofplayer/src/TFileMerger.cxx
File length: 16110 byte(s)
Diff to
previous 30052
From Andrei:
fixes a major leak when merging files with collections written using kSingleKey option. In the analysis framework we use this option to be able to recreate the output content of an analysis task on the client side.
The merger was reading each key in memory and deleted the object at the end, but the container is not owner by default, so all objects inside leaked.
Revision
30052 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 7 12:39:28 2009 UTC (5 years, 4 months ago) by
ganis
Original Path:
trunk/proof/proofplayer/src/TFileMerger.cxx
File length: 15854 byte(s)
Diff to
previous 29999
A few improvements on the way to make TFileMerger and hadd totally equivalent
(the goal being to use TFileMerger inside 'hadd'):
- import from hadd an optimization of key hashing
- import from hadd a better way to invoke Merge for generic objects
- add option to merge histograms in one go, instead of one-by-one as for generic
objects (this option is not yet supported by hadd).
The improvement for merging 10000 H1F with 100 bins is about a factor of 2.
Revision
28880 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 10 14:08:28 2009 UTC (5 years, 7 months ago) by
brun
Original Path:
trunk/proof/proofplayer/src/TFileMerger.cxx
File length: 14054 byte(s)
Diff to
previous 28860
From Andrei Gheata:
a fix for a leak in TFileMerger.cxx that affect all objects that have a custom Merge function. These were never deleted (except the first that contains the final merged info), causing huge leaks in case of files with collections inside. The patch:
- deletes all objects retrieved from file
- in case of collections, it calls collection->Delete() to clean-up also the components. This is of course not recursive so it still leaks in case of collections of collections (maybe a TCollection::SetOwnerRecursive() would help)
- changed a bit the merging sequence for objects with custom Merge(): instead of merging in one go and cleanup at the end, now the merging is done with one object only which is cleaned-up immediately after. That makes possible merging of huge files with lists inside.
Revision
28860 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 9 13:57:24 2009 UTC (5 years, 7 months ago) by
ganis
Original Path:
trunk/proof/proofplayer/src/TFileMerger.cxx
File length: 13718 byte(s)
Diff to
previous 28157
- Create directly the output file at the final destination do not make
a local copy in the temp directory first (if needed, one can always
set the temporary destination to temp followed by a TFile::Cp to the
final destination); this allows to avoid problems with small temp
partitions (see Forum).
- Remove usage of Form(...) and other cosmetic changes.
Revision
16217 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Sep 7 09:27:25 2006 UTC (8 years, 4 months ago) by
rdm
Original Path:
trunk/proofplayer/src/TFileMerger.cxx
File length: 12055 byte(s)
Diff to
previous 15859
From Gerri:
TPacketizer.cxx:
- Fix problem with object used after deletion (in print statement)
TProofServ.cxx:
- Send "start building" notification message before starting the build
(shows that something is happening ...)
TXNetFile.cxx, TFileMerger.cxx
- Make creation of missing path parts optional (Andreas' suggestion):
this can be set via the env "XNet.Mkpath" or on the fly adding "mkpath=1"
to the options ("mkpath=0" switches it 'off' if XNet.Mkpath sets if to 'on').
Revision
15626 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 29 22:15:37 2006 UTC (8 years, 6 months ago) by
rdm
Original Path:
trunk/proofplayer/src/TFileMerger.cxx
File length: 11528 byte(s)
Diff to
previous 15605
Several fixes in the new cache handling:
- TFile
- GetBytesWritten() includes also the number of bytes still in the
write cache
- New method FlushWriteCache()
- Call FlushWriteCache() also when closing files in raw mode
- Call FlushWriteCache() also in Flush()
- TFileCacheWrite:
- new method GetBytesInCache() returning bytes still in cache
used by TFile::GetBytesWritten()
- WriteBuffer() returns int iso bool, -1 write failure, 0 in case
recusively called and 1 in case copied in cache
- TFileCacheRead:
- ReadBuffer() returns int iso bool, -1 read failure, 0 in case not
in cache and 1 in case read from cache.
- TTreeCache:
- use int return type for ReadBuffer()
- TNetFile and TXNetFile:
- call FlushWriteCache() in their Flush().
Revision
15235 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 30 12:00:41 2006 UTC (8 years, 7 months ago) by
brun
Original Path:
trunk/proofplayer/src/TFileMerger.cxx
File length: 11528 byte(s)
Diff to
previous 15046
From Andreas Peters:
Remove a limitation in the ROOT TFileMerger Class. It was not able to
copy subfiles from ZIP archives. It copies by default always the complete
archive file. Therefore it does not recognize the downloaded files
as an ROOT file since it is a ZIP archive.
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/proofplayer/src/TFileMerger.cxx
File length: 11370 byte(s)
Diff to
previous 12013
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
11900 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Fri May 27 13:47:37 2005 UTC (9 years, 7 months ago) by
rdm
Original Path:
trunk/proofplayer/src/TFileMerger.cxx
File length: 10900 byte(s)
From Andreas Peters + me:
moved the file copy and merge API from TGrid to a stand-alone class
TFileMerger. This class allows for easy copying of two files using the
TFile plugins (i.e. it can copy from castor to dcap, or from xrootd to
chirp, etc.). It file merge functionality is taken from hadd. It is part
of libProof since that library is already linked with libHist and libTree.
To use it do, e.g.:
TFileMerger m
m->Cp("srcUrl", "destUrl")
or
m->AddFile("url1")
m->AddFile("url2")
m->Merge()
the AddFile() and Merge() use the Cp() to copy the file locally before
making the merge, and if the output file is remote the merged file
will be copied back to the remote destination.
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.