Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TBufferMergerFile.cxx
Go to the documentation of this file.
1// @(#)root/io:$Id$
2// Author: Philippe Canal, Witold Pokorski, and Guilherme Amadio
3
4/*************************************************************************
5 * Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
13
14#include "TBufferFile.h"
15
16namespace ROOT {
17
19 : TMemFile(m.fMerger.GetOutputFile()->GetName(), "RECREATE", "",
20 m.fMerger.GetOutputFile()->GetCompressionSettings()),
21 fMerger(m)
22{
23}
24
26{
27}
28
29Int_t TBufferMergerFile::Write(const char *name, Int_t opt, Int_t bufsize)
30{
31 // Make sure the compression of the basket is done in the unlocked thread and
32 // not in the locked section.
33 if (!fMerger.GetNotrees())
35
36 // Merge using the live TTree.
37 fMerger.Merge(this);
39 return 0;
40}
41
42} // namespace ROOT
char name[80]
Definition TGX11.cxx:110
TBufferMergerFile()
TBufferMergerFile has no default constructor.
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) override
Write data into a TBufferFile and append it to TBufferMerger.
~TBufferMergerFile() override
Destructor.
TBufferMerger is a class to facilitate writing data in parallel from multiple threads,...
Bool_t GetNotrees() const
Returns whether the file has been marked as not containing any TTree objects and thus that steps that...
void Merge(TBufferMergerFile *memfile)
virtual Int_t Write(const char *=nullptr, Int_t=0, Int_t=0) override
Write this object to the current directory.
Definition TDirectory.h:264
A TMemFile is like a normal TFile except that it reads and writes only from memory.
Definition TMemFile.h:19
void ResetAfterMerge(TFileMergeInfo *) override
Wipe all the data from the permanent buffer but keep, the in-memory object alive.
Definition TMemFile.cxx:320
@ kOnlyPrepStep
Used to request that the class specific implementation of TObject::Write just prepare the objects to ...
Definition TObject.h:106
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
TMarker m
Definition textangle.C:8