60 Init(tree,0,name,pointer,basketsize,compress,splitlevel);
74 Init(0,parent,name,pointer,basketsize,compress,splitlevel);
82 if (tree==0 && parent!=0) tree = parent->
GetTree();
100 char* cpointer = (
char*) pointer;
101 char** ppointer = (
char**) pointer;
113 if (basketsize < 100) {
116 leaflist.
Form(
"%s_/I", name);
117 branchcount.
Form(
"%s_", name);
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++) {
386 void TBranchClones::Streamer(
TBuffer&
b)
409 for (
Int_t i = 0; i < nbranches; i++) {
418 Warning(
"Streamer",
"Unknown class: %s. Cannot read BranchClones: %s", fClassName.Data(),
GetName());
virtual const char * GetName() const
Returns name of object.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
TBranchClones()
Default and i/o constructor.
TStreamerInfo * BuildStreamerInfo(TClass *cl, void *pointer=0, Bool_t canOptimize=kTRUE)
Build StreamerInfo for class cl.
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
virtual void SetAddress(void *add)
Set address of this branch.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
virtual void SetAddress(void *add)
Set address of this branch.
Int_t fOffset
Offset of this branch.
TString fClassName
name of the class of the objets in the ClonesArray
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Long64_t fEntries
Number of entries.
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.
Long64_t fZipBytes
Total number of bytes in all leaves after compression.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches and return total number of bytes read.
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all branches and fill Basket buffer.
virtual void SetName(const char *name)
Set the name of the TNamed.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Int_t fRead
! flag = 1 if clonesarray has been read
TBranch * fBranchCount
Branch with clones count.
virtual void Import(TClonesArray *, Int_t)
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
TObject * At(Int_t idx) const
virtual ~TBranchClones()
Destructor.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Int_t fWriteBasket
Last basket number written.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
friend class TClonesArray
Long64_t fTotBytes
Total number of bytes in all leaves before compression.
virtual Double_t GetValue(Int_t i=0) const
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual void SetLen(Int_t len=1)
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
Long_t GetThisOffset() const
TDataType * GetDataType() const
Int_t fMaxBaskets
Maximum number of Baskets so far.
virtual void SetAddress(void *add=0)
virtual TFile * GetFile() const
Int_t fSplitLevel
Branch split level.
TBranch()
Default constructor. Used for I/O by default.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
virtual void Clear(Option_t *option="")
Clear the clones array.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
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.
Int_t fBasketSize
Initial Size of Basket Buffer.
Basic data type descriptor (datatype information is obtained from CINT).
TDataMember * GetDataMember() const
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.
Int_t GetEntriesFast() 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()
Int_t GetArrayDim() const
Return number of array dimensions.
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 SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
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.
TObject * UncheckedAt(Int_t i) 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).
TDirectory * GetDirectory() const
TList * GetListOfRealData() const
TTree * fTree
! Pointer to Tree header
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
TObjArray * GetListOfLeaves()
virtual void Reset(Option_t *option="")
Reset branch.
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
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.
Bool_t IsPersistent() const
TClass * GetClass() const
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...
TClonesArray * fList
! Pointer to the clonesarray
virtual void Reset(Option_t *option="")
Reset a Branch.
Long64_t fReadEntry
! Current entry number when reading
virtual void Browse(TBrowser *b)
Browse this branch.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
TBranch * fMother
! Pointer to top-level parent branch in the tree.
A TTree object has a header with a name and a title.
Int_t fEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Int_t fN
! Number of elements in ClonesArray
TObjArray fBranches
-> List of Branches of this branch
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
A TTree is a list of TBranches.
virtual const char * GetName() const
Returns name of object.
Int_t fCompress
Compression level and algorithm.
Bool_t IsaPointer() const
Return true if data member is a pointer.
virtual void Print(Option_t *option="") const
Print TBranch parameters.
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
TBranch * fParent
! Pointer to parent branch.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset branch after a merge.
TBranch * GetMother() const
Get our top-level parent branch in the tree.
A TLeaf for an Integer data type.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Int_t fNdataMax
! Maximum value of fN
Int_t GetCompressionSettings() const
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual void Print(Option_t *option="") const
Print branch parameters.
const char * Data() const
char * fAddress
! Address of 1st leaf (variable or object)