Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TMVA::Option< T * > Class Template Reference

template<typename T>
class TMVA::Option< T * >

Definition at line 131 of file Option.h.

Public Types

enum  
enum  
enum  EDeprecatedStatusBits
enum  EStatusBits

Public Member Functions

 Option (T *&ref, Int_t size, const TString &name, const TString &desc)
virtual ~Option ()
void AbstractMethod (const char *method) const
 Call this function within a function that you don't want to define as purely virtual, in order not to force all users deriving from that class to implement that maybe (on their side) unused function; but at the same time, emit a run-time warning if they try to call it, telling that it is not implemented in the derived class: action must thus be taken on the user side to override it.
virtual void AddPreDefVal (const T &)
void AddPreDefVal (const Bool_t &)
void AddPreDefVal (const Float_t &)
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
virtual void Clear (Option_t *="")
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
virtual void Copy (TObject &object) const
 Copy this to obj.
virtual void Delete (Option_t *option="")
 Delete this object.
const TStringDescription () const
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
virtual void Dump () const
 Dump contents of object on stdout.
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
Int_t GetArraySize () const override
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
virtual const char * GetIconName () const
 Returns mime type name of object.
const char * GetName () const override
 Returns name of object.
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
virtual Option_tGetOption () const
virtual const char * GetTitle () const
 Returns title of object.
virtual UInt_t GetUniqueID () const
 Return the unique object id.
TString GetValue (Int_t i) const
TString GetValue (Int_t i) const override
TString GetValue (Int_t) const
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
virtual ULong_t Hash () const
 Return hash value for this object.
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
Bool_t HasPreDefinedVal () const override
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
void InvertBit (UInt_t f)
TClassIsA () const override
Bool_t IsArrayOpt () const override
Bool_t IsDestructed () const
 IsDestructed.
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Bool_t IsOnHeap () const
Bool_t IsPreDefinedVal (const TString &) const override
Bool_t IsSet () const
virtual Bool_t IsSortable () const
Bool_t IsZombie () const
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout.
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
void operator delete (void *, size_t)
 Operator delete for sized deallocation.
void operator delete (void *ptr)
 Operator delete.
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
void operator delete[] (void *, size_t)
 Operator delete [] for sized deallocation.
void operator delete[] (void *ptr)
 Operator delete [].
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
void * operator new (size_t sz)
void * operator new (size_t sz, void *vp)
void * operator new[] (size_t sz)
void * operator new[] (size_t sz, void *vp)
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself.
void Print (std::ostream &, Int_t levelofdetail=0) const override
virtual void PrintPreDefs (std::ostream &, Int_t levelofdetail=0) const
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
void ResetBit (UInt_t f)
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
void SetBit (UInt_t f)
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
Bool_t SetValue (const TString &val, Int_t i=0) override
 set value for option
virtual Bool_t SetValue (const TString &vs, Int_t i=-1)
 set value for option
void Streamer (TBuffer &) override
 Stream an object of class TObject.
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
Bool_t TestBit (UInt_t f) const
Int_t TestBits (UInt_t f) const
virtual const char * TheName () const
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
T & Value (Int_t i)
const T & Value (Int_t i) const override
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.

Static Public Member Functions

static TClassClass ()
static const char * Class_Name ()
static constexpr Version_t Class_Version ()
static const char * DeclFileName ()
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
static Bool_t GetObjectStat ()
 Get status of object stat flag.
static void SetDtorOnly (void *obj)
 Set destructor only flag.
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.

Public Attributes

Int_t fSize
T ** fVRefPtr

Protected Types

enum  

Protected Member Functions

virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
virtual Bool_t IsPreDefinedValLocal (const T &) const
Bool_t IsPreDefinedValLocal (const TString &val) const
void MakeZombie ()
void SetValueLocal (const TString &val, Int_t)
void SetValueLocal (const TString &val, Int_t)

Static Protected Member Functions

