60 Init(
tree,0,
name,pointer,basketsize,compress,splitlevel);
74 Init(0,parent,
name,pointer,basketsize,compress,splitlevel);
91 if ((compress == -1) &&
tree->GetDirectory()) {
93 if (
tree->GetDirectory()) {
94 bfile =
tree->GetDirectory()->GetFile();
100 char* cpointer = (
char*) pointer;
101 char** ppointer = (
char**) pointer;
108 tree->BuildStreamerInfo(cl);
113 if (basketsize < 100) {
125 const char* itype = 0;
145 if (!std::strcmp(member->
GetName(),
"fBits")) {
148 if (!std::strcmp(member->
GetName(),
"fUniqueID")) {
162 }
else if (
type == 2) {
164 }
else if (
type == 3) {
166 }
else if (
type == 5) {
168 }
else if (
type == 8) {
170 }
else if (
type == 9) {
172 }
else if (
type == 11) {
174 }
else if (
type == 12) {
176 }
else if (
type == 13) {
180 leaflist.
Form(
"%s[%s]/%s", member->
GetName(), branchcount.
Data(), itype);
181 Int_t comp = compress;
183 TBranch* branch =
new TBranch(
this, branchname,
this, leaflist, basketsize, comp);
229 char** ppointer = (
char**)
fAddress;
242 for (i = 0; i < nbranches; i++) {
250 for (i = 0; i < nbranches; i++) {
255 nbytes += branch->
FillImpl(imtHelper);
283 for (
Int_t i = 0; i < nbranches; i++) {
291 for (
Int_t i = 0; i < nbranches; i++) {
293 nbytes += branch->
GetEntry(entry, getall);
306 for (
Int_t i = 0; i < nbranches; i++) {
308 branch->
Print(option);
324 for (
Int_t i = 0; i < nbranches; i++) {
326 branch->
Reset(option);
343 for (
Int_t i = 0; i < nbranches; i++) {
358 if (pp && (*pp == 0)) {
377 for (
Int_t i = 0; i < nbranches; i++) {
386void TBranchClones::Streamer(
TBuffer&
b)
390 b.ReadVersion(&R__s, &R__c);
409 for (
Int_t i = 0; i < nbranches; i++) {
448 b.CheckByteCount(R__s, R__c, TBranchClones::IsA());
450 R__c =
b.WriteVersion(TBranchClones::IsA(),
kTRUE);
465 b.SetByteCount(R__c,
kTRUE);
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.
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