Logo ROOT   6.08/07
Reference Guide
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
TObject Class Reference

Mother of all ROOT objects.

The TObject class provides default behaviour and protocol for all objects in the ROOT system. It provides protocol for object I/O, error handling, sorting, inspection, printing, drawing, etc. Every object which inherits from TObject can be stored in the ROOT collection classes.

TObject's bits can be used as flags, bits 0 - 13 and 24-31 are reserved as global bits while bits 14 - 23 can be used in different class hierarchies (watch out for overlaps).

Definition at line 37 of file TObject.h.

Public Types

enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 

Public Member Functions

 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
Bool_t IsOnHeap () 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. More...
 
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). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) 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. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Static Public Member Functions

static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

Protected Member Functions

virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

Private Attributes

UInt_t fBits
 bit field status word More...
 
UInt_t fUniqueID
 object unique identifier More...
 

Static Private Attributes

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

Friends

class TClonesArray
 

#include <TObject.h>

Inherited by Hit, Jet, JetEvent, Memstat::TMemStatMng, MonitoredTFileInfo, PyROOT::TMemoryRegulator, RooAbsCollection, RooAbsIntegrator, RooCatType, RooCFunction1Ref< VO, VI >, RooCFunction2Ref< VO, VI1, VI2 >, RooCFunction3Ref< VO, VI1, VI2, VI3 >, RooCFunction4Ref< VO, VI1, VI2, VI3, VI4 >, RooCmdConfig, RooExpensiveObjectCache, RooGrid, RooHashTable, RooLinkedList, RooMinimizer, RooMinuit, RooMsgService, RooNameSet, RooNumGenConfig, RooNumGenFactory, RooNumIntConfig, RooNumIntFactory, RooSetPair, RooSharedProperties, RooSharedPropertiesList, RooSimPdfBuilder, RooStats::AcceptanceRegion, RooStats::HistFactory::EstimateSummary, RooStats::HistFactory::HistoToWorkspaceFactory, RooStats::HistFactory::HistoToWorkspaceFactoryFast, RooStats::MetropolisHastings, RooStats::ProposalFunction, RooStats::ProposalHelper, RooStats::SamplingSummary, RooStats::SamplingSummaryLookup, ROOT::Detail::TSchemaRuleSet, ROOT::Experimental::Internal::TV5CanvasAdaptor, ROOT::Internal::TNamedBranchProxy, ROOT::Internal::TTreeReaderDescriptor, ROOT::TSchemaRule, RooThreshEntry, RooWorkspace::CodeRepo, TAFS, TAliEnFind, TApplication, TArchiveFile, TArchiveMember, TASPaletteEditor::PaintPalette, TAuthenticate, TAxisModLab, TBinomialEfficiencyFitter, TBits, TBonjourBrowser, TBonjourRecord, TBonjourRegistrar, TBonjourResolver, TBox, TBuffer, TBuffer3D, TClassDocInfo, TClassGenerator, TClassMenuItem, TClassTable, TCollection, TCondition, TConditionImp, TCondor, TCondorSlave, TConfidenceLevel, TDataSetIter, TDataSetManager, TDecayChannel, TDecompBase, TDictAttributeMap, TDimensionInfo, TDNDData, TDocMethodWrapper, TDocOutput, TDocParser, TDrawFeedback, TEllipse, TEntryListBlock, TEnv, TEnvRec, TEveCluster, TEveElementObjectPtr, TEveFrameBox, TEveGeoNode, TEveGridStepper, TEveHit, TEveMCRecCrossRef, TEventIter, TEveRecCascade, TEveRecKink, TEveRecTrackT< TT >, TEveRecTrackT< Float_t >, TEveRecV0, TEveRGBAPalette, TEveTrans, TEveVSD, TExMap, TFeldmanCousins, TFileCacheRead, TFileCacheWrite, TFileMerger, TFilePrefetch, TFoam, TFoamCell, TFoamIntegrand, TFoamMaxwt, TFoamVect, TFormLeafInfo, TFPBlock, TFractionFitter, TFree, TFTP, TGClient, TGDMLParse, TGDMLRefl, TGDMLWrite, TGDNDManager, TGedFrame::TGedSubFrame, TGedTabInfo, TGenPhaseSpace, TGeoBatemanSol, TGeoBoolNode, TGeoBranchArray, TGeoBuilder, TGeoCacheState, TGeoChecker, TGeoDecayChannel, TGeoElementTable, TGeoExtension, TGeoGlobalMagField, TGeoHelix, TGeoIteratorPlugin, TGeoNavigator, TGeoNodeCache, TGeoPatternFinder, TGeoPolygon, TGeoTabManager, TGeoToStep, TGeoVoxelFinder, TGFrameElement, TGGC, TGHtmlElement, TGHtmlImage, TGHtmlLayoutContext, TGHtmlUri, TGIdleHandler, TGItemContext, TGLAutoRotator, TGLayoutHints, TGLayoutManager, TGLCamera, TGLLightSet, TGLPShapeObj, TGMainFrame::TGMapKey, TGMenuEntry, TGMime, TGMimeTypes, TGObject, TGPicture, TGPicturePool, TGraph2DPainter, TGraphEdge, TGraphStruct, TGRectMap, TGRegion, TGrid, TGridCollection, TGridJDL, TGridJob, TGTextEditCommand, TGTextLayout, TGUnknownWindowHandler, TGWin32CallBackObject, TH2PolyBin, THLimitsFinder, THnIter, THnSparseArrayChunk, THostAuth, THtml, THtml::TFileSysEntry, THtml::THelperBase, THttpCallArg, TIconBoxThumb, TImagePalette, TImagePlugin, TInetAddress, TInspectorObject, TJSONStackObj, TKDTree< Index, Value >, TKDTreeBinning, TKSocket, TLDAPEntry, TLDAPResult, TLDAPServer, TLegendEntry, TLimitDataSource, TLine, TLockFile, TLockPath, TLorentzRotation, TLorentzVector, TMapFile, TMarker, TMarker3DBox, TMatrixTBase< Element >, TMatrixTLazy< Element >, TMatrixTSymLazy< Element >, TMCParticle, TMCVerbose, TMemStat, TMemStatShow, TMergerInfo, TMethodCall, TMLPAnalyzer, TMonitor, TMrbSubevent_Caen, TMultiLayerPerceptron, TMutexImp, TMVA::DataInputHandler, TMVA::DataSetFactory, TMVA::DataSetInfo, TMVA::DataSetManager, TMVA::Event, TMVA::MsgLogger, TMVA::OptionBase, TMVA::PDEFoam, TMVA::PDEFoamCell, TMVA::PDEFoamDensityBase, TMVA::PDEFoamKernelBase, TMVA::PDEFoamVect, TMVA::Results, TMVA::RootFinder, TMVA::TNeuron, TMVA::TreeInfo, TMVA::TSynapse, TMVA::VariableTransformBase, TNamed, TNDArray, TObjectRefSpy, TObjectSpy, TObjectTable, TObjString, TOptionListItem, TOutputListSelectorDataMap, TPackageDescription, TPacketizer::TFileNode, TPacketizer::TFileStat, TPacketizerAdaptive::TFileNode, TPacketizerAdaptive::TFileStat, TPacketizerFile::TIterObj, TPainter3dAlgorithms, TPair, TParameter< AParamType >, TParameter< Long64_t >, TParticle, TPBHandleDSType, TPBHistType, TPBReadType, TPerfEvent, TPluginHandler, TPluginManager, TPoints3DABC, TPolyLine, TPolyLine3D, TPolyMarker, TPolyMarker3D, TPrimary, TProofBench, TProofBenchDataSet, TProofBenchRun, TProofNodeInfo, TProofNodes, TProofPerfAnalysis::TWrkEntry, TProofProgressInfo, TProofProgressStatus, TProofResources, TPyDispatcher, TQpDataBase, TQpLinSolverBase, TQpProbBase, TQpResidual, TQpSolverBase, TQpVar, TQSlot, TQuaternion, TQueryDescription, TQueryResultManager, Track, TRatioPlot, TRealData, TRecEvent, TRecorder, TRecWinPair, TRef, TRefTable, TRobustEstimator, TRolke, TRootBrowserHistoryCursor, TRootSnifferStore, TRotation, TRWLock, TS3HTTPRequest, TSecContext, TSecContextCleanup, TSelector, TSemaphore, TSessionDescription, TSlave, TSlaveInfo, TSpectrum2Transform, TSpider, TSplinePoly, TSPlot, TSQLClassColumnInfo, TSQLClassInfo, TSqlCmdsBuffer, TSQLColumnData, TSQLObjectData, TSQLObjectDataPool, TSQLObjectInfo, TSqlRawBuffer, TSqlRegistry, TSQLResult, TSQLRow, TSQLServer, TSQLStatement, TSQLStructure, TSQLTableData, TStatistic, TStatsFeedback, TStopwatch, TStreamerInfoActions::TActionSequence, TStreamerInfoActions::TConfiguredAction, TStructNode, TStructViewer, TSVDUnfold, TSynapse, TSysEvtHandler, TTableIter, TTableMap, TThreadImp, TTreeDrawArgsParser, TTreeFormulaManager, TTreeReader, TTVRecord, TTVSession, TUnfold, TUri, TUrl, TUsrHit, TUsrHitBuffer, TVector2, TVector3, TVectorT< Element >, TVectorT< Double_t >, TView, TVirtualFFT, TVirtualGeoConverter, TVirtualGeoPainter, TVirtualGeoTrack, TVirtualGraphPainter, TVirtualHistPainter, TVirtualMCDecayer, TVirtualMCStack, TVirtualMutex, TVirtualPacketizer, TVirtualPacketizer::TVirtualSlaveStat, TVirtualPad, TVirtualPerfStats, TVirtualProofPlayer, TVirtualTreePlayer, TVirtualViewer3D, TVolumePosition, TXMLAttr, TXMLDocument, TXMLEngine, TXMLNode, TXMLParser, TXMLPlayer, and TXMLStackObj.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kIsOnHeap 

