137 BranchMap_t::iterator brIter;
139 (*brIter).second.fPointers->clear();
140 delete (*brIter).second.fPointers;
151 TList persistentBranches;
154 while( (branch = (
TBranch*)iB()) )
155 persistentBranches.
Add(branch);
156 persistentBranches.
Browse( b );
168 BranchMap_t::iterator brIter;
170 (*brIter).second.fPointers->clear();
181 Int_t totalBytes = 0;
190 Error(
"Fill",
"The IO error while writing the indices!");
202 Error(
"Fill",
"The IO error while writing the branch %s!", br->
GetName() );
232 std::vector<void*>* elPointers = 0;
238 Int_t totalBytes = 0;
242 for(
UInt_t i = 0; i < size; ++i ) {
263 std::string vectClName(
"vector<");
264 vectClName += actClass->
GetName() + std::string(
"*>");
267 Warning(
"Fill",
"Unable to find dictionary for class %s", vectClName.c_str() );
275 elPointers =
new std::vector<void*>();
297 brIter =
fBranchMap.insert(std::make_pair(actClass, bHelper ) ).first;
298 elBranch->
SetAddress( &((*brIter).second.fPointers) );
304 elPointers = (*brIter).second.fPointers;
305 elBranch = (*brIter).second.fBranch;
306 elID = (*brIter).second.fId;
307 elOffset = (*brIter).second.fBaseOffset;
313 elPointers->push_back( element + elOffset );
322 Error(
"Fill",
"The IO error while writing the indices!");
334 Error(
"Fill",
"The IO error while writing the branch %s!", br->
GetName() );
373 Error(
"GetEntry",
"No collection proxy!" );
381 Int_t totalBytes = 0;
389 Error(
"GetEntry",
"IO error! Unable to get the indices!" );
420 std::vector<void*>* elemVect = 0;
423 for(
Int_t i = 0; i < size; ++i ) {
438 if( index > nBranches ) {
439 Error(
"GetEntry",
"Index %d out of range, unable to find the branch, setting pointer to 0",
454 bytes = elemBranch->
GetEntry( entry, getall );
457 Error(
"GetEntry",
"No entry for index %d, setting pointer to 0", index );
464 Error(
"GetEntry",
"I/O error while getting entry for index %d, setting pointer to 0", index );
481 if (tmpClass && elClass) {
495 *element = ((
char*)(*elemVect)[
fBranchVector[index].fPosition++])
533 if (!expectedClass) {
538 Error(
"GetExpectedType",
"Did not find the type for %s",
GetName());
572 for(
Int_t i = -1; i < ninfos; ++i ) {
605 if (strncmp(option,
"debugAddress",strlen(
"debugAddress"))==0) {
614 Printf(
"%-16s %2d SplitCollPtr %-16s %-16s %8x %-16s n/a\n",
615 info ? info->
GetName() :
"StreamerInfo unvailable",
fID,
617 (branchOffset && parent && ind>=0) ? branchOffset[ind] : 0,
621 br->
Print(
"debugAddressSub");
623 }
else if (strncmp(option,
"debugInfo",strlen(
"debugInfo"))==0) {
630 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)
Get entry.
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 Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
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
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
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) 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
Get 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)
Set Address.
void ClearAndResize(UInt_t size)
TClass * fIndArrayCl
! Class of the ind array
UInt_t fClCheckSum
Class checksum.
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.
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 TBranch 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.
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Fill an STL branch.
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 an STL branch.
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)