static MsgLoggerLog ()
static void SavePrimitiveConstructor (std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
 Save object constructor in the output stream "out".
static void SavePrimitiveDraw (std::ostream &out, const char *variable_name, Option_t *option=nullptr)
 Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
static TString SavePrimitiveVector (std::ostream &out, const char *prefix, Int_t len, Double_t *arr, Int_t flag=0)
 Save array in the output stream "out" as vector.

Protected Attributes

std::vector< T > fPreDefs
T * fRefPtr

Static Private Member Functions

static void AddToTObjectTable (TObject *)
 Private helper function which will dispatch to TObjectTable::AddObj.

Private Attributes

UInt_t fBits
 bit field status word
const TString fDescription
Bool_t fIsSet
const TString fName
TString fNameAllLower
UInt_t fUniqueID
 object unique identifier

Static Private Attributes

static Longptr_t fgDtorOnly
 object for which to call dtor only (i.e. no delete)
static Bool_t fgObjectStat
 if true keep track of objects in TObjectTable

#include <TMVA/Option.h>

Inheritance diagram for TMVA::Option< T * >:
TMVA::OptionBase TMVA::Option< T > TObject TMVA::OptionBase TObject

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Definition at line 106 of file TObject.h.

◆ anonymous enum

anonymous enum

Definition at line 99 of file TObject.h.

◆ anonymous enum

anonymous enum

Definition at line 89 of file TObject.h.

◆ EDeprecatedStatusBits

Definition at line 84 of file TObject.h.

◆ EStatusBits

Definition at line 70 of file TObject.h.

Constructor & Destructor Documentation

◆ Option()

template<typename T>
TMVA::Option< T * >::Option ( T *& ref,
Int_t size,
const TString & name,
const TString & desc )
inline

Definition at line 135 of file Option.h.

◆ ~Option()

template<typename T>
virtual TMVA::Option< T * >::~Option ( )
inlinevirtual

Reimplemented from TMVA::Option< T >.

Definition at line 137 of file Option.h.

Member Function Documentation

◆ AbstractMethod()

void TObject::AbstractMethod ( const char * method) const

Call this function within a function that you don't want to define as purely virtual, in order not to force all users deriving from that class to implement that maybe (on their side) unused function; but at the same time, emit a run-time warning if they try to call it, telling that it is not implemented in the derived class: action must thus be taken on the user side to override it.

In other word, this method acts as a "runtime purely virtual" warning instead of a "compiler purely virtual" error.

Warning
This interface is a legacy function that is no longer recommended to be used by new development code.
Note
The name "AbstractMethod" does not imply that it's an abstract method in the strict C++ sense.

Definition at line 235 of file TObject.cxx.

◆ AddPreDefVal() [1/3]

template<class T>
void TMVA::Option< T >::AddPreDefVal ( const T & val)
inlinevirtualinherited

Definition at line 235 of file Option.h.

◆ AddPreDefVal() [2/3]

void TMVA::Option< Bool_t >::AddPreDefVal ( const Bool_t & )
inline

Definition at line 242 of file Option.h.

◆ AddPreDefVal() [3/3]

void TMVA::Option< Float_t >::AddPreDefVal ( const Float_t & )
inline

Definition at line 250 of file Option.h.

◆ AddToTObjectTable()

void TObject::AddToTObjectTable ( TObject * op)
staticprivate

Private helper function which will dispatch to TObjectTable::AddObj.

Included here to avoid circular dependency between header files.

Definition at line 52 of file TObject.cxx.

◆ AppendPad()

void TObject::AppendPad ( Option_t * option = "")
virtual

Append graphics object to current pad.

In case no current pad is set yet, create a default canvas with the name "c1".

Definition at line 124 of file TObject.cxx.

◆ Browse()

void TObject::Browse ( TBrowser * b)
virtual

Browse object. May be overridden for another default action.

Definition at line 125 of file TObject.cxx.

◆ CheckedHash()

Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.

The intent is for this routine to be called instead of directly calling the function Hash during "insert" operations. See TObject::HasInconsistenTObjectHash();

(*) The setup is consistent when all classes in the class hierarchy that overload TObject::Hash do call ROOT::CallRecursiveRemoveIfNeeded in their destructor. i.e. it is safe to call the Hash virtual function during the RecursiveRemove operation.

Definition at line 128 of file TObject.h.

◆ Class()

Returns
TClass describing this class

◆ Class_Name()

const char * TMVA::OptionBase::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

constexpr Version_t TMVA::OptionBase::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 90 of file Option.h.

◆ ClassName()

const char * TObject::ClassName ( ) const
virtual

Returns name of class to which the object belongs.

Definition at line 126 of file TObject.cxx.

◆ Clear()

virtual void TObject::Clear ( Option_t * = "")
inlinevirtual

Definition at line 127 of file TObject.h.

◆ Clone()

TObject * TObject::Clone ( const char * newname = "") const
virtual

Make a clone of an object using the Streamer facility.

If the object derives from TNamed, this function is called by TNamed::Clone. TNamed::Clone uses the optional argument to set a new name to the newly created object.

If the object class has a DirectoryAutoAdd function, it will be called at the end of the function with the parameter gDirectory. This usually means that the object will be appended to the current ROOT directory.

Definition at line 129 of file TObject.cxx.

◆ Compare()

Int_t TObject::Compare ( const TObject * obj) const
virtual

Compare abstract method.

Must be overridden if a class wants to be able to compare itself with other objects. Must return -1 if this is smaller than obj, 0 if objects are equal and 1 if this is larger than obj.

Definition at line 130 of file TObject.cxx.

◆ Copy()

void TObject::Copy ( TObject & object) const
virtual

Copy this to obj.

Definition at line 131 of file TObject.cxx.

◆ DeclFileName()

const char * TMVA::OptionBase::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 90 of file Option.h.

◆ Delete()

void TObject::Delete ( Option_t * option = "")
virtual

Delete this object.

Typically called as a command via the interpreter. Normally use "delete" operator when object has been allocated on the heap.

Definition at line 132 of file TObject.cxx.

◆ Description()

const TString & TMVA::OptionBase::Description ( ) const
inline

Definition at line 67 of file Option.h.

◆ DistancetoPrimitive()

Computes distance from point (px,py) to the object.

This member function must be implemented for each graphics primitive. This default function returns a big number (999999).

Definition at line 133 of file TObject.cxx.

◆ DoError()

void TObject::DoError ( int level,
const char * location,
const char * fmt,
va_list va ) const
protectedvirtual

Interface to ErrorHandler (protected).

Definition at line 56 of file TObject.cxx.

◆ Draw()

void TObject::Draw ( Option_t * option = "")
virtual

Default Draw method for all objects.

Definition at line 134 of file TObject.cxx.

◆ DrawClass()

void TObject::DrawClass ( ) const
virtual

Draw class inheritance tree of the class to which this object belongs.

If a class B inherits from a class A, description of B is drawn on the right side of description of A. Member functions overridden by B are shown in class A with a blue line crossing-out the corresponding member function. The following picture is the class inheritance tree of class TPaveLabel:

Definition at line 135 of file TObject.cxx.

◆ DrawClone()

TObject * TObject::DrawClone ( Option_t * option = "") const
virtual

Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).