object is on heap

kNotDeleted 

object has not been deleted

kZombie 

object ctor failed

kBitMask 

Definition at line 67 of file TObject.h.

◆ anonymous enum

anonymous enum
Enumerator
kSingleKey 

write collection with single key

kOverwrite 

overwrite existing object with same name

kWriteDelete 

write object, then delete previous key with same name

Definition at line 75 of file TObject.h.

◆ EStatusBits

Enumerator
kCanDelete 

if object in a list can be deleted

kMustCleanup 

if object destructor must call RecursiveRemove()

kObjInCanvas 

for backward compatibility only, use kMustCleanup

kIsReferenced 

if object is referenced by a TRef or TRefArray

kHasUUID 

if object has a TUUID (its fUniqueID=UUIDNumber)

kCannotPick 

if object in a pad cannot be picked

kNoContextMenu 

if object does not want context menu

kInvalidObject 

if object ctor succeeded but object should not be used

Definition at line 55 of file TObject.h.

Constructor & Destructor Documentation

◆ TObject() [1/2]

TObject::TObject ( )

TObject constructor.

It sets the two data words of TObject to their initial values. The unique ID is set to 0 and the status word is set depending if the object is created on the stack or allocated on the heap. Depending on the ROOT environment variable "Root.MemStat" (see TEnv) the object is added to the global TObjectTable for bookkeeping.

