58 Init(tree,0,name,pointer,basketsize,compress,splitlevel);
72 Init(0,parent,name,pointer,basketsize,compress,splitlevel);
80 if (tree==0 && parent!=0) tree = parent->
GetTree();
98 char* cpointer = (
char*) pointer;
99 char** ppointer = (
char**) pointer;
111 if (basketsize < 100) {
114 leaflist.
Form(
"%s_/I", name);
115 branchcount.
Form(
"%s_", name);
116 fBranchCount =
new TBranch(
this, branchcount, &
fN, leaflist, basketsize);
118 TLeaf* leafcount = (
TLeaf*) fBranchCount->GetListOfLeaves()->UncheckedAt(0);
123 const char* itype = 0;
143 if (!std::strcmp(member->
GetName(),
"fBits")) {
146 if (!std::strcmp(member->
GetName(),
"fUniqueID")) {
160 }
else if (type == 2) {
162 }
else if (type == 3) {
164 }
else if (type == 5) {
166 }
else if (type == 8) {
168 }
else if (type == 9) {
170 }
else if (type == 11) {
178 leaflist.
Form(
"%s[%s]/%s", member->
GetName(), branchcount.
Data(), itype);
179 Int_t comp = compress;
181 TBranch* branch =
new TBranch(
this, branchname,
this, leaflist, basketsize, comp);
227 char** ppointer = (
char**)
fAddress;
238 TLeafI* leafi = (
TLeafI*) fBranchCount->GetLeaf(branchcount);
240 for (i = 0; i < nbranches; i++) {
247 nbytes += fBranchCount->Fill();
248 for (i = 0; i < nbranches; i++) {
253 nbytes += branch->
Fill();
266 Int_t nbytes = fBranchCount->GetEntry(entry, getall);
267 TLeaf* leafcount = (
TLeaf*) fBranchCount->GetListOfLeaves()->UncheckedAt(0);
281 for (
Int_t i = 0; i < nbranches; i++) {
289 for (
Int_t i = 0; i < nbranches; i++) {
291 nbytes += branch->
GetEntry(entry, getall);
302 fBranchCount->Print(option);
304 for (
Int_t i = 0; i < nbranches; i++) {
306 branch->
Print(option);
322 for (
Int_t i = 0; i < nbranches; i++) {
324 branch->
Reset(option);
326 fBranchCount->Reset();
341 for (
Int_t i = 0; i < nbranches; i++) {
345 fBranchCount->ResetAfterMerge(info);
356 if (pp && (*pp == 0)) {
364 fBranchCount->SetAddress(&
fN);
375 for (
Int_t i = 0; i < nbranches; i++) {
384 void TBranchClones::Streamer(
TBuffer& b)
407 for (
Int_t i = 0; i < nbranches; i++) {
474 fBranchCount->UpdateFile();
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual Int_t Fill()
Loop on all branches and fill Basket buffer.
TStreamerInfo * BuildStreamerInfo(TClass *cl, void *pointer=0, Bool_t canOptimize=kTRUE)
Build StreamerInfo for class cl.
virtual void SetAddress(void *add)
Set address of this branch.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
TString fClassName
Maximum value of fN.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Long64_t fEntries
Pointer to the current basket.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
All ROOT classes may have RTTI (run time type identification) support added.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches and return total number of bytes read.
virtual void SetName(const char *name)
Change (i.e.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual void Print(Option_t *option="") const
Print TBranch parameters.
Buffer base class used for serializing objects.
Bool_t IsPersistent() const
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
Int_t fRead
Pointer to the clonesarray.
virtual void Import(TClonesArray *, Int_t)
TDataType * GetDataType() const
Bool_t IsaPointer() const
Return true if data member is a pointer.
Int_t GetEntriesFast() const
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
virtual ~TBranchClones()
Destructor.
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
TList * GetListOfRealData() const
const char * Data() const
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
friend class TClonesArray
virtual void SetLen(Int_t len=1)
const Int_t kDoNotProcess
virtual void SetAddress(void *add=0)
virtual Double_t GetValue(Int_t i=0) const
Int_t fSplitLevel
Number of baskets in memory.
virtual void Clear(Option_t *option="")
Clear the clones array.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
virtual TFile * GetFile() const
virtual Int_t Fill()
Loop on all leaves of this branch to fill Basket buffer.
TObject * UncheckedAt(Int_t i) const
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Using a TBrowser one can browse all ROOT objects.
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.
Basic data type descriptor (datatype information is obtained from CINT).
TDirectory * GetDirectory() const
TBranch * GetMother() const
Get our top-level parent branch in the tree.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual void SetBasketSize(Int_t buffsize)
Reset basket size for all sub-branches.
Bool_t TestBit(UInt_t f) const
The TRealData class manages the effective list of all data members for a given class.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
Bool_t CanIgnoreTObjectStreamer()
virtual const char * GetName() const
Returns name of object.
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
virtual void Print(Option_t *option="") const
Print branch parameters.
virtual void SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
Int_t GetCompressionSettings() const
virtual void SetOffset(Int_t offset=0)
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
virtual Int_t GetSize() const
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).
TClass * GetClass() const
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
TObjArray * GetListOfLeaves()
virtual void Reset(Option_t *option="")
Reset branch.
TDirectory * fDirectory
Address of 1st leaf (variable or object)
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.
Int_t GetArrayDim() const
Return number of array dimensions.
virtual void SetMaximum(Int_t max)
An array of clone (identical) objects.
A Branch for the case of an array of clone 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...
virtual void Reset(Option_t *option="")
Reset a Branch.
Long64_t fReadEntry
Current basket number when reading.
virtual void Browse(TBrowser *b)
Browse this branch.
TBranch * fMother
Pointer to Tree header.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
A TTree object has a header with a name and a title.
TDataMember * GetDataMember() const
Int_t fN
flag = 1 if clonesarray has been read
TObject * At(Int_t idx) const
A TTree is a list of TBranches.
Int_t fCompress
branch counter
Long_t GetThisOffset() const
virtual const char * GetName() const
Returns name of object.
TString fFileName
Pointer to directory where this branch buffers are stored.
TBranch * fParent
Pointer to top-level parent branch in the tree.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset branch after a merge.
A TLeaf for an Integer data type.
Int_t fNdataMax
Number of elements in ClonesArray.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
char * fAddress
Pointer to parent branch.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.