If pad was not selected - gPad will be used.

Note
For histograms, use the more specialised TH1::DrawCopy().

Definition at line 136 of file TObject.cxx.

◆ Dump()

void TObject::Dump ( ) const
virtual

Dump contents of object on stdout.

Using the information in the object dictionary (class TClass) each data member is interpreted. If a data member is a pointer, the pointer value is printed

The following output is the Dump of a TArrow object:

fAngle 0 Arrow opening angle (degrees)
fArrowSize 0.2 Arrow Size
fOption.*fData
fX1 0.1 X of 1st point
fY1 0.15 Y of 1st point
fX2 0.67 X of 2nd point
fY2 0.83 Y of 2nd point
fUniqueID 0 object unique identifier
fBits 50331648 bit field status word
fLineColor 1 line color
fLineStyle 1 line style
fLineWidth 1 line width
fFillColor 19 fill area color
fFillStyle 1001 fill area style
#define X(type, name)
TLine * line
TCanvas * style()
Definition style.C:1

Definition at line 137 of file TObject.cxx.

◆ Error()

void TObject::Error ( const char * location,
const char * fmt,
... ) const
virtual

Issue error message.

Use "location" to specify the method where the error occurred. Accepts standard printf formatting arguments.

Definition at line 219 of file TObject.cxx.

◆ Execute() [1/2]

void TObject::Execute ( const char * method,
const char * params,
Int_t * error = nullptr )
virtual

Execute method on this object with the given parameter string, e.g.

"3.14,1,\"text\"".

Definition at line 138 of file TObject.cxx.

◆ Execute() [2/2]

void TObject::Execute ( TMethod * method,
TObjArray * params,
Int_t * error = nullptr )
virtual

Execute method on this object with parameters stored in the TObjArray.

The TObjArray should contain an argv vector like:

argv[0] ... argv[n] = the list of TObjString parameters
Collectable string class.
Definition TObjString.h:28
const Int_t n
Definition legend1.C:16

Definition at line 139 of file TObject.cxx.

◆ ExecuteEvent()

void TObject::ExecuteEvent ( Int_t event,
Int_t px,
Int_t py )
virtual

Execute action corresponding to an event at (px,py).

This method must be overridden if an object can react to graphics events.

Definition at line 140 of file TObject.cxx.

◆ Fatal()

void TObject::Fatal ( const char * location,
const char * fmt,
... ) const
virtual

Issue fatal error message.

Use "location" to specify the method where the fatal error occurred. Accepts standard printf formatting arguments.

Definition at line 229 of file TObject.cxx.

◆ FindObject() [1/2]

TObject * TObject::FindObject ( const char * name) const
virtual