Definition at line 65 of file TObject.cxx.

◆ TObject() [2/2]

TObject::TObject ( const TObject object)

TObject copy ctor.

Definition at line 80 of file TObject.cxx.

◆ ~TObject()

TObject::~TObject ( )
virtual

TObject destructor.

Removes object from all canvases and object browsers if observer bit is on and remove from the global object table.

Definition at line 141 of file TObject.cxx.

Member Function Documentation

◆ AbstractMethod()

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

Use this method to implement an "abstract" method that you don't want to leave purely abstract.

Definition at line 967 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 165 of file TObject.cxx.

◆ Browse()

void TObject::Browse ( TBrowser b)
virtual

◆ ClassName()

const char * TObject::ClassName ( ) const
virtual

Returns name of class to which the object belongs.

Definition at line 188 of file TObject.cxx.

◆ Clear()

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

◆ 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.

Reimplemented in TClass, TH1, TStreamerInfo, TMinuit, TImage, TDataSet, TASImage, TMethodCall, TH2Poly, TCollection, RooStats::ModelConfig, RooAbsArg, TMVA::MinuitWrapper, RooDataSet, TMethod, RooDataHist, RooCmdArg, TFunction, TNamed, RooFitResult, RooCatType, RooLinkedList, RooAbsStudy, TFunctionTemplate, RooStudyPackage, RooAbsCollection, RooCategoryProxy, RooAbsBinning, RooFormula, RooRealProxy, RooNameSet, RooMapCatEntry, and RooThreshEntry.

Definition at line 204 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.

Reimplemented in RooAbsArg, TSlaveInfo, TDSetElement, TSlave, TFileInfo, TEnvRec, TParameter< AParamType >, TParameter< Long64_t >, TUrl, TGeoBranchArray, TClassDocInfo, TCollection, TGeoOverlap, TPerfEvent, TStructNode, TNamed, RooDouble, TObjString, RooInt, TStructNodeProperty, and RooThreshEntry.

Definition at line 219 of file TObject.cxx.

