76std::list<TVirtualBranchBrowsable::MethodCreateListOfBrowsables_t>
90 Warning(
"TVirtualBranchBrowsable",
"branch is NULL!");
116 name.ReplaceAll(
".@",
"@.");
117 name.ReplaceAll(
"->@",
"@->");
121 Error(
"Browse",
"branch not set - might access wrong tree!");
123 }
else tree=
fBranch->GetTree();
124 tree->Draw(
name,
"",
b ?
b->GetDrawOption() :
"");
141 std::list<MethodCreateListOfBrowsables_t>::iterator
iGenerator;
180 if (
be->GetID()>=0 &&
be->GetInfo()
181 && (
be->GetID() <
be->GetInfo()->GetNelement())
182 &&
be->GetInfo()->IsCompiled()
183 && (
element=
be->GetInfo()->GetElement(
be->GetID()))) {
189 return element->GetClassPointer();
207 ::Warning(
"TVirtualBranchBrowsable::GetCollectionContainedType",
"Neither branch nor parent given!");
211 if (!
type)
return nullptr;
257 }
else if (
type->GetCollectionProxy()) {
413 if (
name.EndsWith(
" const"))
name.Remove(
name.Length()-6);
416 name=
m->GetPrototype();
417 if (
m->GetCommentString() &&
strlen(
m->GetCommentString()))
418 name.Append(
" // ").Append(
m->GetCommentString());
462 for(
int el = 0;
el <
info->GetElements()->GetEntries(); ++
el) {
530 long property =
m->Property();
532 if (
m->GetNargs() -
m->GetNargsOpt() == 0
535 &&
m->GetReturnTypeName()
536 &&
strcmp(
"void",
m->GetReturnTypeName())
561 if (!cl)
return true;
639 &&
const_cast<TBranch*
>(
branch)->GetListOfBranches()->GetEntries()!=0)
702 ::Error(
"TNonSplitBrowsable::GetBrowsables",
703 "Missing the StreamerInfo for the class \"%s\" for the branch \"%s\" in the TTree \"%s\".",
804 ::Warning(
"TCollectionPropertyBrowsable::GetBrowsables",
"Neither branch nor parent is set!");
834 ( (
clCollection->GetCollectionProxy()->GetValueClass()==
nullptr)
835 ||(
clCollection->GetCollectionProxy()->GetValueClass()->GetCollectionProxy()!=
nullptr
836 &&
clCollection->GetCollectionProxy()->GetValueClass()->GetCollectionProxy()->GetValueClass()==
nullptr)
853 scope+=
"@.GetEntries()";
854 else scope+=
"@.GetSize()";
941 std::list<MethodCreateListOfBrowsables_t>::iterator
iIsRegistered
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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 unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
const_iterator begin() const
const_iterator end() const
Each class (see TClass) has a linked list of its base class(es).
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
A Branch for the case of an object.
A Branch for the case of an object.
A TTree is a list of TBranches.
Using a TBrowser one can browse all ROOT objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
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,...
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
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.
An array of clone (identical) objects.
static void Register()
Wrapper for the registration method.
static Int_t GetBrowsables(TList &list, const TBranch *branch, const TVirtualBranchBrowsable *parent=nullptr)
This methods fills list with TMethodBrowsables for the branch's or parent's collection class and its ...
TCollectionMethodBrowsable(const TBranch *branch, TMethod *m, const TVirtualBranchBrowsable *parent=nullptr)
Constructor, see TMethodBrowsable's constructor.
static void Unregister()
Wrapper for the registration method.
A tiny browser helper object (and its generator) for adding a virtual (as in "not actually part of th...
static void Register()
Wrapper for the registration method.
TCollectionPropertyBrowsable(const char *name, const char *title, const char *draw, const TBranch *branch, const TVirtualBranchBrowsable *parent=nullptr)
constructor, which sets the name and title according to the parameters (and thus differently than our...
static Int_t GetBrowsables(TList &list, const TBranch *branch, const TVirtualBranchBrowsable *parent=nullptr)
If the element to browse (given by either parent of branch) contains a collection (TClonesArray or so...
static void Unregister()
Wrapper for the registration method.
const char * GetDraw() const
return the string passed to TTree::Draw
void Browse(TBrowser *b) override
Browses a TCollectionPropertyBrowsable.
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
All ROOT classes may have RTTI (run time type identification) support added.
A TLeaf for a general object derived from TObject.
TObject * GetObject() const
This helper object allows the browsing of methods of objects stored in branches.
static bool IsMethodBrowsable(const TMethod *m)
A TMethod is browsable if it is const, public and not pure virtual, if does not have any parameter wi...
static Int_t GetBrowsables(TList &list, const TBranch *branch, const TVirtualBranchBrowsable *parent=nullptr)
This methods fills list with TMethodBrowsables for the branch's or parent's class and its base classe...
static void GetBrowsableMethodsForClass(TClass *cl, TList &list)
Given a class, this methods fills list with TMethodBrowsables for the class and its base classes,...
TMethodBrowsable(const TBranch *branch, TMethod *m, const TVirtualBranchBrowsable *parent=nullptr)
Constructor.
static void Unregister()
Wrapper for the registration method.
static void Register()
Wrapper for the registration method.
Each ROOT class (see TClass) has a linked list of methods.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Allows a TBrowser to browse non-split branches as if they were split.
TNonSplitBrowsable(const TStreamerElement *element, const TBranch *branch, const TVirtualBranchBrowsable *parent=nullptr)
Constructor.
static Int_t GetBrowsables(TList &list, const TBranch *branch, const TVirtualBranchBrowsable *parent=nullptr)
Given either a branch "branch" or a "parent" TVirtualBranchBrowsable, we fill "list" with objects of ...
static void Unregister()
Wrapper for the registration method.
static void Register()
Wrapper for the registration method.
Wrapper around a TObject so it can be stored in a TList.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
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.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
A TTree represents a columnar dataset.
TVirtualBranchBrowsable is a base class (not really abstract, but useless by itself) for helper objec...
void SetType(TClass *type)
sets the type of this browsable object
const TBranch * fBranch
pointer to the branch element representing the top object
const TBranch * GetBranch() const
return the parent branch (might be many levels up)
static TClass * GetCollectionContainedType(const TBranch *b, const TVirtualBranchBrowsable *parent, TClass *&contained)
Check whether the branch (or the parent) contains a collection.
void SetTypeIsPointer(bool set=true)
sets whether the type of this browsable object is a pointer
TList * GetLeaves() const
Return list of leaves. If not set up yet we'll create them.
~TVirtualBranchBrowsable() override
Destructor. Delete our leaves.
static void RegisterGenerator(MethodCreateListOfBrowsables_t generator)
Adds a generator to be called when browsing branches.
void GetScope(TString &scope) const
Returns the full name for TTree::Draw to draw *this.
static std::list< MethodCreateListOfBrowsables_t > fgGenerators
list of MethodCreateListOfBrowsables_t called by CreateListOfBrowsables
TList * fLeaves
pointer to leaves
static Int_t FillListOfBrowsables(TList &list, const TBranch *branch, const TVirtualBranchBrowsable *parent=nullptr)
Askes all registered generators to fill their browsables into the list.
TVirtualBranchBrowsable(const TBranch *b, TClass *type, bool typeIsPointer, const TVirtualBranchBrowsable *parent=nullptr)
Constructor setting all members according to parameters.
void Browse(TBrowser *b) override
Calls TTree::Draw on the method if return type is not a class; otherwise expands returned object's "f...
static bool fgGeneratorsSet
have we set the generators yet? empty is not good enough - user might have removed them
static std::list< MethodCreateListOfBrowsables_t > & GetRegisteredGenerators()
returns the list of registered generator methods
static void UnregisterGenerator(MethodCreateListOfBrowsables_t generator)
Removes a generator from the list of generators to be called when browsing branches.
static void RegisterDefaultGenerators()
Adds the default generators.
bool fTypeIsPointer
return type is pointer to class
const TVirtualBranchBrowsable * fParent
parent method if this method is member of a returned class
TClass * fClass
pointer to TClass representing our type (i.e. return type for methods), 0 if basic type
TClass * GetClassType() const
return the type of this browsable object
Defines a common interface to inspect/change the contents of an object that represents a collection.
virtual EDataType GetType() const =0
If the value type is a fundamental data type, return its type (see enumeration EDataType).
Abstract Interface class describing Streamer information for one class.
virtual TObjArray * GetElements() const =0