Must be redefined in derived classes.

This function is typically used with TCollections, but can also be used to find an object by name inside this object.

Definition at line 141 of file TObject.cxx.

◆ FindObject() [2/2]

TObject * TObject::FindObject ( const TObject * obj) const
virtual

Must be redefined in derived classes.

This function is typically used with TCollections, but can also be used to find an object inside this object.

Definition at line 142 of file TObject.cxx.

◆ GetArraySize()

template<typename T>
Int_t TMVA::Option< T * >::GetArraySize ( ) const
inlineoverridevirtual

Implements TMVA::OptionBase.

Definition at line 146 of file Option.h.

◆ GetDrawOption()

Option_t * TObject::GetDrawOption ( ) const
virtual

Get option used by the graphics system to draw this object.

Note that before calling object.GetDrawOption(), you must have called object.Draw(..) before in the current pad.

Definition at line 143 of file TObject.cxx.

◆ GetDtorOnly()

Return destructor only flag.

Definition at line 240 of file TObject.cxx.

◆ GetIconName()

const char * TObject::GetIconName ( ) const
virtual

Returns mime type name of object.

Used by the TBrowser (via TGMimeTypes class). Override for class of which you would like to have different icons for objects of the same class.

Definition at line 146 of file TObject.cxx.

◆ GetName()

const char * TMVA::OptionBase::GetName ( ) const
inlineoverride

Returns name of object.

This default method returns the class name. Classes that give objects a name should override this method.

Definition at line 61 of file Option.h.

◆ GetObjectInfo()

char * TObject::GetObjectInfo ( Int_t px,
Int_t py ) const
virtual

Returns string containing info about the object at position (px,py).

This method is typically overridden by classes of which the objects can report peculiarities for different positions. Returned string will be re-used (lock in MT environment).

Definition at line 148 of file TObject.cxx.

◆ GetObjectStat()

Get status of object stat flag.

Definition at line 242 of file TObject.cxx.

◆ GetOption()

virtual Option_t * TObject::GetOption ( ) const
inlinevirtual

Definition at line 147 of file TObject.h.

◆ GetTitle()

const char * TObject::GetTitle ( ) const
virtual

Returns title of object.

This default method returns the class title (i.e. description). Classes that give objects a title should override this method.

Definition at line 149 of file TObject.cxx.

◆ GetUniqueID()

UInt_t TObject::GetUniqueID ( ) const
virtual

Return the unique object id.

Definition at line 144 of file TObject.cxx.

◆ GetValue() [1/3]

TString TMVA::Option< Bool_t * >::GetValue ( Int_t i) const
inlinevirtual

Implements TMVA::OptionBase.

Definition at line 187 of file Option.h.

◆ GetValue() [2/3]

template<typename T>
TString TMVA::Option< T * >::GetValue ( Int_t i) const
inlineoverridevirtual

Implements TMVA::OptionBase.

Definition at line 139 of file Option.h.

◆ GetValue() [3/3]

TString TMVA::Option< Bool_t >::GetValue ( Int_t ) const
inlinevirtual

Implements TMVA::OptionBase.

Definition at line 182 of file Option.h.

◆ HandleTimer()

Bool_t TObject::HandleTimer ( TTimer * timer)
virtual

Execute action in response of a timer timing out.

This method must be overridden if an object has to react to timers.

Definition at line 150 of file TObject.cxx.

◆ Hash()

ULong_t TObject::Hash ( ) const
virtual

Return hash value for this object.

Note: If this routine is overloaded in a derived class, this derived class should also add

void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
Definition TROOT.h:406

Otherwise, when RecursiveRemove is called (by ~TObject or example) for this type of object, the transversal of THashList and THashTable containers will will have to be done without call Hash (and hence be linear rather than logarithmic complexity). You will also see warnings like

Error in <ROOT::Internal::TCheckHashRecursiveRemoveConsistency::CheckRecursiveRemove>: The class SomeName overrides
TObject::Hash but does not call TROOT::RecursiveRemove in its destructor.
virtual void Error(const char *method, const char *msgfmt,...) const
Definition TObject.cxx:1098
TObject()
TObject constructor.
Definition TObject.h:259
virtual ULong_t Hash() const
Definition TObject.cxx:539
void RecursiveRemove(TObject *obj) override
Recursively remove this object from the list of Cleanups.
Definition TROOT.cxx:2651

Definition at line 152 of file TObject.cxx.

◆ HasInconsistentHash()

Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.

missing call to RecursiveRemove in destructor).