◆ Copy()

void TObject::Copy ( TObject object) const
virtual

◆ Delete()

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

◆ DistancetoPrimitive()

Int_t TObject::DistancetoPrimitive ( Int_t  px,
Int_t  py 
)
virtual

◆ DoError()

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

Interface to ErrorHandler (protected).

Reimplemented in TTreeViewer, TXSocket, TThread, TXSlave, and TSlaveLite.

Definition at line 886 of file TObject.cxx.

◆ Draw()

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

◆ 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:

base_object.png

Reimplemented in TGFrame, TSystemDirectory, and TSystemFile.

Definition at line 270 of file TObject.cxx.

◆ DrawClone()

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

Draw a clone of this object in the current pad.

Reimplemented in TGFrame, TCanvas, TAxis, TSystemDirectory, and TSystemFile.

Definition at line 278 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

Reimplemented in TClass, TGFrame, TGPack, TCollection, and TSystemFile.

Definition at line 325 of file TObject.cxx.

◆ Error()

void TObject::Error ( const char *  method,
const char *  msgfmt,
  ... 
) const
virtual

Issue error message.

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

Definition at line 925 of file TObject.cxx.

◆ Execute() [1/2]

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

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

"3.14,1,\"text"".

Reimplemented in TCling, TInterpreter, TContextMenu, and TMethodCall.

Definition at line 336 of file TObject.cxx.

◆ Execute() [2/2]

void TObject::Execute ( TMethod method,
TObjArray params,
Int_t error = 0 
)
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

Reimplemented in TCling, TContextMenu, TMethodCall, and TInterpreter.

Definition at line 354 of file TObject.cxx.

◆ ExecuteEvent()

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

◆ Fatal()

void TObject::Fatal ( const char *  method,
const char *  msgfmt,
  ... 
) 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 953 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.

Reimplemented in TH1, TROOT, TPad, TDirectory, TGraph, TGraph2D, TDataSet, TCollection, TObjArray, TDataSetIter, TBtree, TList, TMap, TGeometry, RooLinkedList, TListOfDataMembers, THashTable, TListOfFunctions, TListOfFunctionTemplates, THbookFile, TFolder, THashList, TListOfEnumsWithLock, TViewPubDataMembers, TViewPubFunctions, and TListOfTypes.

Definition at line 380 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.

Reimplemented in TH1, TROOT, TPad, TDirectory, TGraph, TGraph2D, TDataSet, TCollection, TObjArray, TDataSetIter, TBtree, TList, TMap, TGeometry, RooLinkedList, THashTable, TListOfFunctions, THbookFile, TFolder, THashList, TListOfEnumsWithLock, TViewPubDataMembers, and TViewPubFunctions.

Definition at line 390 of file TObject.cxx.

◆ 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.

Reimplemented in TFitEditor, TRootBrowser, TRootBrowserLite, TBrowser, TGFileBrowser, and TGedFrame.

Definition at line 400 of file TObject.cxx.

◆ GetDtorOnly()

Long_t TObject::GetDtorOnly ( )
static

Return destructor only flag.

Definition at line 1014 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.

Reimplemented in TGMainFrame, TBranchElement, TGeoVolume, TBranch, TMethodBrowsable, TASImage, TKey, TSystemFile, and TVirtualBranchBrowsable.

Definition at line 426 of file TObject.cxx.

◆ GetName()

const char * TObject::GetName ( ) const
virtual

◆ 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).

Reimplemented in TF1, TH1, TGeoVolume, TASImage, TGeoNode, TF2, TParallelCoordVar, TVolume, TAxis3D, THistPainter, TNode, TGLParametricEquation, TGeoTrack, TGLHistPainter, TVolumePosition, TColorWheel, TFileDrawMap, TPaletteAxis, TPolyLineShape, TVolumeView, TGLTH3Composition, TVirtualHistPainter, and TGL5DDataSet.

Definition at line 445 of file TObject.cxx.

◆ GetObjectStat()

Bool_t TObject::GetObjectStat ( )
static

Get status of object stat flag.

Definition at line 999 of file TObject.cxx.

◆ GetOption()

virtual Option_t* TObject::GetOption ( ) const
inlinevirtual

◆ 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.

Reimplemented in TGGroupFrame, TPad, TGTextButton, TParticle, TVirtualPad, TGTextEntry, TAxis, TGTextLBEntry, TPair, TGLVEntry, TMapFile, TParallelCoordSelect, TASImage, TQCommand, TGaxis, TGLabel, TKey, TPackMgr, TPrimary, TClassMenuItem, TEvePointSet, TPolyLineShape, TBaseClass, TEveGeoNode, TNamed, and TPaveLabel.

