29 fCollProxy( nullptr ),
31 fIndArrayCl( nullptr ),
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() );
229 TClass* actClass =
nullptr;
230 TClass* vectClass =
nullptr;
231 char* element =
nullptr;
232 std::vector<void*>* elPointers =
nullptr;
238 Int_t totalBytes = 0;
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!" );
400 TClass* tmpClass =
nullptr;
419 void** element =
nullptr;
420 std::vector<void*>* elemVect =
nullptr;
438 if(
index > nBranches ) {
439 Error(
"GetEntry",
"Index %d out of range, unable to find the branch, setting pointer to 0",
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) {
521 expectedClass =
nullptr;
533 if (!expectedClass) {
538 Error(
"GetExpectedType",
"Did not find the type for %s",
GetName());
572 for(
Int_t i = -1; i < ninfos; ++i ) {
605 constexpr auto length = std::char_traits<char>::length;
606 if (strncmp(
option,
"debugAddress",
length(
"debugAddress"))==0) {
615 Printf(
"%-16s %2d SplitCollPtr %-16s %-16s %8x %-16s n/a\n",
616 info ? info->
GetName() :
"StreamerInfo unavailable",
fID,
618 (branchOffset && parent && ind>=0) ? branchOffset[ind] : 0,
622 br->
Print(
"debugAddressSub");
624 }
else if (strncmp(
option,
"debugInfo",
length(
"debugInfo"))==0) {
631 subbranch->
Print(
"debugInfoSub");
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t 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.
A Branch for the case of an object.
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.
A Branch handling STL collection of pointers (vectors, lists, queues, sets and multisets) while stori...
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.
A TTree is a list of TBranches.
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
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 SetNumItems(UInt_t items)
void ClearAndResize(UInt_t size)
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 * At(Int_t idx) const override
TObject * UncheckedAt(Int_t i) const
void Add(TObject *obj) override
R__ALWAYS_INLINE 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.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
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
TObjArray * GetElements() const override
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
A TTree represents a columnar dataset.
TDirectory * GetDirectory() const
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 void * New() const
Construct a new container object and return its address.
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 void Commit(void *)=0
Commits pending elements in a staging area (see Allocate() for more information).
virtual void * At(UInt_t idx)=0
Return the address of the value at index idx
virtual UInt_t Size() const =0
Return the current number of elements in the container.
virtual void * Allocate(UInt_t n, Bool_t forceDelete)=0
Allocates space for storing at least n elements.
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