Note: Since the consistency is only tested for during inserts, this routine will return true for object that have never been inserted whether or not they have a consistent setup. This has no negative side-effect as searching for the object with the right or wrong Hash will always yield a not-found answer (Since anyway no hash can be guaranteed unique, there is always a check)

Definition at line 151 of file TObject.h.

◆ HasPreDefinedVal()

Bool_t TMVA::Option< T >::HasPreDefinedVal ( ) const
inlineoverridevirtual

Implements TMVA::OptionBase.

Definition at line 108 of file Option.h.

◆ Info()

void TObject::Info ( const char * location,
const char * fmt,
... ) const
virtual

Issue info message.

Use "location" to specify the method where the warning occurred. Accepts standard printf formatting arguments.

Definition at line 209 of file TObject.cxx.

◆ InheritsFrom() [1/2]

Bool_t TObject::InheritsFrom ( const char * classname) const
virtual

Returns kTRUE if object inherits from class "classname".

Definition at line 153 of file TObject.cxx.

◆ InheritsFrom() [2/2]

Bool_t TObject::InheritsFrom ( const TClass * cl) const
virtual

Returns kTRUE if object inherits from TClass cl.

Definition at line 154 of file TObject.cxx.

◆ Inspect()

void TObject::Inspect ( ) const
virtual

Dump contents of this object in a graphics canvas.

Same action as Dump but in a graphical form. In addition pointers to other objects can be followed.

The following picture is the Inspect of a histogram object:

Definition at line 155 of file TObject.cxx.

◆ InvertBit()

void TObject::InvertBit ( UInt_t f)
inline

Definition at line 206 of file TObject.h.

◆ IsA()

TClass * TMVA::OptionBase::IsA ( ) const
inlineoverride
Returns
TClass describing current object

Definition at line 90 of file Option.h.

◆ IsArrayOpt()

template<typename T>
Bool_t TMVA::Option< T * >::IsArrayOpt ( ) const
inlineoverridevirtual

Implements TMVA::OptionBase.

Definition at line 145 of file Option.h.

◆ IsDestructed()

Bool_t TObject::IsDestructed ( ) const
inline

IsDestructed.

Note
This function must be non-virtual as it can be used on destructed (but not yet modified) memory. This is used for example in TClonesArray to record the element that have been destructed but not deleted and thus are ready for re-use (by operator new with placement).
Returns
true if this object's destructor has been run.

Definition at line 186 of file TObject.h.

◆ IsEqual()

Bool_t TObject::IsEqual ( const TObject * obj) const
virtual

Default equal comparison (objects are equal if they have the same address in memory).

More complicated classes might want to override this function.

Definition at line 157 of file TObject.cxx.

◆ IsFolder()

Bool_t TObject::IsFolder ( ) const
virtual

Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).

Definition at line 156 of file TObject.cxx.

◆ IsOnHeap()

Bool_t TObject::IsOnHeap ( ) const
inline

Definition at line 160 of file TObject.h.

◆ IsPreDefinedVal()

Bool_t TMVA::Option< T >::IsPreDefinedVal ( const TString & val) const
inlineoverridevirtual

Implements TMVA::OptionBase.

Definition at line 109 of file Option.h.

◆ IsPreDefinedValLocal() [1/2]

template<class T>
Bool_t TMVA::Option< T >::IsPreDefinedValLocal ( const T & val) const
inlineprotectedvirtualinherited

Definition at line 202 of file Option.h.

◆ IsPreDefinedValLocal() [2/2]

Bool_t TMVA::Option< TString >::IsPreDefinedValLocal ( const TString & val) const
inlineprotected

Definition at line 216 of file Option.h.

◆ IsSet()

Bool_t TMVA::OptionBase::IsSet ( ) const
inline

Definition at line 65 of file Option.h.

◆ IsSortable()

virtual Bool_t TObject::IsSortable ( ) const
inlinevirtual

Definition at line 158 of file TObject.h.

◆ IsZombie()

Bool_t TObject::IsZombie ( ) const
inline

Definition at line 161 of file TObject.h.

◆ Log()

TMVA::MsgLogger & TMVA::OptionBase::Log ( )
staticprotected

Definition at line 87 of file Option.cxx.

◆ ls()

void TObject::ls ( Option_t * option = "") const
virtual

The ls function lists the contents of a class on stdout.

Ls output is typically much less verbose then Dump().

Definition at line 164 of file TObject.cxx.

◆ MakeZombie()

void TObject::MakeZombie ( )
inlineprotected

Definition at line 55 of file TObject.h.

◆ MayNotUse()

void TObject::MayNotUse ( const char * method) const

Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).

Definition at line 236 of file TObject.cxx.

◆ Notify()

Bool_t TObject::Notify ( )
virtual