Definition at line 460 of file TObject.cxx.

◆ GetUniqueID()

UInt_t TObject::GetUniqueID ( ) const
virtual

Return the unique object id.

Definition at line 434 of file TObject.cxx.

◆ 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.

Reimplemented in TGHtml, TSessionViewer, TProofPlayerSuperMaster, TProofPlayerSlave, TProofPlayerRemote, TGPopupMenu, TTreeViewer, TGuiBldDragManager, TGTextEntry, TGFileContainer, TGDNDManager, TGTextView, TGScrollBar, TGTextEdit, TVirtualPacketizer, TGWindow, TGShutter, TGTextEditor, TGLEventHandler, TGToolTip, TGCommandPlugin, and TProofPlayerLite.

Definition at line 470 of file TObject.cxx.

◆ Hash()

ULong_t TObject::Hash ( ) const
virtual

◆ Info()

void TObject::Info ( const char *  method,
const char *  msgfmt,
  ... 
) const
virtual

Issue info message.

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

Definition at line 899 of file TObject.cxx.

◆ InheritsFrom() [1/2]

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

Returns kTRUE if object inherits from class "classname".

Reimplemented in TClass.

Definition at line 488 of file TObject.cxx.

◆ InheritsFrom() [2/2]

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

Returns kTRUE if object inherits from TClass cl.

Reimplemented in TClass.

Definition at line 496 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:

base_inspect.png

Reimplemented in TGFrame, and TSystemFile.

Definition at line 509 of file TObject.cxx.

◆ InvertBit()

void TObject::InvertBit ( UInt_t  f)
inline

Definition at line 159 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.

Reimplemented in TSlaveInfo, TPair, TQCommand, TBonjourRecord, TGObject, and TObjString.

Definition at line 528 of file TObject.cxx.

◆ IsFolder()

Bool_t TObject::IsFolder ( ) const
virtual

◆ IsOnHeap()

Bool_t TObject::IsOnHeap ( ) const
inline

Definition at line 119 of file TObject.h.

◆ IsSortable()

virtual Bool_t TObject::IsSortable ( ) const
inlinevirtual

◆ IsZombie()

Bool_t TObject::IsZombie ( ) const
inline

Definition at line 120 of file TObject.h.

◆ ls()

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

◆ MakeZombie()

void TObject::MakeZombie ( )
inlineprotected

Definition at line 47 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 978 of file TObject.cxx.

◆ Notify()

Bool_t TObject::Notify ( )
virtual

◆ 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 987 of file TObject.cxx.

◆ operator delete()

void TObject::operator delete ( void ptr)

Operator delete.

Definition at line 1030 of file TObject.cxx.

◆ operator delete[]()

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

Operator delete [].

Definition at line 1041 of file TObject.cxx.

◆ operator new() [1/2]

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

Definition at line 137 of file TObject.h.

◆ operator new() [2/2]

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

Definition at line 139 of file TObject.h.

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

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

Definition at line 138 of file TObject.h.

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

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

Definition at line 140 of file TObject.h.

◆ operator=()

TObject & TObject::operator= ( const TObject rhs)

TObject assignment operator.

Definition at line 103 of file TObject.cxx.

◆ 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.

Reimplemented in TF1, TH1, TStyle, TPad, TSQLFile, TFile, TGeoSubtraction, TCanvas, TGenerator, TRatioPlot, TDirectory, TGraph, TGeoIntersection, TVirtualPad, TParticle, TBits, TGeoNode, TGeoShape, TGraph2D, TGeoPainter, TGeoVolume, TEveDigitSet, TEfficiency, TGeoUnion, TLatex, TEveGeoTopNode, TF2, TSpider, TEveStraightLineSet, TVirtualGeoPainter, TParallelCoord, TF3, TASImage, TCollection, TGaxis, TParallelCoordVar, TGeoPhysicalNode, TVolume, TPie, TNode, TGeoOverlap, TTreePerfStats, TAxis3D, TXMLFile, TEvePointSet, THistPainter, TVolumePosition, TGeoBoolNode, TGraph2DPainter, TPrimary, TEveCaloViz, TMarker3DBox, TGLParametricEquation, TMultiGraph, TGeoTrack, TEveShape, THStack, TVirtualGeoTrack, TPolyMarker3D, TText, TEveText, TEveTriangleSet, TBox, TPolyLine3D, TShape, TGLHistPainter, TEllipse, TVolumeView, TEveArrow, TEveProjectionAxes, TClassTree, TPave, TPolyLine, TPolyLineShape, TLine, TPolyMarker, TASPaletteEditor::LimitLine, TEveScene, TColorWheel, TParallelCoordRange, TFileDrawMap, TPaveText, TArrow, TGraphPolargram, TGraphNode, TSpline, TLegend, TPaletteAxis, TMathText, TGraphEdge, TMarker, TASPaletteEditor::PaintPalette, TMacro, TEveGeoShape, TGraphTime, TEvePlot3D, TGLTH3Composition, TSpectrum2Painter, TVirtualHistPainter, TWbox, TButton, TPaveStats, TGL5DDataSet, TPaveLabel, TNodeDiv, TSlider, TExec, TDiamond, TCrown, TPavesText, and TFrame.

