136 BranchMap_t::iterator brIter;
138 (*brIter).second.fPointers->clear();
139 delete (*brIter).second.fPointers;
150 TList persistentBranches;
153 while( (branch = (
TBranch*)iB()) )
154 persistentBranches.
Add(branch);
155 persistentBranches.
Browse(
b );
167 BranchMap_t::iterator brIter;
169 (*brIter).second.fPointers->clear();
180 Int_t totalBytes = 0;
185 fInd.SetNumItems( 0 );
189 Error(
"Fill",
"The IO error while writing the indices!");
201 Error(
"Fill",
"The IO error while writing the branch %s!", br->
GetName() );
228 TClass* actClass =
nullptr;
229 TClass* vectClass =
nullptr;
230 char* element =
nullptr;
231 std::vector<void*>* elPointers =
nullptr;
237 Int_t totalBytes = 0;
262 std::string vectClName(
"vector<");
263 vectClName += actClass->
GetName() + std::string(
"*>");
266 Warning(
"Fill",
"Unable to find dictionary for class %s", vectClName.c_str() );
274 elPointers =
new std::vector<void*>();
296 brIter =
fBranchMap.insert(std::make_pair(actClass, bHelper ) ).first;
297 elBranch->
SetAddress( &((*brIter).second.fPointers) );
303 elPointers = (*brIter).second.fPointers;
304 elBranch = (*brIter).second.fBranch;
305 elID = (*brIter).second.fId;
306 elOffset = (*brIter).second.fBaseOffset;
312 elPointers->push_back( element + elOffset );
321 Error(
"Fill",
"The IO error while writing the indices!");
333 Error(
"Fill",
"The IO error while writing the branch %s!", br->
GetName() );
366 Error(
"GetEntry",
"Dictionary class not found for: %s",
fContName.Data() );
372 Error(
"GetEntry",
"No collection proxy!" );
380 Int_t totalBytes = 0;
388 Error(
"GetEntry",
"IO error! Unable to get the indices!" );
399 TClass* tmpClass =
nullptr;
418 void** element =
nullptr;
419 std::vector<void*>* elemVect =
nullptr;
437 if( index > nBranches ) {
438 Error(
"GetEntry",
"Index %d out of range, unable to find the branch, setting pointer to 0",
453 bytes = elemBranch->
GetEntry( entry, getall );
456 Error(
"GetEntry",
"No entry for index %d, setting pointer to 0", index );
463 Error(
"GetEntry",
"I/O error while getting entry for index %d, setting pointer to 0", index );
480 if (tmpClass && elClass) {
494 *element = ((
char*)(*elemVect)[
fBranchVector[index].fPosition++])
520 expectedClass =
nullptr;
532 if (!expectedClass) {
537 Error(
"GetExpectedType",
"Did not find the type for %s",
GetName());
571 for(
Int_t i = -1; i < ninfos; ++i ) {
604 constexpr auto length = std::char_traits<char>::length;
605 if (strncmp(option,
"debugAddress",length(
"debugAddress"))==0) {
614 Printf(
"%-16s %2d SplitCollPtr %-16s %-16s %8x %-16s n/a\n",
615 info ? info->
GetName() :
"StreamerInfo unavailable",
fID,
617 (branchOffset && parent && ind>=0) ? branchOffset[ind] : 0,
621 br->
Print(
"debugAddressSub");
623 }
else if (strncmp(option,
"debugInfo",length(
"debugInfo"))==0) {
630 subbranch->
Print(
"debugInfoSub");
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
long long Long64_t
Portable signed long integer 8 bytes.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
A helper class for managing IMT work during TTree:Fill operations.
void Print(Option_t *option="") const override
Print TBranch parameters.
Int_t * GetBranchOffset() const
const char * GetClassName() const override
Return the name of the user class whose content is stored in this branch, if any.
TVirtualCollectionProxy * GetCollectionProxy()
Return the collection proxy describing the branch content, if any.
Int_t GetEntry(Long64_t entry=0, Int_t getall=0) override
Read all branches of a BranchElement and return total number of bytes.
void SetAddress(void *addobj) override
Point this branch at an object.
Int_t GetExpectedType(TClass *&clptr, EDataType &type) override
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
void Browse(TBrowser *b) override
Browse an STL branch.
~TBranchSTL() override
Destructor.
Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *) override
Fill an STL branch.
void ReadLeavesImpl(TBuffer &b)
Read leaves.
TClass * fIndArrayCl
! Class of the ind array
TBranchSTL()
Default constructor.
void FillLeavesImpl(TBuffer &b)
Fill leaves.
void Print(Option_t *="") const override
Print the branch parameters.
bool IsFolder() const override
Branch declared folder if at least one entry.
Int_t fClassVersion
Version number of the class.
TString fClassName
Name of the parent class, if we're the data member.
char * fObject
! Pointer to object at address or the
TBranch * fParent
! Parent of this branch
TString fContName
Class name of referenced object.
virtual TStreamerInfo * GetInfo() const
Get streamer info.
TStreamerInfo * fInfo
! The streamer info
Int_t fID
Element serial number in the streamer info.
UInt_t fClCheckSum
Class checksum.
TVirtualCollectionProxy * fCollProxy
! Collection proxy
Int_t GetEntry(Long64_t entry=0, Int_t getall=0) override
Get entry.
void SetAddress(void *addr) override
Set Address.
BranchMap_t fBranchMap
! Branch map
std::vector< ElementBranchHelper_t > fBranchVector
! Branch vector
const char * GetClassName() const override
Return the name of the user class whose content is stored in this branch, if any.
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header).
Int_t fMaxBaskets
Maximum number of Baskets so far.
FillLeaves_t fFillLeaves
! Pointer to the FillLeaves implementation to use.
void(TBranch::* ReadLeaves_t)(TBuffer &b)
@ kDoNotProcess
Active bit for branches.
char * fAddress
! Address of 1st leaf (variable or object)
TObjArray * GetListOfBranches()
Long64_t * fBasketEntry
[fMaxBaskets] Table of first entry in each basket
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
void Print(Option_t *option="") const override
Print TBranch parameters.
TBranch * GetSubBranch(const TBranch *br) const
Find the parent branch of child.
ReadLeaves_t fReadLeaves
! Pointer to the ReadLeaves implementation to use.
void(TBranch::* FillLeaves_t)(TBuffer &b)
Int_t fNleaves
! Number of leaves
Int_t fSplitLevel
Branch split level.
Int_t * fBasketBytes
[fMaxBaskets] Length of baskets on file
friend class TBranchElement
TObjArray fBranches
-> List of Branches of this branch
TBranch(const TBranch &)=delete
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
TBranch * fMother
! Pointer to top-level parent branch in the tree.
virtual void SetFirstEntry(Long64_t entry)
set the first entry number (case of TBranchSTL)
Long64_t * fBasketSeek
[fMaxBaskets] Addresses of baskets on file
Long64_t fFirstEntry
Number of the first entry in this branch.
Int_t fBasketSize
Initial Size of Basket Buffer.
Long64_t fEntryNumber
Current entry number (last one filled in this branch).
TBranch * GetMother() const
Get our top-level parent branch in the tree.
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
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.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
const TObjArray * GetStreamerInfos() const
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
Int_t GetBaseClassOffset(const TClass *toBase, void *address=nullptr, bool isDerivedObject=true)
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Bool_t IsVersioned() const
TClass * GetActualClass(const void *object) const
Return a pointer to the real class of the 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.
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
void Add(TObject *obj) override
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Int_t GetEntriesFast() const
Int_t IndexOf(const TObject *obj) const override
TObject * UncheckedAt(Int_t i) const
Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Describe one element (data member) to be Streamed.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element and updates fClassObject.
void ls(Option_t *option="") const override
Print the content of the element.
virtual Bool_t IsaPointer() const
const char * GetTypeNameBasic() const
Return type name of this element in case the type name is not a standard basic type,...
Describes a persistent version of a class.
Int_t GetClassVersion() const override
TStreamerElement * GetElement(Int_t id) const override
TClass * GetClass() const override
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
RAII helper class that ensures that PushProxy() / PopProxy() are called when entering / leaving a C++...
Defines a common interface to inspect/change the contents of an object that represents a collection.
virtual TClass * GetValueClass() const =0
If the value type is a user-defined class, return a pointer to the TClass representing the value type...
virtual TClass * GetCollectionClass() const
Return a pointer to the TClass representing the proxied container class.
Abstract Interface class describing Streamer information for one class.
virtual UInt_t GetCheckSum() const =0
std::vector< void * > * fPointers