61 Init(
tree,0,
name,pointer,basketsize,compress,splitlevel);
75 Init(0,parent,
name,pointer,basketsize,compress,splitlevel);
92 if ((compress == -1) &&
tree->GetDirectory()) {
94 if (
tree->GetDirectory()) {
95 bfile =
tree->GetDirectory()->GetFile();
101 char* cpointer = (
char*) pointer;
102 char** ppointer = (
char**) pointer;
109 tree->BuildStreamerInfo(cl);
114 if (basketsize < 100) {
126 const char* itype = 0;
146 if (!std::strcmp(member->
GetName(),
"fBits")) {
149 if (!std::strcmp(member->
GetName(),
"fUniqueID")) {
163 }
else if (
type == 2) {
165 }
else if (
type == 3) {
167 }
else if (
type == 5) {
169 }
else if (
type == 8) {
171 }
else if (
type == 9) {
173 }
else if (
type == 11) {
175 }
else if (
type == 12) {
177 }
else if (
type == 13) {
181 leaflist.
Form(
"%s[%s]/%s", member->
GetName(), branchcount.
Data(), itype);
182 Int_t comp = compress;
184 TBranch* branch =
new TBranch(
this, branchname,
this, leaflist, basketsize, comp);
230 char** ppointer = (
char**)
fAddress;
243 for (i = 0; i < nbranches; i++) {
251 for (i = 0; i < nbranches; i++) {
256 nbytes += branch->
FillImpl(imtHelper);
284 for (
Int_t i = 0; i < nbranches; i++) {
292 for (
Int_t i = 0; i < nbranches; i++) {
294 nbytes += branch->
GetEntry(entry, getall);
307 for (
Int_t i = 0; i < nbranches; i++) {
309 branch->
Print(option);
325 for (
Int_t i = 0; i < nbranches; i++) {
327 branch->
Reset(option);
344 for (
Int_t i = 0; i < nbranches; i++) {
359 if (pp && (*pp == 0)) {
378 for (
Int_t i = 0; i < nbranches; i++) {
387void TBranchClones::Streamer(
TBuffer&
b)
391 b.ReadVersion(&R__s, &R__c);
410 for (
Int_t i = 0; i < nbranches; i++) {
449 b.CheckByteCount(R__s, R__c, TBranchClones::IsA());
451 R__c =
b.WriteVersion(TBranchClones::IsA(),
kTRUE);
466 b.SetByteCount(R__c,
kTRUE);
A helper class for managing IMT work during TTree:Fill operations.
A Branch for the case of an array of clone objects.
TClonesArray * fList
! Pointer to the clonesarray
TBranch * fBranchCount
Branch with clones count.
Int_t fN
! Number of elements in ClonesArray
virtual void SetAddress(void *add)
Set address of this branch.
virtual void Browse(TBrowser *b)
Browse this branch.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Int_t fRead
! flag = 1 if clonesarray has been read
virtual ~TBranchClones()
Destructor.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset branch after a merge.
TString fClassName
Name of the class of the objets in the ClonesArray.
TBranchClones()
Default and i/o constructor.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches and return total number of bytes read.
virtual void SetBasketSize(Int_t buffsize)
Reset basket size for all sub-branches.
void Init(TTree *tree, TBranch *parent, const char *name, void *clonesaddress, Int_t basketsize=32000, Int_t compress=-1, Int_t splitlevel=1)
Initialization (non-virtual, to be called from constructor).
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all branches and fill Basket buffer.
virtual void Print(Option_t *option="") const
Print branch parameters.
Int_t fNdataMax
! Maximum value of fN
virtual void Reset(Option_t *option="")
Reset branch.
A TTree is a list of TBranches.
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Int_t fEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
TBranch()
Default constructor. Used for I/O by default.
Int_t fMaxBaskets
Maximum number of Baskets so far.
Long64_t fTotBytes
Total number of bytes in all leaves before compression.
@ kIsClone
To indicate a TBranchClones.
@ kDoNotProcess
Active bit for branches.
char * fAddress
! Address of 1st leaf (variable or object)
Int_t fOffset
Offset of this branch.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
Long64_t fReadEntry
! Current entry number when reading
virtual void SetAddress(void *add)
Set address of this branch.
virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n)
Read all leaves of an entry and export buffers to real objects in a TClonesArray list.
Long64_t fZipBytes
Total number of bytes in all leaves after compression.
Int_t fSplitLevel
Branch split level.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
virtual void Print(Option_t *option="") const
Print TBranch parameters.
TObjArray fBranches
-> List of Branches of this branch
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
TBranch * fMother
! Pointer to top-level parent branch in the tree.
TBranch * fParent
! Pointer to parent branch.
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
Int_t fWriteBasket
Last basket number written.
TObjArray * GetListOfLeaves()
Int_t fBasketSize
Initial Size of Basket Buffer.
virtual void Reset(Option_t *option="")
Reset a Branch.
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Int_t fCompress
Compression level and algorithm.
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
Long64_t fEntries
Number of entries.
TTree * fTree
! Pointer to Tree header
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
TList * GetListOfRealData() const
Bool_t CanIgnoreTObjectStreamer()
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
An array of clone (identical) objects.
virtual void ExpandCreateFast(Int_t n)
Expand or shrink the array to n elements and create the clone objects by calling their default ctor.
TClass * GetClass() const
virtual void Clear(Option_t *option="")
Clear the clones array.
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
All ROOT classes may have RTTI (run time type identification) support added.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
Bool_t IsPersistent() const
Int_t GetArrayDim() const
Return number of array dimensions.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Bool_t IsaPointer() const
Return true if data member is a pointer.
TDataType * GetDataType() const
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Basic data type descriptor (datatype information is obtained from CINT).
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Int_t GetCompressionSettings() const
A TLeaf for an Integer data type.
virtual void SetMaximum(Int_t max)
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual Double_t GetValue(Int_t i=0) const
virtual void SetLen(Int_t len=1)
virtual void SetAddress(void *add=0)
virtual void SetOffset(Int_t offset=0)
virtual void SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
virtual void Import(TClonesArray *, Int_t)
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntriesFast() const
TObject * UncheckedAt(Int_t i) const
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
TObject * At(Int_t idx) const
friend class TClonesArray
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
The TRealData class manages the effective list of all data members for a given class.
TDataMember * GetDataMember() const
virtual const char * GetName() const
Returns name of object.
Long_t GetThisOffset() const
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
A TTree represents a columnar dataset.
TDirectory * GetDirectory() const