Definition at line 564 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.

Reimplemented in TPad, TVirtualPad, and TFrame.

Definition at line 573 of file TObject.cxx.

◆ Print()

void TObject::Print ( Option_t option = "") const
virtual

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

Reimplemented in TProof, TTree, TGCompositeFrame, TGeoElementTable, TF1, TH1, TGFrame, TProofServ, TGeoBatemanSol, TPad, RooStats::ModelConfig, TGFontPool, TSlaveInfo, TGeoDecayChannel, TLorentzVector, THnBase, ROOT::v5::TFormula, TSQLFile, TFile, RooAbsArg, TGFont, TDSet, TBranchElement, TPluginManager, TMultiDimFit, TGeoElementRN, TMatrixTBase< Element >, TBranch, TRolke, TZIPMember, TVector3, TQpVar, TFormula, TPluginHandler, TVirtualPad, TProofDesc, TSQLStructure, TVectorT< Element >, TVectorT< Double_t >, TDecompSparse, TDirectory, TGraph, TEnv, TFileInfoMeta, RooMsgService, TParticle, TEveTrans, TStreamerInfoActions::TActionSequence, RooAbsData, TQueryResult, TSlave, TBits, TGGCPool, TGeoVolume, TZIPFile, TMonaLisaWriter, RooWorkspace, TTable, TTreeCacheUnzip, TGFrameElement, TMVA::TNeuron, TGPicturePool, TChain, TDSetElement, RooPlot, TApplicationRemote, TGWindow, TQpDataDens, TGeoIsotope, TProofOutputFile, TUri, TQpDataSparse, TXNetFile, TProofBenchRunDataRead, TParameter< AParamType >, TParameter< Long64_t >, TMapFile, TGeoBranchArray, RooAbsCollection, TFileInfo, THostAuth, TQuaternion, TParticlePDG, TProofLogElem, TProofLite, TMVA::PDEFoamCell, TGeoVoxelFinder, TGGC, TFileCacheRead, TCollection, TGLayoutHints, TProofBenchRunCPU, TGeoMatrix, TVector2, TAlienCollection, TUrl, TGTextEdit, TParallelCoordVar, TKey, TTreeCache, TFTP, RooCatType, TGeoOverlap, TSecContext, TAliEnFind, TTreePerfStats, TDecompBase, TGeoElement, TGeoPhysicalNode, TClassTable, TXMLFile, TGraphBentErrors, TDecompSVD, TFileCollection, TVolumePosition, TPrimary, RooAbsDataStore, TGPicture, TStatistic, RooLinkedList, TInetAddress, TPrincipal, TFoamCell, TGeoTrack, TMultiGraph, TChair, TText, TGraphAsymmErrors, TDatabasePDG, TGridCollection, TSelEventGen, TMemFile, TDecompQRH, THelix, THStack, TCondor, TPolyMarker3D, TPerfEvent, TBox, TGMimeTypes, TDecompLU, TEllipse, TPave, TPolyLine3D, TProofProgressStatus, TGraphErrors, TDecompBK, TBonjourRecord, TPolyLine, TTreeIndex, TColor, TLine, TAttParticle, RooNumIntConfig, TPolyMarker, RooCustomizer, RooAbsBinning, TDecompChol, TProofLog, TStatus, RooFitResult, RooFormula, TPoints3D, TNetFile, TMVA::PDEFoamVect, TParallelCoordRange, TObjectTable, TPaveText, TEventList, TMessageHandler, TSpectrum, TProofBenchRun, TLegend, TPointsArray3D, RooHist, TFunction, TNamed, TMarker, RooCurve, TStopwatch, TFitResult, TParticleClassPDG, TLDAPEntry, TBranchClones, TProofNodes, TMacro, TAlienJobStatus, TGLiteResult, TSQLColumnInfo, RooAbsNumGenerator, THbookTree, RooStats::HistFactory::EstimateSummary, TBenchmark, TXTRU, TRootSecContext, TSlaveLite, TXNetFileStager, Roo1DTable, RooGenFitStudy, TBranchObject, TBranchRef, TSpectrum3, TAlienMasterJobStatus, RooAbsGenContext, RooNumGenConfig, TSpectrum2, TAlienResult, TLDAPAttribute, TNetFileStager, TCondorSlave, TLegendEntry, TLDAPResult, TObjString, RooNameSet, TFoamVect, TFileCacheWrite, TProofOutputList, TSQLTableInfo, TBranchSTL, TAlienMasterJob, RooGrid, RooEllipse, and RooSharedProperties.