This method must be overridden to handle object notification (the base implementation is no-op).

Different objects in ROOT use the Notify method for different purposes, in coordination with other objects that call this method at the appropriate time.

For example, TLeaf uses it to load class information; TBranchRef to load contents of referenced branches TBranchRef; most notably, based on Notify, TChain implements a callback mechanism to inform interested parties when it switches to a new sub-tree.

Definition at line 163 of file TObject.cxx.

◆ Obsolete()

void TObject::Obsolete ( const char * method,
const char * asOfVers,
const char * removedFromVers ) const

Use this method to declare a method obsolete.

Specify as of which version the method is obsolete and as from which version it will be removed.

Definition at line 237 of file TObject.cxx.

◆ operator delete() [1/3]

void TObject::operator delete ( void * ptr,
size_t size )

Operator delete for sized deallocation.

Definition at line 195 of file TObject.cxx.

◆ operator delete() [2/3]

void TObject::operator delete ( void * ptr)

Operator delete.

Definition at line 193 of file TObject.cxx.

◆ operator delete() [3/3]

void TObject::operator delete ( void * ptr,
void * vp )

Only called by placement new when throwing an exception.

Definition at line 197 of file TObject.cxx.

◆ operator delete[]() [1/3]

void TObject::operator delete[] ( void * ptr,
size_t size )

Operator delete [] for sized deallocation.

Definition at line 196 of file TObject.cxx.

◆ operator delete[]() [2/3]

void TObject::operator delete[] ( void * ptr)

Operator delete [].

Definition at line 194 of file TObject.cxx.

◆ operator delete[]() [3/3]

void TObject::operator delete[] ( void * ptr,
void * vp )

Only called by placement new[] when throwing an exception.

Definition at line 198 of file TObject.cxx.

◆ operator new() [1/2]

void * TObject::operator new ( size_t sz)
inline

Definition at line 189 of file TObject.h.

◆ operator new() [2/2]

void * TObject::operator new ( size_t sz,
void * vp )
inline

Definition at line 191 of file TObject.h.

◆ operator new[]() [1/2]

void * TObject::operator new[] ( size_t sz)
inline

Definition at line 190 of file TObject.h.

◆ operator new[]() [2/2]

void * TObject::operator new[] ( size_t sz,
void * vp )
inline

Definition at line 192 of file TObject.h.

◆ Paint()

void TObject::Paint ( Option_t * option = "")
virtual

This method must be overridden if a class wants to paint itself.

The difference between Paint() and Draw() is that when a object draws itself it is added to the display list of the pad in which it is drawn (and automatically redrawn whenever the pad is redrawn). While paint just draws the object without adding it to the pad display list.

Definition at line 165 of file TObject.cxx.

◆ Pop()

void TObject::Pop ( )
virtual

Pop on object drawn in a pad to the top of the display list.

I.e. it will be drawn last and on top of all other primitives.

Definition at line 166 of file TObject.cxx.

◆ Print() [1/2]

( Option_t * option = "") const
virtual

This method must be overridden when a class wants to print itself.

Reimplemented from TObject.

◆ Print() [2/2]

template<class T>
void TMVA::Option< T * >::Print ( std::ostream & os,
Int_t levelofdetail = 0 ) const
inlineoverridevirtual

Implements TMVA::OptionBase.

Definition at line 266 of file Option.h.

◆ PrintPreDefs()

void TMVA::Option< T >::PrintPreDefs ( std::ostream & os,
Int_t levelofdetail = 0 ) const
inlinevirtual

Reimplemented from TMVA::Option< T >.

Definition at line 117 of file Option.h.

◆ Read()

Int_t TObject::Read ( const char * name)
virtual

Read contents of object with specified name from the current directory.

First the key with the given name is searched in the current directory, next the key buffer is deserialized into the object. The object must have been created before via the default constructor. See TObject::Write().

Definition at line 168 of file TObject.cxx.

◆ RecursiveRemove()

void TObject::RecursiveRemove ( TObject * obj)
virtual

Recursively remove this object from a list.

Typically implemented by classes that can contain multiple references to a same object.

Definition at line 169 of file TObject.cxx.

◆ ResetBit()

void TObject::ResetBit ( UInt_t f)
inline

Definition at line 203 of file TObject.h.

◆ SaveAs()

void TObject::SaveAs ( const char * filename = "",
Option_t * option = "" ) const
virtual

