39 fBranchVector.reserve( 25 );
139 BranchMap_t::iterator brIter;
141 (*brIter).second.fPointers->clear();
142 delete (*brIter).second.fPointers;
153 TList persistentBranches;
156 while( (branch = (
TBranch*)iB()) )
157 persistentBranches.
Add(branch);
158 persistentBranches.
Browse( b );
167 BranchMap_t::iterator brIter;
169 (*brIter).second.fPointers->clear();
181 Int_t totalBytes = 0;
191 Error(
"Fill",
"The IO error while writing the indices!");
204 Error(
"Fill",
"The IO error while writing the branch %s!", br->
GetName() );
237 std::vector<void*>* elPointers = 0;
243 Int_t totalBytes = 0;
247 for(
UInt_t i = 0; i < size; ++i ) {
270 std::string vectClName(
"vector<");
271 vectClName += actClass->
GetName() + std::string(
"*>");
274 Warning(
"Fill",
"Unable to find dictionary for class %s", vectClName.c_str() );
284 elPointers =
new std::vector<void*>();
305 brIter =
fBranchMap.insert(std::make_pair(actClass, bHelper ) ).first;
306 elBranch->
SetAddress( &((*brIter).second.fPointers) );
313 elPointers = (*brIter).second.fPointers;
314 elBranch = (*brIter).second.fBranch;
315 elID = (*brIter).second.fId;
316 elOffset = (*brIter).second.fBaseOffset;
323 elPointers->push_back( element + elOffset );
333 Error(
"Fill",
"The IO error while writing the indices!");
346 Error(
"Fill",
"The IO error while writing the branch %s!", br->
GetName() );
383 Error(
"GetEntry",
"No collection proxy!" );
392 Int_t totalBytes = 0;
400 Error(
"GetEntry",
"IO error! Unable to get the indices!" );
434 std::vector<void*>* elemVect = 0;
437 for(
Int_t i = 0; i < size; ++i ) {
454 if( index > nBranches ) {
455 Error(
"GetEntry",
"Index %d out of range, unable to find the branch, setting pointer to 0",
471 bytes = elemBranch->
GetEntry( entry, getall );
474 Error(
"GetEntry",
"No entry for index %d, setting pointer to 0", index );
481 Error(
"GetEntry",
"I/O error while getting entry for index %d, setting pointer to 0", index );
499 if (tmpClass && elClass) {
514 *element = ((
char*)(*elemVect)[
fBranchVector[index].fPosition++])
553 if (!expectedClass) {
558 Error(
"GetExpectedType",
"Did not find the type for %s",
GetName());
592 for(
Int_t i = -1; i < ninfos; ++i ) {
626 if (strncmp(option,
"debugAddress",strlen(
"debugAddress"))==0) {
635 Printf(
"%-16s %2d SplitCollPtr %-16s %-16s %8x %-16s n/a\n",
636 info ? info->
GetName() :
"StreamerInfo unvailable",
fID,
638 (branchOffset && parent && ind>=0) ? branchOffset[ind] : 0,
642 br->
Print(
"debugAddressSub");
644 }
else if (strncmp(option,
"debugInfo",strlen(
"debugInfo"))==0) {
651 subbranch->
Print(
"debugInfoSub");
Describe Streamer information for one class version.
virtual const char * GetName() const
Returns name of object.
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any. ...
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Check if we should be doing this at all.
TVirtualCollectionProxy * GetCollectionProxy()
Return the collection proxy describing the branch content, if any.
const char * GetTypeNameBasic() const
Return type name of this element in case the type name is not a standard basic type, return the basic type name known to CINT.
virtual void * Allocate(UInt_t n, Bool_t forceDelete)=0
TString fContName
Class name of referenced object.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual TClass * GetValueClass() const =0
ReadLeaves_t fReadLeaves
! Pointer to the ReadLeaves implementation to use.
TStreamerElement * GetElement(Int_t id) const
Bool_t TestBit(UInt_t f) const
Int_t * GetBranchOffset() const
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual void SetName(const char *name)
Set the name of the TNamed.
TBranch * GetSubBranch(const TBranch *br) const
Find the parent branch of child.
virtual Bool_t IsFolder() const
Branch declared folder if at least one entry.
virtual void SetFirstEntry(Long64_t entry)
set the first entry number (case of TBranchSTL)
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
virtual void Commit(void *)=0
Buffer base class used for serializing objects.
virtual TClass * GetCollectionClass() const
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
virtual void SetAddress(void *addobj)
Point this branch at an object.
virtual void * New() const
Int_t fNleaves
! Number of leaves
TStreamerInfo * fInfo
! The streamer info
Long64_t * fBasketSeek
[fMaxBaskets] Addresses of baskets on file
TObject * At(Int_t idx) const
virtual Int_t GetExpectedType(TClass *&clptr, EDataType &type)
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
void FillLeavesImpl(TBuffer &b)
Fill leaves.
Int_t * fBasketBytes
[fMaxBaskets] Length of baskets on file
Int_t fClassVersion
Version number of the class.
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
virtual TStreamerInfo * GetInfo() const
Check if we don't have the streamer info.
Int_t fID
Element serial number in the streamer info.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
virtual void SetAddress(void *addr)
We are the top level branch.
void ClearAndResize(UInt_t size)
TClass * fIndArrayCl
! Class of the ind array
UInt_t fClCheckSum
Class checksum.
const Int_t kDoNotProcess
TObjArray * GetListOfBranches()
Int_t fMaxBaskets
Maximum number of Baskets so far.
virtual void ls(Option_t *option="") const
Print the content of the element.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of a BranchElement and return total number of bytes.
const TObjArray * GetStreamerInfos() const
virtual ~TBranchSTL()
Destructor.
TString fClassName
Name of the parent class, if we're the data member.
Int_t fSplitLevel
Branch split level.
virtual Int_t Fill()
Loop on all leaves of this branch to fill Basket buffer.
Using a TBrowser one can browse all ROOT objects.
virtual void Print(Option_t *) const
Print the branch parameters.
void(TBranch::* ReadLeaves_t)(TBuffer &b)
TClass * GetClass() const
Int_t fBasketSize
Initial Size of Basket Buffer.
TVirtualCollectionProxy * fCollProxy
! Collection proxy
TBranchSTL()
Default constructor.
TClass * GetActualClass(const void *object) const
Return a pointer the the real class of the object.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
FillLeaves_t fFillLeaves
! Pointer to the FillLeaves implementation to use.
Int_t GetEntriesFast() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
The ROOT global object gROOT contains a list of all defined classes.
BranchMap_t fBranchMap
! Branch map
A Branch for the case of an object.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TObject * UncheckedAt(Int_t i) const
void SetNumItems(UInt_t items)
std::vector< void * > * fPointers
TDirectory * GetDirectory() const
virtual Bool_t IsaPointer() const
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any. ...
Int_t IndexOf(const TObject *obj) const
virtual void * At(UInt_t idx)=0
char * fObject
! Pointer to object at address or the
void ReadLeavesImpl(TBuffer &b)
Read leaves.
TTree * fTree
! Pointer to Tree header
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
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.
TObjArray * GetElements() const
A Branch handling STL collection of pointers (vectors, lists, queues, sets and multisets) while stori...
virtual UInt_t Size() const =0
Int_t GetClassVersion() const
TBranch * fParent
! Parent of this branch
virtual void Print(Option_t *option="") const
Print branch parameters.
Long64_t * fBasketEntry
[fMaxBaskets] Table of first entry in each basket
virtual void Add(TObject *obj)
Bool_t IsVersioned() const
void(TBranch::* FillLeaves_t)(TBuffer &b)
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.
std::vector< ElementBranchHelper_t > fBranchVector
! Branch vector
A TTree object has a header with a name and a title.
virtual void Browse(TBrowser *b)
Browse a STL branch.
virtual Int_t Fill()
Cleanup after revious fill.
TObjArray fBranches
-> List of Branches of this branch
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
A TTree is a list of TBranches.
Abstract Interface class describing Streamer information for one class.
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)
Long64_t fFirstEntry
Number of the first entry in this branch.
TBranch * GetMother() const
Get our top-level parent branch in the tree.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual UInt_t GetCheckSum() const =0
const char * Data() const
char * fAddress
! Address of 1st leaf (variable or object)