Definition at line 595 of file TObject.cxx.

◆ 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().

Reimplemented in TKeyXML, TBuffer, TKey, and TKeySQL.

Definition at line 607 of file TObject.cxx.

◆ RecursiveRemove()

void TObject::RecursiveRemove ( TObject obj)
virtual

◆ ResetBit()

void TObject::ResetBit ( UInt_t  f)
inline

Definition at line 156 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 independant 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.

Reimplemented in TPad, TSpline5, TSpline3, TGeoVolume, TVirtualPad, TTreePerfStats, TClassTree, TFolder, TSpline, TGObject, and TPaveClass.

Definition at line 644 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".

Reimplemented in TGHtml, TGGroupFrame, TGTransientFrame, TGMainFrame, TGeoPatternSphPhi, TGeoPatternSphTheta, TGHorizontalFrame, TGListTree, TGeoPatternSphR, TGVerticalFrame, TGeoHMatrix, TGCompositeFrame, TGeoPatternCylPhi, TF1, TStyle, TGeoIdentity, TGeoPatternCylR, TGRadioButton, TGListBox, TGMenuBar, TH1, TGeoPatternTrapZ, TGListDetailsLayout, TGCheckButton, TGFrame, TGeoCombiTrans, TGListLayout, TGeoPatternParaZ, TSpline5, TGTileLayout, TGMenuTitle, TGNumberEntry, TGeoPatternParaY, TGMatrixLayout, TGeoDecayChannel, TGLVContainer, TGPictureButton, TGCanvas, TGMdiMainFrame, TGeoPatternParaX, TSpline3, TGColumnLayout, TGPopupMenu, TGTextButton, TGRowLayout, TGFont, TGeoVolume, TGeoRotation, TGeoCtub, TCanvas, TGeoPatternZ, TASImage, TGDoubleHSlider, TGeoElementRN, TGFileContainer, TGVScrollBar, TGeoSubtraction, TGHorizontalLayout, TGeoMixture, TGLineWidthComboBox, TGVerticalLayout, TGListView, TGTextEntry, TGDoubleVSlider, TGHScrollBar, TGraph, TGeoPatternY, TGHSlider, TGeoGtra, TGeoConeSeg, TGLineStyleComboBox, TGedPatternSelect, TGColorSelect, TGeoIntersection, TGeoTranslation, TGeoTubeSeg, TGXYLayout, TGDockableFrame, TGNumberEntryField, TGVProgressBar, TGraph2D, TGComboBox, TGVFileSplitter, TTable, TGVSlider, TGTextEdit, TGTripleHSlider, TGSplitFrame, TGeoTrap, TGeoPatternX, TGContainer, TProfile2D, TGHButtonGroup, TGTableLayout, TProfile3D, TGTextLBEntry, TPad, TGButton, TEfficiency, TLatex, TGHProgressBar, TGXYLayoutHints, TGHSplitter, TProfile, TGLabel, TF2, TGeoUnion, TGTab, TGVButtonGroup, TH2Poly, TGTextView, TGeoMaterial, TGShutter, TParallelCoord, TGGC, TGLayoutHints, TF3, TGeoXtru, TGaxis, TTreePerfStats, TParallelCoordVar, TGButtonGroup, TGProgressBar, TGTripleVSlider, TGeoPcon, TPie, TGVSplitter, TAxis3D, TGeoPgon, TGraphBentErrors, TChair, TGeoCone, TVolumePosition, TGeoBoolNode, TGFSComboBox, TGMdiFrame, TGeoBBox, TGeoHype, TGeoSphere, TGeoCompositeShape, TGeoTorus, TMultiGraph, TMarker3DBox, TGeoArb8, TText, TGraphAsymmErrors, TGeoTube, TGMdiMenuBar, TGToolBar, THStack, TGeoPara, THelix, TPolyMarker3D, TBox, TEllipse, TPave, TPolyLine3D, TGStatusBar, TVolumeView, TGedMarkerSelect, TGraphErrors, TGeoTrd2, TPolyLine, TLine, TGIcon, TGeoTrd1, TRootEmbeddedCanvas, TPolyMarker, TCurlyLine, TGShutterItem, TGeoParaboloid, TGeoScaledShape, TPaveText, TGTableLayoutHints, TArrow, TLegend, TMathText, TGVertical3DLine, TGraphNode, TGeoShapeAssembly, TMarker, TPaletteAxis, TGraphEdge, TGTabLayout, TMacro, TGeoEltu, TGeoHalfSpace, TGraphStruct, TGeoMedium, TH1K, TWbox, TCurlyArc, TGShapedFrame, TPieSlice, TF12, TButton, TCutG, TPaveStats, TPaveLabel, TGHorizontal3DLine, TSlider, TExec, TArc, TSliderBox, TPaveClass, TDiamond, TCrown, TFrame, TPavesText, and TGroupButton.