Save this object in the file specified by filename.

  • if "filename" contains ".root" the object is saved in filename as root binary file.
  • if "filename" contains ".xml" the object is saved in filename as a xml ascii file.
  • if "filename" contains ".cc" the object is saved in filename as C code independent from ROOT. The code is generated via SavePrimitive(). Specific code should be implemented in each object to handle this option. Like in TF1::SavePrimitive().
  • otherwise the object is written to filename as a CINT/C++ script. The C++ code to rebuild this object is generated via SavePrimitive(). The "option" parameter is passed to SavePrimitive. By default it is an empty string. It can be used to specify the Draw option in the code generated by SavePrimitive.

    The function is available via the object context menu.

Definition at line 170 of file TObject.cxx.

◆ SavePrimitive()

void TObject::SavePrimitive ( std::ostream & out,
Option_t * option = "" )
virtual

Save a primitive as a C++ statement(s) on output stream "out".

Definition at line 171 of file TObject.cxx.

◆ SavePrimitiveConstructor()

void TObject::SavePrimitiveConstructor ( std::ostream & out,
TClass * cl,
const char * variable_name,
const char * constructor_agrs = "",
Bool_t empty_line = kTRUE )
staticprotected

Save object constructor in the output stream "out".

Can be used as first statement when implementing SavePrimitive() method for the object

Definition at line 58 of file TObject.cxx.

◆ SavePrimitiveDraw()

void TObject::SavePrimitiveDraw ( std::ostream & out,
const char * variable_name,
Option_t * option = nullptr )
staticprotected

Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.

Definition at line 63 of file TObject.cxx.

◆ SavePrimitiveVector()

TString TObject::SavePrimitiveVector ( std::ostream & out,
const char * prefix,
Int_t len,
Double_t * arr,
Int_t flag = 0 )
staticprotected

Save array in the output stream "out" as vector.

Create unique variable name based on prefix value Returns name of vector which can be used in constructor or in other places of C++ code If flag === kTRUE, just add empty line If flag === 111, check if array is empty and return nullptr or <vectorname>.data()

Definition at line 61 of file TObject.cxx.

◆ SetBit() [1/2]

void TObject::SetBit ( UInt_t f)
inline

Definition at line 202 of file TObject.h.

◆ SetBit() [2/2]

void TObject::SetBit ( UInt_t f,
Bool_t set )

Set or unset the user status bits as specified in f.

Definition at line 201 of file TObject.cxx.

◆ SetDrawOption()

void TObject::SetDrawOption ( Option_t * option = "")
virtual

Set drawing option for object.

This option only affects the drawing style and is stored in the option field of the TObjOptLink supporting a TPad's primitive list (TList). Note that it does not make sense to call object.SetDrawOption(option) before having called object.Draw().

Definition at line 172 of file TObject.cxx.

◆ SetDtorOnly()

void TObject::SetDtorOnly ( void * obj)
static

Set destructor only flag.

Definition at line 241 of file TObject.cxx.

◆ SetObjectStat()

void TObject::SetObjectStat ( Bool_t stat)
static

Turn on/off tracking of objects in the TObjectTable.

Definition at line 243 of file TObject.cxx.

◆ SetUniqueID()

void TObject::SetUniqueID ( UInt_t uid)
virtual

Set the unique object id.

Definition at line 173 of file TObject.cxx.

◆ SetValue() [1/2]

template<class T>
Bool_t TMVA::Option< T * >::SetValue ( const TString & vs,
Int_t i = 0 )
inlineoverridevirtual

set value for option

Reimplemented from TMVA::OptionBase.

Definition at line 297 of file Option.h.

◆ SetValue() [2/2]

Bool_t TMVA::OptionBase::SetValue ( const TString & vs,
Int_t i = -1 )
virtual

set value for option

Definition at line 71 of file Option.cxx.

◆ SetValueLocal() [1/2]

void TMVA::Option< Bool_t >::SetValueLocal ( const TString & val,
Int_t  )
inlineprotectedvirtual

Implements TMVA::OptionBase.

Definition at line 342 of file Option.h.

◆ SetValueLocal() [2/2]

void TMVA::Option< TString >::SetValueLocal ( const TString & val,
Int_t  )
inlineprotectedvirtual

Implements TMVA::OptionBase.

Definition at line 321 of file Option.h.

◆ Streamer()

void TMVA::OptionBase::Streamer ( TBuffer & )
override

Stream an object of class TObject.

◆ StreamerNVirtual()

void TMVA::OptionBase::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 90 of file Option.h.

◆ SysError()

void TObject::SysError ( const char * location,
const char * fmt,
... ) const
virtual

Issue system error message.

Use "location" to specify the method where the system error occurred. Accepts standard printf formatting arguments.

Definition at line 224 of file TObject.cxx.

◆ TestBit()

Bool_t TObject::TestBit ( UInt_t f) const
inline