Definition at line 709 of file TObject.cxx.

◆ SetBit() [1/2]

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

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

Definition at line 739 of file TObject.cxx.

◆ SetBit() [2/2]

void TObject::SetBit ( UInt_t  f)
inline

Definition at line 155 of file TObject.h.

◆ 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().

Reimplemented in TGFrame, TPad, TRootBrowserLite, TAxis, TBrowser, TGedFrame, RooPlot, TSystemDirectory, and TSystemFile.

Definition at line 722 of file TObject.cxx.

◆ SetDtorOnly()

void TObject::SetDtorOnly ( void obj)
static

Set destructor only flag.

Definition at line 1022 of file TObject.cxx.

◆ SetObjectStat()

void TObject::SetObjectStat ( Bool_t  stat)
static

Turn on/off tracking of objects in the TObjectTable.

Definition at line 1006 of file TObject.cxx.

◆ SetUniqueID()

void TObject::SetUniqueID ( UInt_t  uid)
virtual

Set the unique object id.

Definition at line 750 of file TObject.cxx.

◆ SysError()

void TObject::SysError ( const char *  method,
const char *  msgfmt,
  ... 
) 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 939 of file TObject.cxx.

◆ TestBit()

Bool_t TObject::TestBit ( UInt_t  f) const
inline

Definition at line 157 of file TObject.h.

◆ TestBits()

Int_t TObject::TestBits ( UInt_t  f) const
inline

Definition at line 158 of file TObject.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.

Reimplemented in TTree, TH1, TPad, TGraph, TCanvas, TAxis3D, TPaveText, TPaveStats, and TFrame.

Definition at line 760 of file TObject.cxx.

◆ Warning()

void TObject::Warning ( const char *  method,
const char *  msgfmt,
  ... 
) const
virtual

Issue warning message.

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

Definition at line 911 of file TObject.cxx.

◆ Write() [1/2]

Int_t TObject::Write ( const char *  name = 0,
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.

Reimplemented in TTree, TFile, TSQLFile, TDirectory, TDataSet, TDirectoryFile, TCollection, TXMLFile, TMap, TBuffer, and TParallelMergingFile.

Definition at line 830 of file TObject.cxx.

◆ Write() [2/2]

Int_t TObject::Write ( const char *  name = 0,
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. 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.

Reimplemented in TTree, TFile, TSQLFile, TDirectory, TDataSet, TDirectoryFile, TCollection, TXMLFile, TMap, TBuffer, and TParallelMergingFile.

Definition at line 809 of file TObject.cxx.

Friends And Related Function Documentation

◆ TClonesArray

friend class TClonesArray
friend

Definition at line 198 of file TObject.h.

Member Data Documentation

◆ fBits

UInt_t TObject::fBits
private

bit field status word

Definition at line 41 of file TObject.h.

◆ fgDtorOnly

Long_t TObject::fgDtorOnly = 0
staticprivate

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

Definition at line 43 of file TObject.h.

◆ fgObjectStat

Bool_t TObject::fgObjectStat = kTRUE
staticprivate

if true keep track of objects in TObjectTable

Definition at line 44 of file TObject.h.

◆ fUniqueID

UInt_t TObject::fUniqueID
private

object unique identifier

Definition at line 40 of file TObject.h.


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