Definition at line 204 of file TObject.h.

◆ TestBits()

Int_t TObject::TestBits ( UInt_t f) const
inline

Definition at line 205 of file TObject.h.

◆ TheName()

virtual const char * TMVA::OptionBase::TheName ( ) const
inlinevirtual

Definition at line 62 of file Option.h.

◆ UseCurrentStyle()

void TObject::UseCurrentStyle ( )
virtual

Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.

Definition at line 174 of file TObject.cxx.

◆ Value() [1/2]

template<typename T>
T & TMVA::Option< T * >::Value ( Int_t i)
inline

Definition at line 153 of file Option.h.

◆ Value() [2/2]

template<typename T>
const T & TMVA::Option< T * >::Value ( Int_t i) const
inlineoverridevirtual

Reimplemented from TMVA::Option< T >.

Definition at line 144 of file Option.h.

◆ Warning()

void TObject::Warning ( const char * location,
const char * fmt,
... ) const
virtual

Issue warning message.

Use "location" to specify the method where the warning occurred. Accepts standard printf formatting arguments.

Definition at line 214 of file TObject.cxx.

◆ Write() [1/2]

Int_t TObject::Write ( const char * name = nullptr,
Int_t option = 0,
Int_t bufsize = 0 )
virtual

Write this object to the current directory.

For more see the const version of this method.

Definition at line 175 of file TObject.cxx.

◆ Write() [2/2]

Int_t TObject::Write ( const char * name = nullptr,
Int_t option = 0,
Int_t bufsize = 0 ) const
virtual

Write this object to the current directory.

The data structure corresponding to this object is serialized. The corresponding buffer is written to the current directory with an associated key with name "name".

Writing an object to a file involves the following steps:

  • Creation of a support TKey object in the current directory. The TKey object creates a TBuffer object.
  • The TBuffer object is filled via the class::Streamer function.
  • If the file is compressed (default) a second buffer is created to hold the compressed buffer.
  • Reservation of the corresponding space in the file by looking in the TFree list of free blocks of the file.
  • The buffer is written to the file.

Bufsize can be given to force a given buffer size to write this object. By default, the buffersize will be taken from the average buffer size of all objects written to the current file so far.

If a name is specified, it will be the name of the key. If name is not given, the name of the key will be the name as returned by GetName().

The option can be a combination of: kSingleKey, kOverwrite or kWriteDelete Using the kOverwrite option a previous key with the same name is overwritten. The previous key is deleted before writing the new object. Using the kWriteDelete option a previous key with the same name is deleted only after the new object has been written. This option is safer than kOverwrite but it is slower. NOTE: Neither kOverwrite nor kWriteDelete reduces the size of a TFile– the space is simply freed up to be overwritten; in the case of a TTree, it is more complicated. If one opens a TTree, appends some entries, then writes it out, the behaviour is effectively the same. If, however, one creates a new TTree and writes it out in this way, only the metadata is replaced, effectively making the old data invisible without deleting it. TTree::Delete() can be used to mark all disk space occupied by a TTree as free before overwriting its metadata this way. The kSingleKey option is only used by TCollection::Write() to write a container with a single key instead of each object in the container with its own key.

An object is read from the file into memory via TKey::Read() or via TObject::Read().

The function returns the total number of bytes written to the file. It returns 0 if the object cannot be written.

Definition at line 176 of file TObject.cxx.

Member Data Documentation

◆ fBits

bit field status word

Definition at line 47 of file TObject.h.

◆ fDescription

Definition at line 82 of file Option.h.

◆ fgDtorOnly

object for which to call dtor only (i.e. no delete)

Definition at line 49 of file TObject.h.

◆ fgObjectStat

if true keep track of objects in TObjectTable

Definition at line 50 of file TObject.h.

◆ fIsSet

Definition at line 83 of file Option.h.

◆ fName

Definition at line 80 of file Option.h.

◆ fNameAllLower

Definition at line 81 of file Option.h.

◆ fPreDefs

std::vector<T> TMVA::Option< T >::fPreDefs
protected

Definition at line 127 of file Option.h.

◆ fRefPtr

T* TMVA::Option< T >::fRefPtr
protected

Definition at line 126 of file Option.h.

◆ fSize

template<typename T>
Int_t TMVA::Option< T * >::fSize

Definition at line 155 of file Option.h.

◆ fUniqueID

object unique identifier

Definition at line 46 of file TObject.h.

◆ fVRefPtr

template<typename T>
T** TMVA::Option< T * >::fVRefPtr

Definition at line 154 of file Option.h.


The documentation for this class was generated from the following file: